مرجع واجهة البرمجة
مُولَّد من مستند OpenAPI 3.1 الذي تقدّمه واجهة البرمجة. افتح طلبًا أو استجابة لترى حقولها.
Models
What you can run and what it costs.
get/v1/models
· List modelsعامة، بلا مفتاحEvery model open to the API right now, in display order: task type, params with their enum values and ranges, defaults, input limits and priceFromCoins (the coins of a request that sets only the prompt). Send only the params you want to set: omitted params take the model default. Public, cached for a minute.
الاستجابات
200The catalog.
get/v1/effects
· List effectsعامة، بلا مفتاحStyle filters and templates. Run one by quoting and submitting with its modelId and effectId; params then hold the effect input (images or video, and an optional prompt direction). Public.
الاستجابات
200The effects.
Generations
Quote, start, follow and cancel generations.
post/v1/quotes
· Quote a generationالصلاحية: generatePrices a request exactly as a submit would. The quoteToken (valid 10 minutes) reserves exactly coins when you submit with it; after it expires the submit is accepted only at the same price (else price_changed).
متن الطلب
application/json QuoteRequest
modelIdstringإلزاميmin length 1
paramsobjectإلزاميdraftbooleandefault false
effectIdstringpattern ^[a-z0-9][a-z0-9-]{0,63}$
الاستجابات
200The price.
400Invalid request: invalid_params, invalid_quote, idempotency_key_required, consent_required, input_too_large, input_duration, wrong_media…
401No valid key: unauthorized, invalid_api_key, api_key_revoked, api_key_expired.
403insufficient_scope, cooldown, account_locked.
404not_found or unknown_model.
429rate_limited: wait Retry-After seconds.
503unavailable, maintenance or channel_disabled: nothing was charged; retry later.
get/v1/generations
· List generationsالصلاحية: readYour generations, newest first, with cursor pagination: pass nextCursor back as cursor until it is null.
المعاملات
cursorstringالاستعلامnextCursorof the previous page.limitintegerالاستعلام≥ 1 · ≤ 100 · default 30
statusstringالاستعلامone of "queued", "processing", "succeeded", "failed", "canceled"
modalitystringالاستعلامone of "image", "video", "audio", "3d"
workspacestringالاستعلامone of "image", "video", "audio", "3d", "tools"
modelIdstringالاستعلامactivebooleanالاستعلامOnly generations that are still queued or processing.
الاستجابات
200One page.
400Invalid request: invalid_params, invalid_quote, idempotency_key_required, consent_required, input_too_large, input_duration, wrong_media…
401No valid key: unauthorized, invalid_api_key, api_key_revoked, api_key_expired.
403insufficient_scope, cooldown, account_locked.
429rate_limited: wait Retry-After seconds.
post/v1/generations
· Start a generationالصلاحية: generateHolds the coins and queues the generation. Send exactly one of quoteToken (charge exactly the quoted coins) or maxCoins (charge the current price, refused with max_coins_exceeded above it): you are never charged more than either. The Idempotency-Key header is required: repeating a key with the same body returns the original generation (200); the same key with another body is idempotency_conflict (409). Failed generations are refunded in full; partial results are charged per delivered output.
المعاملات
Idempotency-Keystringالترويسةإلزاميmin length 16 · max length 128 · pattern ^[A-Za-z0-9_-]+$
16–128 characters of A–Z a–z 0–9 _ -, unique per intended generation (a UUID works). Scoped to your account.
متن الطلب
application/json CreateGenerationRequest
modelIdstringإلزاميmin length 1
paramsobjectإلزاميquoteTokenstringmin length 1
maxCoinsinteger> 0
projectIdstring | nullmin length 1
effectIdstringpattern ^[a-z0-9][a-z0-9-]{0,63}$
consenttrue
الاستجابات
200A replay of an earlier request with the same key.
201Created and queued.
400Invalid request: invalid_params, invalid_quote, idempotency_key_required, consent_required, input_too_large, input_duration, wrong_media…
401No valid key: unauthorized, invalid_api_key, api_key_revoked, api_key_expired.
402insufficient_coins, or spend_cap_exceeded for the key's monthly cap.
403insufficient_scope, cooldown, account_locked.
404not_found or unknown_model.
409idempotency_conflict, price_changed, max_coins_exceeded, not_cancelable.
429rate_limited: wait Retry-After seconds.
503unavailable, maintenance or channel_disabled: nothing was charged; retry later.
get/v1/generations/{id}
· Get a generationالصلاحية: readStatus (queued, processing, succeeded, failed, canceled), progress, coins and outputs. Output URLs are signed and short-lived: read the generation again for fresh ones. Prefer webhooks to polling; poll no faster than every 2 seconds.
المعاملات
idstring (uuid)المسارإلزاميThe generation id.
الاستجابات
200The generation.
401No valid key: unauthorized, invalid_api_key, api_key_revoked, api_key_expired.
403insufficient_scope, cooldown, account_locked.
404not_found or unknown_model.
429rate_limited: wait Retry-After seconds.
post/v1/generations/{id}/cancel
· Cancel a queued generationالصلاحية: generateFree, and only while the generation is still queued (not yet sent for processing); the held coins are released. Otherwise not_cancelable (409).
المعاملات
idstring (uuid)المسارإلزاميThe generation id.
الاستجابات
200Canceled.
401No valid key: unauthorized, invalid_api_key, api_key_revoked, api_key_expired.
403insufficient_scope, cooldown, account_locked.
404not_found or unknown_model.
409idempotency_conflict, price_changed, max_coins_exceeded, not_cancelable.
429rate_limited: wait Retry-After seconds.
Files
Input uploads and output files.
post/v1/uploads
· Upload an input fileالصلاحية: uploadsOne image (PNG, JPEG, WebP ≤ 20 MB, ≤ 8192 px), audio file (MP3, WAV, M4A, OGG ≤ 50 MB, ≤ 10 min) or video (MP4, WebM, MOV ≤ 200 MB, ≤ 60 s, ≤ 4096 px) as multipart/form-data in the field file. Use the returned id in a media param (image, images, first_frame, audio, video…). Uploads are deleted after 30 days.
متن الطلب
multipart/form-data object
filestringإلزاميOne of image/png, image/jpeg, image/webp, audio/mpeg, audio/wav, audio/mp4, audio/ogg, video/mp4, video/webm, video/quicktime.
الاستجابات
201Stored.
400Invalid request: invalid_params, invalid_quote, idempotency_key_required, consent_required, input_too_large, input_duration, wrong_media…
401No valid key: unauthorized, invalid_api_key, api_key_revoked, api_key_expired.
403insufficient_scope, cooldown, account_locked.
413upload_too_large, upload_too_long.
415upload_invalid.
429rate_limited: wait Retry-After seconds.
503unavailable, maintenance or channel_disabled: nothing was charged; retry later.
get/v1/assets/{id}
· Get a fileالصلاحية: readAn output or upload with freshly signed, short-lived download URLs (about an hour).
المعاملات
idstring (uuid)المسارإلزاميThe asset id.
الاستجابات
200The file.
401No valid key: unauthorized, invalid_api_key, api_key_revoked, api_key_expired.
403insufficient_scope, cooldown, account_locked.
404not_found or unknown_model.
429rate_limited: wait Retry-After seconds.
Account
Balance and limits.
get/v1/generations/concurrency
· Running-generation limitالصلاحية: readHow many generations run at once for you, and how many run or wait now. Generations over the limit wait in the queue.
الاستجابات
200The limit.
401No valid key: unauthorized, invalid_api_key, api_key_revoked, api_key_expired.
403insufficient_scope, cooldown, account_locked.
429rate_limited: wait Retry-After seconds.
get/v1/account
· Balance and limitsالصلاحية: accountYour coin balance, running-generation limit, rate limits and the calling key with its monthly spend.
الاستجابات
200The account.
401No valid key: unauthorized, invalid_api_key, api_key_revoked, api_key_expired.
403insufficient_scope, cooldown, account_locked.
429rate_limited: wait Retry-After seconds.
أحداث خطافات الويب
الطلبات التي يرسلها inker إلى نقاط الاستقبال الخاصة بك.
POST generation.succeeded
Sent to your endpoint when a generation ends this way. Verify Inker-Signature (t=<unix>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")>), refuse a t more than 300 s off, dedupe on Inker-Event-Id and answer 2xx within 10 s. Failed deliveries are retried for about a day.
application/json
idstringإلزاميmin length 1
typestringإلزاميone of "generation.succeeded", "generation.failed", "generation.canceled"
createdAtstring (date-time)إلزاميdataobjectإلزاميالحقول
- Generation
generationGenerationإلزامي
POST generation.failed
Sent to your endpoint when a generation ends this way. Verify Inker-Signature (t=<unix>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")>), refuse a t more than 300 s off, dedupe on Inker-Event-Id and answer 2xx within 10 s. Failed deliveries are retried for about a day.
application/json
idstringإلزاميmin length 1
typestringإلزاميone of "generation.succeeded", "generation.failed", "generation.canceled"
createdAtstring (date-time)إلزاميdataobjectإلزاميالحقول
- Generation
generationGenerationإلزامي
POST generation.canceled
Sent to your endpoint when a generation ends this way. Verify Inker-Signature (t=<unix>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")>), refuse a t more than 300 s off, dedupe on Inker-Event-Id and answer 2xx within 10 s. Failed deliveries are retried for about a day.
application/json
idstringإلزاميmin length 1
typestringإلزاميone of "generation.succeeded", "generation.failed", "generation.canceled"
createdAtstring (date-time)إلزاميdataobjectإلزاميالحقول
- Generation
generationGenerationإلزامي
المخططات
الكائنات التي تقبلها نقاط النهاية وتعيدها، موثّق كلٌّ منها مرة واحدة.
Asset
idstringإلزاميmin length 1 · max length 128 · pattern ^[A-Za-z0-9_-]+$
kindstringإلزاميone of "image", "video", "audio", "3d", "text"
urlstringإلزاميmin length 1
thumbnailUrlstringإلزاميmin length 1
posterUrlstring | nullإلزاميmin length 1
mimeTypestringإلزاميmin length 1
widthinteger | nullإلزامي> 0
heightinteger | nullإلزامي> 0
durationSecondsnumber | nullإلزامي> 0
waveformUrlstring | nullmin length 1
transparentbooleandownloadsarray of objectالحقول
formatstringإلزاميone of "obj", "fbx", "usdz", "stl"
urlstringإلزاميmin length 1
bytesintegerإلزامي> 0
stemstring | nullone of "vocals", "drums", "bass", "other"
subtitlesobject | nullالحقول
srtUrlstringإلزاميmin length 1
vttUrlstringإلزاميmin length 1
Generation
idstringإلزاميmin length 1
modelIdstringإلزاميmin length 1
modelNamestringإلزاميmin length 1
taskTypestringإلزاميone of "image.generate", "image.edit", "video.generate", "video.animate", "image.upscale", "image.remove-bg", "image.inpaint", "image.outpaint", "image.relight", "image.vectorize", "image.restore", "image.effect", "video.v2v", "video.extend", "video.upscale", "video.interpolate", "video.remove-bg", "video.add-audio", "video.lipsync", "video.effect", "video.reframe", "audio.tts", "audio.music", "audio.sfx", "audio.voice-change", "audio.isolate", "audio.stt", "3d.from-text", "3d.from-image", "image.erase", "image.reframe", "image.sketch", "image.restyle", "image.colorize", "image.retouch", "image.product-shot", "image.replace-bg", "image.try-on"
modalitystringإلزاميone of "image", "video", "audio", "3d"
workspacestringإلزاميone of "image", "video", "audio", "3d", "tools"
effectobject | nullإلزاميالحقول
idstringإلزاميmin length 1
textstring | nullإلزامي
statusstringإلزاميone of "queued", "processing", "succeeded", "failed", "canceled"
progressnumber | nullإلزامي≥ 0 · ≤ 1
queuePositioninteger | nullإلزامي> 0
paramsobjectإلزاميcoinsQuotedintegerإلزامي> 0
coinsChargedinteger | nullإلزامي≥ 0
- Asset
outputsarray of Assetإلزامي outputsRequestedintegerإلزامي> 0
errorobject | nullإلزاميالحقول
codestringإلزاميone of "content_policy", "invalid_input", "unavailable", "timeout", "internal"
projectIdstring | nullإلزاميmin length 1
createdAtstring (date-time)إلزاميstartedAtstring (date-time) | nullإلزاميcompletedAtstring (date-time) | nullإلزامي
GenerationPage
- Generation
itemsarray of Generationإلزامي nextCursorstring | nullإلزاميmin length 1
QuoteResponse
modelIdstringإلزاميmin length 1
coinsintegerإلزامي> 0
coinsPerOutputintegerإلزامي> 0
outputsintegerإلزامي> 0
quoteTokenstring | nullإلزاميmin length 1
expiresAtstring (date-time)إلزاميavailableCoinsintegerإلزامي≥ 0
Concurrency
limitintegerإلزامي> 0
raisedLimitinteger | nullإلزامي> 0
runningintegerإلزامي≥ 0
queuedintegerإلزامي≥ 0
PublicModelsResponse
modelsarray of objectإلزاميالحقول
idstringإلزاميmin length 1
listingIdstringإلزاميmin length 1
taskTypestringإلزاميone of "image.generate", "image.edit", "video.generate", "video.animate", "image.upscale", "image.remove-bg", "image.inpaint", "image.outpaint", "image.relight", "image.vectorize", "image.restore", "image.effect", "video.v2v", "video.extend", "video.upscale", "video.interpolate", "video.remove-bg", "video.add-audio", "video.lipsync", "video.effect", "video.reframe", "audio.tts", "audio.music", "audio.sfx", "audio.voice-change", "audio.isolate", "audio.stt", "3d.from-text", "3d.from-image", "image.erase", "image.reframe", "image.sketch", "image.restyle", "image.colorize", "image.retouch", "image.product-shot", "image.replace-bg", "image.try-on"
modalitystringإلزاميone of "image", "video", "audio", "3d"
workspacestringإلزاميone of "image", "video", "audio", "3d", "tools"
vendorstringإلزاميmin length 1
displayNamestringإلزاميmin length 1
paramsarray of object | object | object | object | object | objectإلزاميالحقول
namestringإلزاميone of "prompt", "negative_prompt", "aspect_ratio", "resolution", "duration", "num_outputs", "seed", "images", "image", "first_frame", "last_frame", "generate_audio", "upscale_factor", "mask", "expand_left", "expand_right", "expand_top", "expand_bottom", "video", "audio", "fps", "effect", "text", "voice", "language", "speed", "lyrics", "style", "instrumental", "stem", "polycount", "texture", "format", "garment", "lighting", "light_direction", "palette", "pbr", "quad", "geometry_quality", "texture_quality"
requiredbooleanإلزاميuiobjectإلزاميالحقول
controlstringإلزاميone of "prompt", "textarea", "aspect", "segmented", "select", "switch", "seed", "image", "images", "script", "lyrics", "tags", "voice", "language", "slider", "audio", "video", "mask", "expand", "effect"
groupstringإلزاميone of "prompt", "inputs", "basic", "advanced"
orderintegerإلزامي
kind"text"إلزاميmaxLengthintegerإلزامي> 0
minLengthinteger> 0
الحقول
namestringإلزاميone of "prompt", "negative_prompt", "aspect_ratio", "resolution", "duration", "num_outputs", "seed", "images", "image", "first_frame", "last_frame", "generate_audio", "upscale_factor", "mask", "expand_left", "expand_right", "expand_top", "expand_bottom", "video", "audio", "fps", "effect", "text", "voice", "language", "speed", "lyrics", "style", "instrumental", "stem", "polycount", "texture", "format", "garment", "lighting", "light_direction", "palette", "pbr", "quad", "geometry_quality", "texture_quality"
requiredbooleanإلزاميuiobjectإلزاميالحقول
controlstringإلزاميone of "prompt", "textarea", "aspect", "segmented", "select", "switch", "seed", "image", "images", "script", "lyrics", "tags", "voice", "language", "slider", "audio", "video", "mask", "expand", "effect"
groupstringإلزاميone of "prompt", "inputs", "basic", "advanced"
orderintegerإلزامي
kind"enum"إلزاميvaluesarray of string | number | booleanإلزاميmin items 1
الحقول
namestringإلزاميone of "prompt", "negative_prompt", "aspect_ratio", "resolution", "duration", "num_outputs", "seed", "images", "image", "first_frame", "last_frame", "generate_audio", "upscale_factor", "mask", "expand_left", "expand_right", "expand_top", "expand_bottom", "video", "audio", "fps", "effect", "text", "voice", "language", "speed", "lyrics", "style", "instrumental", "stem", "polycount", "texture", "format", "garment", "lighting", "light_direction", "palette", "pbr", "quad", "geometry_quality", "texture_quality"
requiredbooleanإلزاميuiobjectإلزاميالحقول
controlstringإلزاميone of "prompt", "textarea", "aspect", "segmented", "select", "switch", "seed", "image", "images", "script", "lyrics", "tags", "voice", "language", "slider", "audio", "video", "mask", "expand", "effect"
groupstringإلزاميone of "prompt", "inputs", "basic", "advanced"
orderintegerإلزامي
kind"range"إلزاميminnumberإلزاميmaxnumberإلزاميstepnumberإلزامي> 0
الحقول
namestringإلزاميone of "prompt", "negative_prompt", "aspect_ratio", "resolution", "duration", "num_outputs", "seed", "images", "image", "first_frame", "last_frame", "generate_audio", "upscale_factor", "mask", "expand_left", "expand_right", "expand_top", "expand_bottom", "video", "audio", "fps", "effect", "text", "voice", "language", "speed", "lyrics", "style", "instrumental", "stem", "polycount", "texture", "format", "garment", "lighting", "light_direction", "palette", "pbr", "quad", "geometry_quality", "texture_quality"
requiredbooleanإلزاميuiobjectإلزاميالحقول
controlstringإلزاميone of "prompt", "textarea", "aspect", "segmented", "select", "switch", "seed", "image", "images", "script", "lyrics", "tags", "voice", "language", "slider", "audio", "video", "mask", "expand", "effect"
groupstringإلزاميone of "prompt", "inputs", "basic", "advanced"
orderintegerإلزامي
kind"seed"إلزاميmaxintegerإلزامي> 0
الحقول
namestringإلزاميone of "prompt", "negative_prompt", "aspect_ratio", "resolution", "duration", "num_outputs", "seed", "images", "image", "first_frame", "last_frame", "generate_audio", "upscale_factor", "mask", "expand_left", "expand_right", "expand_top", "expand_bottom", "video", "audio", "fps", "effect", "text", "voice", "language", "speed", "lyrics", "style", "instrumental", "stem", "polycount", "texture", "format", "garment", "lighting", "light_direction", "palette", "pbr", "quad", "geometry_quality", "texture_quality"
requiredbooleanإلزاميuiobjectإلزاميالحقول
controlstringإلزاميone of "prompt", "textarea", "aspect", "segmented", "select", "switch", "seed", "image", "images", "script", "lyrics", "tags", "voice", "language", "slider", "audio", "video", "mask", "expand", "effect"
groupstringإلزاميone of "prompt", "inputs", "basic", "advanced"
orderintegerإلزامي
kind"media"إلزاميacceptstringإلزاميone of "image", "audio", "video"
الحقول
namestringإلزاميone of "prompt", "negative_prompt", "aspect_ratio", "resolution", "duration", "num_outputs", "seed", "images", "image", "first_frame", "last_frame", "generate_audio", "upscale_factor", "mask", "expand_left", "expand_right", "expand_top", "expand_bottom", "video", "audio", "fps", "effect", "text", "voice", "language", "speed", "lyrics", "style", "instrumental", "stem", "polycount", "texture", "format", "garment", "lighting", "light_direction", "palette", "pbr", "quad", "geometry_quality", "texture_quality"
requiredbooleanإلزاميuiobjectإلزاميالحقول
controlstringإلزاميone of "prompt", "textarea", "aspect", "segmented", "select", "switch", "seed", "image", "images", "script", "lyrics", "tags", "voice", "language", "slider", "audio", "video", "mask", "expand", "effect"
groupstringإلزاميone of "prompt", "inputs", "basic", "advanced"
orderintegerإلزامي
kind"media_list"إلزاميaccept"image"إلزاميminItemsintegerإلزامي≥ 0
maxItemsintegerإلزامي> 0
defaultsobjectإلزاميpriceFromCoinsinteger | nullإلزامي> 0
inputLimitsobjectالحقول
maxOutputPixelsinteger> 0
maxOutputSideinteger> 0
minInputSecondsinteger> 0
maxInputSecondsinteger> 0
maxInputBytesinteger> 0
EffectsResponse
effectsarray of objectإلزاميالحقول
idstringإلزاميpattern ^[a-z0-9][a-z0-9-]{0,63}$
kindstringإلزاميone of "image", "video"
categorystringإلزاميone of "style", "template"
nameKeystringإلزاميmin length 1
thumbnailstring | nullإلزاميmin length 1
inputobject | objectإلزاميالحقول
type"images"إلزاميminintegerإلزامي> 0
maxintegerإلزامي> 0
الحقول
type"video"إلزامي
modelIdstringإلزاميmin length 1
PublicAccount
balanceobjectإلزاميالحقول
availableintegerإلزاميheldintegerإلزامي≥ 0
- Concurrency
concurrencyConcurrencyإلزامي rateLimitsobjectإلزاميالحقول
keyobjectإلزاميالحقول
limitintegerإلزامي> 0
windowSecondsintegerإلزامي> 0
accountobjectإلزاميالحقول
limitintegerإلزامي> 0
windowSecondsintegerإلزامي> 0
keyobject | nullإلزاميالحقول
idstring (uuid)إلزاميpattern ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
namestringإلزاميscopesarray of stringإلزاميmonthlySpendCapCoinsinteger | nullإلزامي> 0
spentThisMonthCoinsintegerإلزامي≥ 0
expiresAtstring (date-time) | nullإلزامي
channelstringإلزاميone of "web", "api", "mcp"
WebhookEvent
idstringإلزاميmin length 1
typestringإلزاميone of "generation.succeeded", "generation.failed", "generation.canceled"
createdAtstring (date-time)إلزاميdataobjectإلزاميالحقول
- Generation
generationGenerationإلزامي
Problem
typestringإلزاميmin length 1
titlestringإلزاميmin length 1
statusintegerإلزامي≥ 400 · ≤ 599
detailstringإلزاميcodestringإلزاميone of "invalid_params", "unknown_model", "invalid_quote", "price_changed", "max_coins_exceeded", "insufficient_coins", "idempotency_conflict", "idempotency_key_required", "cooldown", "account_locked", "unauthorized", "not_found", "not_cancelable", "rate_limited", "unavailable", "input_too_large", "input_duration", "input_file_too_large", "consent_required", "upload_too_large", "upload_invalid", "upload_too_long", "wrong_media", "download_too_large", "maintenance", "explore_blocked", "explore_limit", "explore_not_shareable", "explore_removed", "internal", "invalid_api_key", "api_key_revoked", "api_key_expired", "insufficient_scope", "channel_disabled", "spend_cap_exceeded"
instancestringissuesarray of objectالحقول
pathstringإلزاميmessagestringإلزامي
QuoteRequest
modelIdstringإلزاميmin length 1
paramsobjectإلزاميdraftbooleandefault false
effectIdstringpattern ^[a-z0-9][a-z0-9-]{0,63}$
CreateGenerationRequest
modelIdstringإلزاميmin length 1
paramsobjectإلزاميquoteTokenstringmin length 1
maxCoinsinteger> 0
projectIdstring | nullmin length 1
effectIdstringpattern ^[a-z0-9][a-z0-9-]{0,63}$
consenttrue