Skip to main content
POST
Create an AIHubMix image generation

Autorizações

Authorization
string
header
obrigatório

Gateway-issued API key, formatted as sk-gateway-xxxxxxxx. Used by OpenAI-shaped endpoints (/v1/chat/completions, etc.).

Corpo

application/json
model
string
obrigatório

Image model ID.

prompt
string
obrigatório
Minimum string length: 1
n
integer | null
padrão:1
Intervalo necessário: x >= 1
size
string | null
Pattern: ^[1-9][0-9]*x[1-9][0-9]*$
aspect_ratio
string | null
seed
integer | null
negative_prompt
string | null
image
any | null

Single input image as a URL, data URI, Base64 value, or URL object.

images
any[] | null
mask
any | null

Optional edit mask.

output_format
enum<string> | null
padrão:png
Opções disponíveis:
png,
jpeg,
webp
response_format
enum<string> | null
padrão:url
Opções disponíveis:
url,
b64_json
async
boolean
padrão:false
webhook_url
string<uri>
Maximum string length: 512
webhook_events_filter
enum<string>[]
Minimum array length: 1
Opções disponíveis:
completed,
failed,
cancelled
extra
object | null

Resposta

Image generation task

id
string
obrigatório

Platform task ID.

object
enum<string>
obrigatório
Opções disponíveis:
image,
video
model
string
obrigatório
status
enum<string>
obrigatório

Current task state. Completed, failed, and cancelled are terminal states.

Opções disponíveis:
pending,
in_progress,
completed,
failed,
cancelled
output
object[]
obrigatório
error
object | null
obrigatório
created_at
integer<int64>
obrigatório

Unix timestamp in seconds.

completed_at
integer<int64> | null
obrigatório
expires_at
integer<int64> | null
obrigatório

Artifact expiry time in Unix seconds; may be null before completion.