curl --request POST \
--url https://api.omniall.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6",
"prompt": "一间采光柔和的安静工作室",
"n": 1,
"size": "1024x1024"
}
'{
"created": 1710000000,
"data": [
{
"url": "https://example.com/image.png"
}
]
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}通用生图(推荐)
Generations
OpenAI 兼容图像生成。
路径: POST https://api.omniall.ai/v1/images/generations
推荐通用生图入口。image 建议为单个 HTTPS URL 或 URL 字符串数组(多图参考);不建议 Base64(易超限)。带参考图时部分渠道会自动改走 /v1/images/edits 或 Chat 桥接。
Gemini 原生亦可使用 generateContent。
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://api.omniall.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-image-2.6",
"prompt": "一间采光柔和的安静工作室",
"n": 1,
"size": "1024x1024"
}
'{
"created": 1710000000,
"data": [
{
"url": "https://example.com/image.png"
}
]
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "new_api_error",
"code": "<string>"
}
}Authorizations
使用来自 https://omniall.ai/dashboard 的 Authorization: Bearer sk-...
Body
application/json
OpenAI 兼容生图请求体(POST /v1/images/generations),对应网关 dto.ImageRequest。适用于 GPT-Image、DALL·E、Flux、Grok Imagine、Seedream/即梦生图渠道,以及许多路由到该路径的 Gemini 图像模型。