Skip to main content
POST
Create an AIHubMix image generation

承認

Authorization
string
header
必須

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

ボディ

application/json
model
string
必須

Image model ID.

prompt
string
必須
Minimum string length: 1
n
integer | null
デフォルト:1
必須範囲: 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
デフォルト:png
利用可能なオプション:
png,
jpeg,
webp
response_format
enum<string> | null
デフォルト:url
利用可能なオプション:
url,
b64_json
async
boolean
デフォルト:false
webhook_url
string<uri>
Maximum string length: 512
webhook_events_filter
enum<string>[]
Minimum array length: 1
利用可能なオプション:
completed,
failed,
cancelled
extra
object | null

レスポンス

Image generation task

id
string
必須

Platform task ID.

object
enum<string>
必須
利用可能なオプション:
image,
video
model
string
必須
status
enum<string>
必須

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

利用可能なオプション:
pending,
in_progress,
completed,
failed,
cancelled
output
object[]
必須
error
object | null
必須
created_at
integer<int64>
必須

Unix timestamp in seconds.

completed_at
integer<int64> | null
必須
expires_at
integer<int64> | null
必須

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