curl --request POST \ --url https://api.apimart.ai/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Idempotency-Key: <unique-operation-key>' \ --data '{ "model": "muse-image-ext", "prompt": "A red ceramic cup on a white table, soft studio lighting, product photography, no text", "aspect_ratio": "1:1", "n": 1 }'
import requestsresponse = requests.post( "https://api.apimart.ai/v1/images/generations", headers={ "Authorization": "Bearer <token>", "Accept": "application/json", "Idempotency-Key": "<unique-operation-key>" }, json={ "model": "muse-image-ext", "prompt": "A red ceramic cup on a white table, soft studio lighting, product photography, no text", "aspect_ratio": "1:1", "n": 1 })response.raise_for_status()print(response.json())
const response = await fetch("https://api.apimart.ai/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer <token>", "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": "<unique-operation-key>" }, body: JSON.stringify({ "model": "muse-image-ext", "prompt": "A red ceramic cup on a white table, soft studio lighting, product photography, no text", "aspect_ratio": "1:1", "n": 1 })});if (!response.ok) throw new Error(await response.text());console.log(await response.json());
Generate one WebP image from text or up to 9 reference images per request.
POST
/
v1
/
images
/
generations
curl --request POST \ --url https://api.apimart.ai/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Idempotency-Key: <unique-operation-key>' \ --data '{ "model": "muse-image-ext", "prompt": "A red ceramic cup on a white table, soft studio lighting, product photography, no text", "aspect_ratio": "1:1", "n": 1 }'
import requestsresponse = requests.post( "https://api.apimart.ai/v1/images/generations", headers={ "Authorization": "Bearer <token>", "Accept": "application/json", "Idempotency-Key": "<unique-operation-key>" }, json={ "model": "muse-image-ext", "prompt": "A red ceramic cup on a white table, soft studio lighting, product photography, no text", "aspect_ratio": "1:1", "n": 1 })response.raise_for_status()print(response.json())
const response = await fetch("https://api.apimart.ai/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer <token>", "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": "<unique-operation-key>" }, body: JSON.stringify({ "model": "muse-image-ext", "prompt": "A red ceramic cup on a white table, soft studio lighting, product photography, no text", "aspect_ratio": "1:1", "n": 1 })});if (!response.ok) throw new Error(await response.text());console.log(await response.json());
This API is asynchronous. Save the task ID after submission and query GET /v1/tasks/{task_id} for status and results. The default submission response contains the ID at data[0].task_id.
curl --request POST \ --url https://api.apimart.ai/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Idempotency-Key: <unique-operation-key>' \ --data '{ "model": "muse-image-ext", "prompt": "A red ceramic cup on a white table, soft studio lighting, product photography, no text", "aspect_ratio": "1:1", "n": 1 }'
import requestsresponse = requests.post( "https://api.apimart.ai/v1/images/generations", headers={ "Authorization": "Bearer <token>", "Accept": "application/json", "Idempotency-Key": "<unique-operation-key>" }, json={ "model": "muse-image-ext", "prompt": "A red ceramic cup on a white table, soft studio lighting, product photography, no text", "aspect_ratio": "1:1", "n": 1 })response.raise_for_status()print(response.json())
const response = await fetch("https://api.apimart.ai/v1/images/generations", { method: "POST", headers: { Authorization: "Bearer <token>", "Content-Type": "application/json", Accept: "application/json", "Idempotency-Key": "<unique-operation-key>" }, body: JSON.stringify({ "model": "muse-image-ext", "prompt": "A red ceramic cup on a white table, soft studio lighting, product photography, no text", "aspect_ratio": "1:1", "n": 1 })});if (!response.ok) throw new Error(await response.text());console.log(await response.json());
Strongly recommended. Use a new key for each independent generation (1–191 visible ASCII characters; a UUID is recommended). Replace <unique-operation-key> in the examples. After a submission timeout or network failure, retry with the same endpoint, body, response version, and key. Once you have a task ID, only query that task.
A text description of the requested content. Chinese and English are supported. It must not be empty after trimming whitespace, including when reference images are provided.
Up to 9 nonempty reference image inputs. Accepts public URLs, Data URIs (such as data:image/png;base64,...), or raw base64. Omit or send [] for text-only generation. PNG, JPEG, and WebP are recommended. Remote URLs must be directly accessible by the server without browser login cookies.The combined original size of all reference images must not exceed 11 MiB (11,534,336 bytes). This is a total limit, not a per-image limit. Base64 adds request-body overhead. Do not send blob: URLs, local file paths, or File objects.
Supports the seven ratios below. If omitted, text-to-image defaults to 1:1; generation with references follows their composition. An explicit ratio overrides this behavior. For automatic selection, omit this field; do not send "auto".1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3
Compatibility field accepting the seven ratios above or auto; pixel sizes such as 1024x1024 are unsupported. Sending only size: "auto" is equivalent to not specifying a ratio. Prefer aspect_ratio. If both are valid, aspect_ratio takes precedence, but each field is validated independently: a valid ratio cannot override an invalid size.
Only one result per request. The only accepted value is the number 1. Explicit 0, negative values, or values above 1 cause an error.
Returns a WebP URL. The model determines image dimensions; pixel sizes and 1K / 2K / 4K tiers cannot be selected. Do not send a nonempty resolution or any duration fields.
Backend base URL for task notifications. The platform removes trailing slashes and appends /callback: for example, https://your-backend.example/muse becomes https://your-backend.example/muse/callback. Omit when using polling only.
Controls Webhook error-message language, not generated content. Supported values: zh, en, ja, ko, ru, fr, de, id, pt, es. Regional tags such as zh-CN are not accepted. For polling, pass the language separately in the GET query string.
{ "model": "muse-image-ext", "prompt": "Keep the cup from the reference image and place it on a wooden cafe table in warm natural light", "image_urls": [ "https://your-cdn.example/cup.png" ], "n": 1}
Replace the example URL with an accessible image URL. This example omits the ratio to follow the reference composition; add aspect_ratio for a fixed ratio. For multiple references, add inputs to image_urls, up to 9 total.
The default response is HTTP 200, with data as an array. submitted means the task was accepted, not completed. Save data[0].task_id, then query the task.
Optional response version: 2026-07-27
With the header X-APIMart-Response-Version: 2026-07-27, submission returns HTTP 202. Read the task ID from data.id and the polling path from data.poll_url.
Use the complete task ID returned on submission and the same user identity. language is optional and controls error-message language. See Task status for all fields.
Poll every 5 seconds, with at most one query in flight per task. A client timeout or stopped polling does not cancel the server task. Save the task ID and resume GET queries later; do not automatically submit a new generation.
data.status
Action
pending / processing
Queued or processing; continue polling.
completed
Generation succeeded; stop polling and read the result URL.
failed
Generation failed; stop polling and read data.error.message.
unknown / …
Status is uncertain. Keep the task ID and retry queries within a bounded limit; do not treat it as success or automatically regenerate.
Use data.status to determine completion. HTTP 200 or progress: 100 alone does not mean generation succeeded. A polling_error during processing is not a terminal failure.Example completed query response (result URL is a placeholder):
In query responses, data is an object and url is an array of strings. The first result is at data.result.images[0].url[0]. If present, expires_at is an expiration timestamp in Unix seconds; save required files before expiry. actual_time measures task processing time, not video playback duration.
Reference videos, reference audio, masks, first/last-frame controls, extension, and remix are unsupported. quality has no effect. Omit seed, negative_prompt, width, height, response_format, and output_format; they are outside this model’s generation contract. async: false does not enable synchronous generation, and stream does not provide an SSE generation stream.
HTTP / error.code
Action
400 / invalid_request_error
Check the prompt, reference count, aspect ratio, output count, and fixed output settings.
409 / idempotency_in_progress
Wait as directed by Retry-After, then retry the original request with the same idempotency key.
409 / idempotency_key_reused
The same key was used for different requests. Correct key handling; use a new key for each independent generation.
409 / idempotency_result_indeterminate
Stop automatic resubmission and retain the key and task details for investigation.
429
Back off according to Retry-After before retrying.
Failed tasks may still return HTTP 200; inspect data.status and data.error.message. A network error or 5xx during submission may occur after acceptance, so do not immediately resubmit with a new key.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"APIMart","colors":{"primary":"#2563EB","light":"#3B82F6","dark":"#1D4ED8"},"favicon":"https://mintcdn.com/apicore/1GnRrmOhqkTFCvFb/logo/logo.png?fit=max\u0026auto=format\u0026n=1GnRrmOhqkTFCvFb\u0026q=85\u0026s=609be15c3f1f4e4b765c5945c2871ae9","navbar":{"links":[{"icon":"x-twitter","href":"https://x.com/APIMart_","label":""},{"icon":"discord","href":"https://discord.gg/V8zqssyZ5c","label":""},{"icon":"weixin","href":"https://cdn.apimart.ai/social-media/wechat.jpg","label":""}],"primary":{"type":"button","label":"Dashboard","href":"https://apimart.ai"}},"footer":{"socials":{"x":"https://x.com/APIMart_","website":"https://apimart.ai","discord":"https://discord.gg/V8zqssyZ5c"}},"seo":{"metatags":{"og:site_name":"APIMart","og:type":"website","keywords":"OpenAI compatible, API gateway, GPT-5, Claude, Gemini, multi-provider, transparent pricing, SLA","twitter:card":"summary_large_image","twitter:site":"@APIMart_","twitter:creator":"@APIMart_"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"languages":[{"language":"en","href":"en"},{"language":"zh-Hans","href":"cn"},{"language":"ja","href":"ja"},{"language":"ko","href":"ko"},{"language":"ru","href":"ru"},{"language":"de","href":"de"},{"language":"fr","href":"fr"},{"language":"pt","href":"pt"},{"language":"id","href":"id"},{"language":"es","href":"es"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"apicore","hasAudioNarration":false,"actualSubdomain":"apicore","customDomains":["docs.apimart.ai"],"gitSource":{"type":"github","owner":"apimart-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6ae1c97b1297abb2484bbfc0"},"chroma":{"liveDeploymentHistoryId":"6ae055abfe7e4ab2b7118241","collectionId":"e099fa88-1308-4eaf-b741-46aa3d181830","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae055abfe7e4ab2b7118241"},"entitlements":{},"buildId":"6ae305834064fb4dbead9f03","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"zh-Hans","tag":"API 手册","count":161},{"language":"de","tag":"API-Handbuch","count":161},{"language":"en","tag":"API Manual","count":161},{"language":"es","tag":"Manual de la API","count":161},{"language":"fr","tag":"Manuel API","count":161},{"language":"id","tag":"Panduan API","count":161},{"language":"ja","tag":"APIマニュアル","count":161},{"language":"ko","tag":"API 매뉴얼","count":161},{"language":"pt","tag":"Manual da API","count":161},{"language":"ru","tag":"Руководство API","count":161},{"language":"zh-Hans","tag":"音频系列","count":51},{"language":"de","tag":"Audioserie","count":51},{"language":"en","tag":"Audio Series","count":51},{"language":"es","tag":"Serie de audio","count":51},{"language":"fr","tag":"Série Audio","count":51},{"language":"id","tag":"Seri Audio","count":51},{"language":"ja","tag":"オーディオシリーズ","count":51},{"language":"ko","tag":"오디오 시리즈","count":51},{"language":"pt","tag":"Série de Áudio","count":51},{"language":"ru","tag":"Аудиосерия","count":51},{"language":"zh-Hans","tag":"图像系列","count":49},{"language":"de","tag":"Bildserie","count":49},{"language":"en","tag":"Image Series","count":49},{"language":"es","tag":"Serie de imágenes","count":49},{"language":"fr","tag":"Série Image","count":49},{"language":"id","tag":"Seri Gambar","count":49},{"language":"ja","tag":"画像シリーズ","count":49},{"language":"ko","tag":"이미지 시리즈","count":49},{"language":"pt","tag":"Série de Imagem","count":49},{"language":"ru","tag":"Серия изображений","count":49},{"language":"zh-Hans","tag":"视频系列","count":42},{"language":"de","tag":"Videoserie","count":42},{"language":"en","tag":"Video Series","count":42},{"language":"es","tag":"Serie de video","count":42},{"language":"fr","tag":"Série Vidéo","count":42},{"language":"id","tag":"Seri Video","count":42},{"language":"ja","tag":"動画シリーズ","count":42},{"language":"ko","tag":"비디오 시리즈","count":42},{"language":"pt","tag":"Série de Vídeo","count":42},{"language":"ru","tag":"Видеосерия","count":42},{"language":"zh-Hans","tag":"Suno","count":35},{"language":"de","tag":"Suno","count":35},{"language":"en","tag":"Suno","count":35},{"language":"es","tag":"Suno","count":35},{"language":"fr","tag":"Suno","count":35},{"language":"id","tag":"Suno","count":35},{"language":"ja","tag":"Suno","count":35},{"language":"ko","tag":"Suno","count":35},{"language":"pt","tag":"Suno","count":35},{"language":"ru","tag":"Suno","count":35},{"language":"zh-Hans","tag":"Midjourney","count":19},{"language":"de","tag":"Midjourney","count":19},{"language":"en","tag":"Midjourney","count":19},{"language":"es","tag":"Midjourney","count":19},{"language":"fr","tag":"Midjourney","count":19},{"language":"id","tag":"Midjourney","count":19},{"language":"ja","tag":"Midjourney","count":19},{"language":"ko","tag":"Midjourney","count":19},{"language":"pt","tag":"Midjourney","count":19},{"language":"ru","tag":"Midjourney","count":19},{"language":"zh-Hans","tag":"Flow Music","count":14},{"language":"de","tag":"Flow Music","count":14},{"language":"en","tag":"Flow Music","count":14},{"language":"es","tag":"Flow Music","count":14},{"language":"fr","tag":"Flow Music","count":14},{"language":"id","tag":"Flow Music","count":14},{"language":"ja","tag":"Flow Music","count":14},{"language":"ko","tag":"Flow Music","count":14},{"language":"pt","tag":"Flow Music","count":14},{"language":"ru","tag":"Flow Music","count":14},{"language":"ja","tag":"よくある質問","count":12},{"language":"ko","tag":"자주 묻는 질문","count":12},{"language":"zh-Hans","tag":"集成指南","count":11},{"language":"de","tag":"Integrationen","count":11},{"language":"en","tag":"Integrations","count":11},{"language":"es","tag":"Integraciones","count":11},{"language":"fr","tag":"Intégrations","count":11},{"language":"id","tag":"Integrasi","count":11},{"language":"ja","tag":"統合ガイド","count":11},{"language":"ko","tag":"통합 가이드","count":11},{"language":"pt","tag":"Integrações","count":11},{"language":"ru","tag":"Интеграции","count":11},{"language":"zh-Hans","tag":"文字系列","count":10},{"language":"de","tag":"Textserie","count":10},{"language":"en","tag":"Text Series","count":10},{"language":"es","tag":"Serie de texto","count":10},{"language":"fr","tag":"Série Texte","count":10},{"language":"id","tag":"Seri Teks","count":10},{"language":"ja","tag":"テキストシリーズ","count":10},{"language":"ko","tag":"텍스트 시리즈","count":10},{"language":"pt","tag":"Série de Texto","count":10},{"language":"ru","tag":"Текстовая серия","count":10},{"language":"zh-Hans","tag":"概览","count":7},{"language":"de","tag":"Übersicht","count":7},{"language":"en","tag":"Overview","count":7},{"language":"es","tag":"Visión general","count":7},{"language":"fr","tag":"Aperçu","count":7},{"language":"id","tag":"Ikhtisar","count":7},{"language":"pt","tag":"Visão Geral","count":7},{"language":"ru","tag":"Обзор","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"[id^=param-] a[href^=\"#param-\"]{display:none}[id^=param-] button[data-component-part=field-name]{display:inline-flex;align-items:center;gap:6px;margin:-2px -4px;padding:2px 4px;border-radius:6px;cursor:copy;user-select:text;transition:background-color 150ms ease}[id^=param-] button[data-component-part=field-name]:hover{background:rgb(37 99 235/8%)}[id^=param-] button[data-component-part=field-name]:not([data-copy-state])::after{content:\"\";display:inline-block;flex:0 0 auto;width:16px;height:16px;background-color:rgb(100 116 139);-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E\") center/contain no-repeat;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E\") center/contain no-repeat;transition:background-color 150ms ease}[id^=param-] button[data-component-part=field-name]:hover::after{background-color:rgb(37 99 235)}[id^=param-] button[data-component-part=field-name][data-copy-state=copied]::after{content:\"\";display:inline-block;flex:0 0 auto;width:16px;height:16px;background-color:rgb(5 150 105);-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E\") center/contain no-repeat;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E\") center/contain no-repeat}[id^=param-] button[data-component-part=field-name][data-copy-state=failed]::after{content:\"\";display:inline-block;flex:0 0 auto;width:16px;height:16px;background-color:rgb(220 38 38);-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E\") center/contain no-repeat;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E\") center/contain no-repeat}html.dark [id^=param-] button[data-component-part=field-name]:not([data-copy-state])::after{background-color:rgb(203 213 225)}"}],"page":{"pagePath":"en/api-reference/images/muse-image-ext/generation","slug":"/en/api-reference/images/muse-image-ext/generation","pageMetadata":{"title":"Muse Image Ext Image Generation","description":"Generate one WebP image from text or up to 9 reference images per request.","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/muse-image-ext/generation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Generate one WebP image from text or up to 9 reference images per request.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Heading,Info,Note,ParamField,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Info,{children:_jsxs(_components.p,{children:[`This API is asynchronous. Save the task ID after submission and query `,_jsx(_components.code,{children:`GET /v1/tasks/{task_id}`}),` for status and results. The default submission response contains the ID at `,_jsx(_components.code,{children:`data[0].task_id`}),`.`]})}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`request-headers`,children:`Request headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`Use an APIMart API Key as `,_jsx(_components.code,{children:`Bearer \u003ctoken>`}),`. Both submission and polling require authentication under the same user identity.`]})}),`\n`,_jsx(ParamField,{header:`Idempotency-Key`,type:`string`,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`Strongly recommended. Use a new key for each independent generation (1–191 visible ASCII characters; a UUID is recommended). Replace `,_jsx(_components.code,{children:`\u003cunique-operation-key>`}),` in the examples. After a submission timeout or network failure, retry with the same endpoint, body, response version, and key. Once you have a task ID, only query that task.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-parameters`,children:`Request parameters`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`Must be `,_jsx(_components.code,{children:`muse-image-ext`}),`.`]})}),`\n`,_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsx(_components.p,{children:`A text description of the requested content. Chinese and English are supported. It must not be empty after trimming whitespace, including when reference images are provided.`})}),`\n`,_jsxs(ParamField,{body:`image_urls`,type:`string[]`,id:`param-image-urls`,children:[_jsxs(_components.p,{children:[`Up to 9 nonempty reference image inputs. Accepts public URLs, Data URIs (such as `,_jsx(_components.code,{children:`data:image/png;base64,...`}),`), or raw base64. Omit or send `,_jsx(_components.code,{children:`[]`}),` for text-only generation. PNG, JPEG, and WebP are recommended. Remote URLs must be directly accessible by the server without browser login cookies.`]}),_jsxs(_components.p,{children:[`The combined original size of all reference images must not exceed `,_jsx(_components.strong,{children:`11 MiB (11,534,336 bytes)`}),`. This is a total limit, not a per-image limit. Base64 adds request-body overhead. Do not send `,_jsx(_components.code,{children:`blob:`}),` URLs, local file paths, or `,_jsx(_components.code,{children:`File`}),` objects.`]})]}),`\n`,_jsxs(ParamField,{body:`aspect_ratio`,type:`string`,id:`param-aspect-ratio`,children:[_jsxs(_components.p,{children:[`Supports the seven ratios below. If omitted, text-to-image defaults to `,_jsx(_components.code,{children:`1:1`}),`; generation with references follows their composition. An explicit ratio overrides this behavior. For automatic selection, omit this field; do not send `,_jsx(_components.code,{children:`\"auto\"`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`1:1`}),`, `,_jsx(_components.code,{children:`16:9`}),`, `,_jsx(_components.code,{children:`9:16`}),`, `,_jsx(_components.code,{children:`4:3`}),`, `,_jsx(_components.code,{children:`3:4`}),`, `,_jsx(_components.code,{children:`3:2`}),`, `,_jsx(_components.code,{children:`2:3`})]})]}),`\n`,_jsx(ParamField,{body:`size`,type:`string`,id:`param-size`,children:_jsxs(_components.p,{children:[`Compatibility field accepting the seven ratios above or `,_jsx(_components.code,{children:`auto`}),`; pixel sizes such as `,_jsx(_components.code,{children:`1024x1024`}),` are unsupported. Sending only `,_jsx(_components.code,{children:`size: \"auto\"`}),` is equivalent to not specifying a ratio. Prefer `,_jsx(_components.code,{children:`aspect_ratio`}),`. If both are valid, `,_jsx(_components.code,{children:`aspect_ratio`}),` takes precedence, but each field is validated independently: a valid ratio cannot override an invalid `,_jsx(_components.code,{children:`size`}),`.`]})}),`\n`,_jsx(ParamField,{body:`n`,type:`integer`,default:`1`,id:`param-n`,children:_jsxs(_components.p,{children:[`Only one result per request. The only accepted value is the number `,_jsx(_components.code,{children:`1`}),`. Explicit `,_jsx(_components.code,{children:`0`}),`, negative values, or values above `,_jsx(_components.code,{children:`1`}),` cause an error.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Returns a WebP URL. The model determines image dimensions; pixel sizes and 1K / 2K / 4K tiers cannot be selected. Do not send a nonempty `,_jsx(_components.code,{children:`resolution`}),` or any duration fields.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`other-optional-parameters`,children:`Other optional parameters`}),`\n`,_jsx(ParamField,{body:`webhook`,type:`string`,id:`param-webhook`,children:_jsxs(_components.p,{children:[`Backend base URL for task notifications. The platform removes trailing slashes and appends `,_jsx(_components.code,{children:`/callback`}),`: for example, `,_jsx(_components.code,{children:`https://your-backend.example/muse`}),` becomes `,_jsx(_components.code,{children:`https://your-backend.example/muse/callback`}),`. Omit when using polling only.`]})}),`\n`,_jsx(ParamField,{body:`language`,type:`string`,id:`param-language`,children:_jsxs(_components.p,{children:[`Controls Webhook error-message language, not generated content. Supported values: `,_jsx(_components.code,{children:`zh`}),`, `,_jsx(_components.code,{children:`en`}),`, `,_jsx(_components.code,{children:`ja`}),`, `,_jsx(_components.code,{children:`ko`}),`, `,_jsx(_components.code,{children:`ru`}),`, `,_jsx(_components.code,{children:`fr`}),`, `,_jsx(_components.code,{children:`de`}),`, `,_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`pt`}),`, `,_jsx(_components.code,{children:`es`}),`. Regional tags such as `,_jsx(_components.code,{children:`zh-CN`}),` are not accepted. For polling, pass the language separately in the GET query string.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`generation-with-reference-images`,children:`Generation with reference images`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"muse-image-ext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Keep the cup from the reference image and place it on a wooden cafe table in warm natural light\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"image_urls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-cdn.example/cup.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Replace the example URL with an accessible image URL. This example omits the ratio to follow the reference composition; add `,_jsx(_components.code,{children:`aspect_ratio`}),` for a fixed ratio. For multiple references, add inputs to `,_jsx(_components.code,{children:`image_urls`}),`, up to 9 total.`]}),`\n`,_jsx(Heading,{level:`2`,id:`submission-response`,children:`Submission response`}),`\n`,_jsxs(_components.p,{children:[`The default response is HTTP `,_jsx(_components.code,{children:`200`}),`, with `,_jsx(_components.code,{children:`data`}),` as an array. `,_jsx(_components.code,{children:`submitted`}),` means the task was accepted, not completed. Save `,_jsx(_components.code,{children:`data[0].task_id`}),`, then query the task.`]}),`\n`,_jsxs(Accordion,{title:`Optional response version: 2026-07-27`,id:`optional-response-version-2026-07-27`,children:[_jsxs(_components.p,{children:[`With the header `,_jsx(_components.code,{children:`X-APIMart-Response-Version: 2026-07-27`}),`, submission returns HTTP `,_jsx(_components.code,{children:`202`}),`. Read the task ID from `,_jsx(_components.code,{children:`data.id`}),` and the polling path from `,_jsx(_components.code,{children:`data.poll_url`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`202`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"task_01K...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"generation.task\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pending\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"progress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"poll_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/v1/tasks/task_01K...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`This version does not change the GET response structure. Do not add this header while continuing to parse submission responses as `,_jsx(_components.code,{children:`data[0].task_id`}),`.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`query-task-status-and-results`,children:`Query task status and results`}),`\n`,_jsxs(_components.p,{children:[`Use the complete task ID returned on submission and the same user identity. `,_jsx(_components.code,{children:`language`}),` is optional and controls error-message language. See `,_jsx(_components.a,{href:`/en/api-reference/tasks/status`,children:`Task status`}),` for all fields.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.apimart.ai/v1/tasks/\u003ctask_id>?language=en'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003ctoken>'`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Poll every 5 seconds, with at most one query in flight per task. A client timeout or stopped polling does not cancel the server task. Save the task ID and resume GET queries later; do not automatically submit a new generation.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`data.status`})}),_jsx(_components.th,{children:`Action`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pending`}),` / `,_jsx(_components.code,{children:`processing`})]}),_jsx(_components.td,{children:`Queued or processing; continue polling.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed`})}),_jsx(_components.td,{children:`Generation succeeded; stop polling and read the result URL.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed`})}),_jsxs(_components.td,{children:[`Generation failed; stop polling and read `,_jsx(_components.code,{children:`data.error.message`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`unknown`}),` / …`]}),_jsx(_components.td,{children:`Status is uncertain. Keep the task ID and retry queries within a bounded limit; do not treat it as success or automatically regenerate.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`data.status`}),` to determine completion. HTTP `,_jsx(_components.code,{children:`200`}),` or `,_jsx(_components.code,{children:`progress: 100`}),` alone does not mean generation succeeded. A `,_jsx(_components.code,{children:`polling_error`}),` during processing is not a terminal failure.`]}),`\n`,_jsx(_components.p,{children:`Example completed query response (result URL is a placeholder):`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"task_01K...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"progress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://cdn.example/generated-image.webp\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`In query responses, `,_jsx(_components.code,{children:`data`}),` is an object and `,_jsx(_components.code,{children:`url`}),` is an array of strings. The first result is at `,_jsx(_components.code,{children:`data.result.images[0].url[0]`}),`. If present, `,_jsx(_components.code,{children:`expires_at`}),` is an expiration timestamp in Unix seconds; save required files before expiry. `,_jsx(_components.code,{children:`actual_time`}),` measures task processing time, not video playback duration.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limitations-and-error-handling`,children:`Limitations and error handling`}),`\n`,_jsxs(_components.p,{children:[`Reference videos, reference audio, masks, first/last-frame controls, extension, and remix are unsupported. `,_jsx(_components.code,{children:`quality`}),` has no effect. Omit `,_jsx(_components.code,{children:`seed`}),`, `,_jsx(_components.code,{children:`negative_prompt`}),`, `,_jsx(_components.code,{children:`width`}),`, `,_jsx(_components.code,{children:`height`}),`, `,_jsx(_components.code,{children:`response_format`}),`, and `,_jsx(_components.code,{children:`output_format`}),`; they are outside this model’s generation contract. `,_jsx(_components.code,{children:`async: false`}),` does not enable synchronous generation, and `,_jsx(_components.code,{children:`stream`}),` does not provide an SSE generation stream.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsxs(_components.th,{children:[`HTTP / `,_jsx(_components.code,{children:`error.code`})]}),_jsx(_components.th,{children:`Action`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`400 / invalid_request_error`})}),_jsx(_components.td,{children:`Check the prompt, reference count, aspect ratio, output count, and fixed output settings.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`409 / idempotency_in_progress`})}),_jsxs(_components.td,{children:[`Wait as directed by `,_jsx(_components.code,{children:`Retry-After`}),`, then retry the original request with the same idempotency key.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`409 / idempotency_key_reused`})}),_jsx(_components.td,{children:`The same key was used for different requests. Correct key handling; use a new key for each independent generation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`409 / idempotency_result_indeterminate`})}),_jsx(_components.td,{children:`Stop automatic resubmission and retain the key and task details for investigation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsxs(_components.td,{children:[`Back off according to `,_jsx(_components.code,{children:`Retry-After`}),` before retrying.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Failed tasks may still return HTTP `,_jsx(_components.code,{children:`200`}),`; inspect `,_jsx(_components.code,{children:`data.status`}),` and `,_jsx(_components.code,{children:`data.error.message`}),`. A network error or `,_jsx(_components.code,{children:`5xx`}),` during submission may occur after acceptance, so do not immediately resubmit with a new key.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Muse Image Ext Image Generation","description":"Generate one WebP image from text or up to 9 reference images per request.","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/muse-image-ext/generation"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Heading,Info,Note,ParamField,RequestExample,ResponseExample,Table}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Info,{children:_jsxs(_components.p,{children:[`This API is asynchronous. Save the task ID after submission and query `,_jsx(_components.code,{children:`GET /v1/tasks/{task_id}`}),` for status and results. The default submission response contains the ID at `,_jsx(_components.code,{children:`data[0].task_id`}),`.`]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.apimart.ai/v1/images/generations`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003ctoken>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Idempotency-Key: \u003cunique-operation-key>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"muse-image-ext\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A red ceramic cup on a white table, soft studio lighting, product photography, no text\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspect_ratio\": \"1:1\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"n\": 1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`18`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.apimart.ai/v1/images/generations\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer \u003ctoken>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cunique-operation-key>\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"muse-image-ext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A red ceramic cup on a white table, soft studio lighting, product photography, no text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspect_ratio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1:1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.json())`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`17`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.apimart.ai/v1/images/generations\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer \u003ctoken>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Accept:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cunique-operation-key>\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"muse-image-ext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"A red ceramic cup on a white table, soft studio lighting, product photography, no text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspect_ratio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"1:1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"submitted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"task_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"task_01K...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`request-headers`,children:`Request headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`Use an APIMart API Key as `,_jsx(_components.code,{children:`Bearer \u003ctoken>`}),`. Both submission and polling require authentication under the same user identity.`]})}),`\n`,_jsx(ParamField,{header:`Idempotency-Key`,type:`string`,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`Strongly recommended. Use a new key for each independent generation (1–191 visible ASCII characters; a UUID is recommended). Replace `,_jsx(_components.code,{children:`\u003cunique-operation-key>`}),` in the examples. After a submission timeout or network failure, retry with the same endpoint, body, response version, and key. Once you have a task ID, only query that task.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-parameters`,children:`Request parameters`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`Must be `,_jsx(_components.code,{children:`muse-image-ext`}),`.`]})}),`\n`,_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsx(_components.p,{children:`A text description of the requested content. Chinese and English are supported. It must not be empty after trimming whitespace, including when reference images are provided.`})}),`\n`,_jsxs(ParamField,{body:`image_urls`,type:`string[]`,id:`param-image-urls`,children:[_jsxs(_components.p,{children:[`Up to 9 nonempty reference image inputs. Accepts public URLs, Data URIs (such as `,_jsx(_components.code,{children:`data:image/png;base64,...`}),`), or raw base64. Omit or send `,_jsx(_components.code,{children:`[]`}),` for text-only generation. PNG, JPEG, and WebP are recommended. Remote URLs must be directly accessible by the server without browser login cookies.`]}),_jsxs(_components.p,{children:[`The combined original size of all reference images must not exceed `,_jsx(_components.strong,{children:`11 MiB (11,534,336 bytes)`}),`. This is a total limit, not a per-image limit. Base64 adds request-body overhead. Do not send `,_jsx(_components.code,{children:`blob:`}),` URLs, local file paths, or `,_jsx(_components.code,{children:`File`}),` objects.`]})]}),`\n`,_jsxs(ParamField,{body:`aspect_ratio`,type:`string`,id:`param-aspect-ratio`,children:[_jsxs(_components.p,{children:[`Supports the seven ratios below. If omitted, text-to-image defaults to `,_jsx(_components.code,{children:`1:1`}),`; generation with references follows their composition. An explicit ratio overrides this behavior. For automatic selection, omit this field; do not send `,_jsx(_components.code,{children:`\"auto\"`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`1:1`}),`, `,_jsx(_components.code,{children:`16:9`}),`, `,_jsx(_components.code,{children:`9:16`}),`, `,_jsx(_components.code,{children:`4:3`}),`, `,_jsx(_components.code,{children:`3:4`}),`, `,_jsx(_components.code,{children:`3:2`}),`, `,_jsx(_components.code,{children:`2:3`})]})]}),`\n`,_jsx(ParamField,{body:`size`,type:`string`,id:`param-size`,children:_jsxs(_components.p,{children:[`Compatibility field accepting the seven ratios above or `,_jsx(_components.code,{children:`auto`}),`; pixel sizes such as `,_jsx(_components.code,{children:`1024x1024`}),` are unsupported. Sending only `,_jsx(_components.code,{children:`size: \"auto\"`}),` is equivalent to not specifying a ratio. Prefer `,_jsx(_components.code,{children:`aspect_ratio`}),`. If both are valid, `,_jsx(_components.code,{children:`aspect_ratio`}),` takes precedence, but each field is validated independently: a valid ratio cannot override an invalid `,_jsx(_components.code,{children:`size`}),`.`]})}),`\n`,_jsx(ParamField,{body:`n`,type:`integer`,default:`1`,id:`param-n`,children:_jsxs(_components.p,{children:[`Only one result per request. The only accepted value is the number `,_jsx(_components.code,{children:`1`}),`. Explicit `,_jsx(_components.code,{children:`0`}),`, negative values, or values above `,_jsx(_components.code,{children:`1`}),` cause an error.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Returns a WebP URL. The model determines image dimensions; pixel sizes and 1K / 2K / 4K tiers cannot be selected. Do not send a nonempty `,_jsx(_components.code,{children:`resolution`}),` or any duration fields.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`other-optional-parameters`,children:`Other optional parameters`}),`\n`,_jsx(ParamField,{body:`webhook`,type:`string`,id:`param-webhook`,children:_jsxs(_components.p,{children:[`Backend base URL for task notifications. The platform removes trailing slashes and appends `,_jsx(_components.code,{children:`/callback`}),`: for example, `,_jsx(_components.code,{children:`https://your-backend.example/muse`}),` becomes `,_jsx(_components.code,{children:`https://your-backend.example/muse/callback`}),`. Omit when using polling only.`]})}),`\n`,_jsx(ParamField,{body:`language`,type:`string`,id:`param-language`,children:_jsxs(_components.p,{children:[`Controls Webhook error-message language, not generated content. Supported values: `,_jsx(_components.code,{children:`zh`}),`, `,_jsx(_components.code,{children:`en`}),`, `,_jsx(_components.code,{children:`ja`}),`, `,_jsx(_components.code,{children:`ko`}),`, `,_jsx(_components.code,{children:`ru`}),`, `,_jsx(_components.code,{children:`fr`}),`, `,_jsx(_components.code,{children:`de`}),`, `,_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`pt`}),`, `,_jsx(_components.code,{children:`es`}),`. Regional tags such as `,_jsx(_components.code,{children:`zh-CN`}),` are not accepted. For polling, pass the language separately in the GET query string.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`generation-with-reference-images`,children:`Generation with reference images`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"muse-image-ext\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Keep the cup from the reference image and place it on a wooden cafe table in warm natural light\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"image_urls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-cdn.example/cup.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Replace the example URL with an accessible image URL. This example omits the ratio to follow the reference composition; add `,_jsx(_components.code,{children:`aspect_ratio`}),` for a fixed ratio. For multiple references, add inputs to `,_jsx(_components.code,{children:`image_urls`}),`, up to 9 total.`]}),`\n`,_jsx(Heading,{level:`2`,id:`submission-response`,children:`Submission response`}),`\n`,_jsxs(_components.p,{children:[`The default response is HTTP `,_jsx(_components.code,{children:`200`}),`, with `,_jsx(_components.code,{children:`data`}),` as an array. `,_jsx(_components.code,{children:`submitted`}),` means the task was accepted, not completed. Save `,_jsx(_components.code,{children:`data[0].task_id`}),`, then query the task.`]}),`\n`,_jsxs(Accordion,{title:`Optional response version: 2026-07-27`,id:`optional-response-version-2026-07-27`,children:[_jsxs(_components.p,{children:[`With the header `,_jsx(_components.code,{children:`X-APIMart-Response-Version: 2026-07-27`}),`, submission returns HTTP `,_jsx(_components.code,{children:`202`}),`. Read the task ID from `,_jsx(_components.code,{children:`data.id`}),` and the polling path from `,_jsx(_components.code,{children:`data.poll_url`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`202`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"task_01K...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"generation.task\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pending\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"progress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"poll_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/v1/tasks/task_01K...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`This version does not change the GET response structure. Do not add this header while continuing to parse submission responses as `,_jsx(_components.code,{children:`data[0].task_id`}),`.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`query-task-status-and-results`,children:`Query task status and results`}),`\n`,_jsxs(_components.p,{children:[`Use the complete task ID returned on submission and the same user identity. `,_jsx(_components.code,{children:`language`}),` is optional and controls error-message language. See `,_jsx(_components.a,{href:`/en/api-reference/tasks/status`,children:`Task status`}),` for all fields.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.apimart.ai/v1/tasks/\u003ctask_id>?language=en'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003ctoken>'`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Poll every 5 seconds, with at most one query in flight per task. A client timeout or stopped polling does not cancel the server task. Save the task ID and resume GET queries later; do not automatically submit a new generation.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`data.status`})}),_jsx(_components.th,{children:`Action`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pending`}),` / `,_jsx(_components.code,{children:`processing`})]}),_jsx(_components.td,{children:`Queued or processing; continue polling.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed`})}),_jsx(_components.td,{children:`Generation succeeded; stop polling and read the result URL.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed`})}),_jsxs(_components.td,{children:[`Generation failed; stop polling and read `,_jsx(_components.code,{children:`data.error.message`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`unknown`}),` / …`]}),_jsx(_components.td,{children:`Status is uncertain. Keep the task ID and retry queries within a bounded limit; do not treat it as success or automatically regenerate.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`data.status`}),` to determine completion. HTTP `,_jsx(_components.code,{children:`200`}),` or `,_jsx(_components.code,{children:`progress: 100`}),` alone does not mean generation succeeded. A `,_jsx(_components.code,{children:`polling_error`}),` during processing is not a terminal failure.`]}),`\n`,_jsx(_components.p,{children:`Example completed query response (result URL is a placeholder):`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"task_01K...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"progress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://cdn.example/generated-image.webp\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`In query responses, `,_jsx(_components.code,{children:`data`}),` is an object and `,_jsx(_components.code,{children:`url`}),` is an array of strings. The first result is at `,_jsx(_components.code,{children:`data.result.images[0].url[0]`}),`. If present, `,_jsx(_components.code,{children:`expires_at`}),` is an expiration timestamp in Unix seconds; save required files before expiry. `,_jsx(_components.code,{children:`actual_time`}),` measures task processing time, not video playback duration.`]}),`\n`,_jsx(Heading,{level:`2`,id:`limitations-and-error-handling`,children:`Limitations and error handling`}),`\n`,_jsxs(_components.p,{children:[`Reference videos, reference audio, masks, first/last-frame controls, extension, and remix are unsupported. `,_jsx(_components.code,{children:`quality`}),` has no effect. Omit `,_jsx(_components.code,{children:`seed`}),`, `,_jsx(_components.code,{children:`negative_prompt`}),`, `,_jsx(_components.code,{children:`width`}),`, `,_jsx(_components.code,{children:`height`}),`, `,_jsx(_components.code,{children:`response_format`}),`, and `,_jsx(_components.code,{children:`output_format`}),`; they are outside this model’s generation contract. `,_jsx(_components.code,{children:`async: false`}),` does not enable synchronous generation, and `,_jsx(_components.code,{children:`stream`}),` does not provide an SSE generation stream.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsxs(_components.th,{children:[`HTTP / `,_jsx(_components.code,{children:`error.code`})]}),_jsx(_components.th,{children:`Action`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`400 / invalid_request_error`})}),_jsx(_components.td,{children:`Check the prompt, reference count, aspect ratio, output count, and fixed output settings.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`409 / idempotency_in_progress`})}),_jsxs(_components.td,{children:[`Wait as directed by `,_jsx(_components.code,{children:`Retry-After`}),`, then retry the original request with the same idempotency key.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`409 / idempotency_key_reused`})}),_jsx(_components.td,{children:`The same key was used for different requests. Correct key handling; use a new key for each independent generation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`409 / idempotency_result_indeterminate`})}),_jsx(_components.td,{children:`Stop automatic resubmission and retain the key and task details for investigation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsxs(_components.td,{children:[`Back off according to `,_jsx(_components.code,{children:`Retry-After`}),` before retrying.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Failed tasks may still return HTTP `,_jsx(_components.code,{children:`200`}),`; inspect `,_jsx(_components.code,{children:`data.status`}),` and `,_jsx(_components.code,{children:`data.error.message`}),`. A network error or `,_jsx(_components.code,{children:`5xx`}),` during submission may occur after acceptance, so do not immediately resubmit with a new key.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Muse Image Ext Image Generation","description":"Generate one WebP image from text or up to 9 reference images per request.","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/muse-image-ext/generation"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Request headers","slug":"request-headers","depth":2,"children":[]},{"title":"Request parameters","slug":"request-parameters","depth":2,"children":[{"title":"Other optional parameters","slug":"other-optional-parameters","depth":3,"children":[]}]},{"title":"Generation with reference images","slug":"generation-with-reference-images","depth":2,"children":[]},{"title":"Submission response","slug":"submission-response","depth":2,"children":[]},{"title":"Query task status and results","slug":"query-task-status-and-results","depth":2,"children":[]},{"title":"Limitations and error handling","slug":"limitations-and-error-handling","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"12\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --request\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --url\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.apimart.ai/v1/images/generations\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Authorization: Bearer \u0026#x3C;token>'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Content-Type: application/json'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Accept: application/json'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Idempotency-Key: \u0026#x3C;unique-operation-key>'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --data\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"muse-image-ext\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\": \"A red ceramic cup on a white table, soft studio lighting, product photography, no text\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"aspect_ratio\": \"1:1\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"n\": 1\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"18\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.apimart.ai/v1/images/generations\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer \u0026#x3C;token>\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Accept\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Idempotency-Key\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u0026#x3C;unique-operation-key>\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"muse-image-ext\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"A red ceramic cup on a white table, soft studio lighting, product photography, no text\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"aspect_ratio\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"1:1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"n\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response.raise_for_status()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(response.json())\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> response\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://api.apimart.ai/v1/images/generations\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> Authorization:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Bearer \u0026#x3C;token>\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> Accept:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Idempotency-Key\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"\u0026#x3C;unique-operation-key>\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"muse-image-ext\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"A red ceramic cup on a white table, soft studio lighting, product photography, no text\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"aspect_ratio\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"1:1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"n\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 1\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> })\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">if\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">!\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">ok\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">throw\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> new\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> Error\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">text\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">());\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">());\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"9\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">200\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"submitted\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"task_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"task_01K...\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Muse Image Ext Image Generation","path":"/v1/images/generations","servers":[{"url":"https://api.apimart.ai"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"Use an APIMart API Key as `Bearer \u003ctoken>` . Both submission and polling require authentication under the same user identity.","required":true}]},"Idempotency-Key":{"schema":[{"type":"string","description":"Strongly recommended. Use a new key for each independent generation (1–191 visible ASCII characters; a UUID is recommended). Replace `\u003cunique-operation-key>` in the examples. After a submission timeout or network failure, retry with the same endpoint, body, response version, and key. Once you have a task ID, only query that task."}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"model":[{"type":"string","description":"Must be `muse-image-ext` .","required":true}],"prompt":[{"type":"string","description":"A text description of the requested content. Chinese and English are supported. It must not be empty after trimming whitespace, including when reference images are provided.","required":true}],"image_urls":[{"type":"array","items":[{"type":"string"}],"description":"Up to 9 nonempty reference image inputs. Accepts public URLs, Data URIs (such as `data:image/png;base64,...` ), or raw base64. Omit or send `[]` for text-only generation. PNG, JPEG, and WebP are recommended. Remote URLs must be directly accessible by the server without browser login cookies. The combined original size of all reference images must not exceed 11 MiB (11,534,336 bytes) . This is a total limit, not a per-image limit. Base64 adds request-body overhead. Do not send `blob:` URLs, local file paths, or `File` objects."}],"aspect_ratio":[{"type":"string","description":"Supports the seven ratios below. If omitted, text-to-image defaults to `1:1` ; generation with references follows their composition. An explicit ratio overrides this behavior. For automatic selection, omit this field; do not send `\"auto\"` . `1:1` , `16:9` , `9:16` , `4:3` , `3:4` , `3:2` , `2:3`"}],"size":[{"type":"string","description":"Compatibility field accepting the seven ratios above or `auto` ; pixel sizes such as `1024x1024` are unsupported. Sending only `size: \"auto\"` is equivalent to not specifying a ratio. Prefer `aspect_ratio` . If both are valid, `aspect_ratio` takes precedence, but each field is validated independently: a valid ratio cannot override an invalid `size` ."}],"n":[{"type":"integer","description":"Only one result per request. The only accepted value is the number `1` . Explicit `0` , negative values, or values above `1` cause an error."}],"webhook":[{"type":"string","description":"Backend base URL for task notifications. The platform removes trailing slashes and appends `/callback` : for example, `https://your-backend.example/muse` becomes `https://your-backend.example/muse/callback` . Omit when using polling only."}],"language":[{"type":"string","description":"Controls Webhook error-message language, not generated content. Supported values: `zh` , `en` , `ja` , `ko` , `ru` , `fr` , `de` , `id` , `pt` , `es` . Regional tags such as `zh-CN` are not accepted. For polling, pass the language separately in the GET query string."}]}}],"examples":{"example":{"value":{"model":"\u003cstring>","prompt":"\u003cstring>","image_urls":["\u003cstring>"],"aspect_ratio":"\u003cstring>","size":"\u003cstring>","n":123,"webhook":"\u003cstring>","language":"\u003cstring>"}}}}}},"response":{},"deprecated":false}},"jsLinks":["/_mintlify/custom/apicore/1f7e29c94a916812/cn-domain-rewrite.js","/_mintlify/custom/apicore/afc6076845564106/param-field-copy.js"],"subdomain":"apicore","siteName":"APIMart","title":"Muse Image Ext Image Generation - APIMart","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en/api-reference/images/muse-image-ext/generation","matchLevel":0},"zh-Hans":{"href":"/cn/api-reference/images/muse-image-ext/generation","matchLevel":1},"ja":{"href":"/ja/api-reference/images/muse-image-ext/generation","matchLevel":1},"ko":{"href":"/ko/api-reference/images/muse-image-ext/generation","matchLevel":1},"ru":{"href":"/ru/api-reference/images/muse-image-ext/generation","matchLevel":1},"de":{"href":"/de/api-reference/images/muse-image-ext/generation","matchLevel":1},"fr":{"href":"/fr/api-reference/images/muse-image-ext/generation","matchLevel":1},"pt":{"href":"/pt/api-reference/images/muse-image-ext/generation","matchLevel":1},"id":{"href":"/id/api-reference/images/muse-image-ext/generation","matchLevel":1},"es":{"href":"/es/api-reference/images/muse-image-ext/generation","matchLevel":1}}},"lastModified":"2026-10-29T08:37:32.796Z","originalFileLocation":"en/api-reference/images/muse-image-ext/generation.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate one WebP image from text or up to 9 reference images per request.\">\u003cmeta data-mint-head name=\"keywords\" content=\"OpenAI compatible, API gateway, GPT-5, Claude, Gemini, multi-provider, transparent pricing, SLA\">\u003cmeta data-mint-head name=\"application-name\" content=\"APIMart\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Muse Image Ext Image Generation - APIMart\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate one WebP image from text or up to 9 reference images per request.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"APIMart\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://apicore.mintlify.app/_mintlify/api/og/v2?division=Muse+Image+Ext\u0026amp;title=Muse+Image+Ext+Image+Generation\u0026amp;description=Generate+one+WebP+image+from+text+or+up+to+9+reference+images+per+request.\u0026amp;theme=85f832f8b30837d0268a5e67\u0026amp;signature=4880b8dae779d2cd2d40da57e1b6989fdaf7061b29776507f047a010aa4c76d6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Muse Image Ext Image Generation - APIMart\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate one WebP image from text or up to 9 reference images per request.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://apicore.mintlify.app/_mintlify/api/og/v2?division=Muse+Image+Ext\u0026amp;title=Muse+Image+Ext+Image+Generation\u0026amp;description=Generate+one+WebP+image+from+text+or+up+to+9+reference+images+per+request.\u0026amp;theme=85f832f8b30837d0268a5e67\u0026amp;signature=4880b8dae779d2cd2d40da57e1b6989fdaf7061b29776507f047a010aa4c76d6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/apicore/lN2mX6cSovqJeXFa/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"APIMart\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@APIMart_\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/images/muse-image-ext/generation.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://docs.apimart.ai/cn/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.apimart.ai/ja/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.apimart.ai/ko/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ru\" href=\"https://docs.apimart.ai/ru/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://docs.apimart.ai/de/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.apimart.ai/fr/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt\" href=\"https://docs.apimart.ai/pt/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"id\" href=\"https://docs.apimart.ai/id/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.apimart.ai/es/api-reference/images/muse-image-ext/generation\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.apimart.ai/#organization\",\"name\":\"APIMart\",\"url\":\"https://docs.apimart.ai\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.apimart.ai#website\",\"name\":\"APIMart\",\"url\":\"https://docs.apimart.ai\",\"publisher\":{\"@id\":\"https://docs.apimart.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation#webpage\",\"url\":\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation\",\"name\":\"Muse Image Ext Image Generation\",\"description\":\"Generate one WebP image from text or up to 9 reference images per request.\",\"dateModified\":\"2026-10-29T08:37:32.796Z\",\"isPartOf\":{\"@id\":\"https://docs.apimart.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Image Series\",\"item\":\"https://docs.apimart.ai/en/api-reference/images/gemini-nano-banana-2.1/generation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Muse Image Ext Image Generation\",\"item\":\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation#apireference\",\"headline\":\"Muse Image Ext Image Generation\",\"name\":\"Muse Image Ext Image Generation\",\"description\":\"Generate one WebP image from text or up to 9 reference images per request.\",\"url\":\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.apimart.ai/en/api-reference/images/muse-image-ext/generation#webpage\"},\"dateModified\":\"2026-10-29T08:37:32.796Z\",\"publisher\":{\"@id\":\"https://docs.apimart.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.apimart.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"APIMart\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"APIMart","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"API Manual","groups":[{"group":"Overview","pages":[{"title":"APIMart — OpenAI-Compatible API Gateway (GPT-5, Claude, Gemini)","href":"/en"}]},{"group":"Models","pages":[{"title":"Models List Metadata API","api":"GET https://api.apimart.ai/v1/models","href":"/en/api-reference/texts/models/list"}]},{"group":"Text Series","icon":"text","pages":[{"title":"General Chat API (Default Streaming)","api":"POST https://api.apimart.ai/v1/chat/completions","href":"/en/api-reference/texts/general/chat-completions"},{"title":"General Chat API (Default Non-Streaming)","api":"POST https://api.apimart.ai/api/v1/chat/completions","href":"/en/api-reference/texts/general/chat-completions-nostream"},{"title":"Claude Messages API","api":"POST https://api.apimart.ai/v1/messages","href":"/en/api-reference/texts/general/claude-messages"},{"title":"Gemini Native Format","api":"POST https://api.apimart.ai/v1beta/models/{model}:{method}","href":"/en/api-reference/texts/gemini/quickstart"},{"title":"OpenAI Multimodal Responses API","api":"POST https://api.apimart.ai/v1/responses","href":"/en/api-reference/texts/openai/responses"},{"title":"OpenAI Context Caching Guide","sidebarTitle":"OpenAI Context Caching","icon":"database","href":"/en/api-reference/texts/openai/context-cache"},{"title":"Gemini Context Caching Guide","sidebarTitle":"Gemini Context Caching","icon":"database","href":"/en/api-reference/texts/gemini/context-cache"},{"title":"Claude Context Caching Guide","sidebarTitle":"Claude Context Caching","icon":"database","href":"/en/api-reference/texts/general/claude-context-cache"},{"group":"qwen3.8-max","icon":"message","pages":[{"title":"qwen3.8-max Integration Guide","api":"POST https://api.apimart.ai/v1/chat/completions","href":"/en/api-reference/texts/qwen3.8-max/guide"},{"title":"Model Pricing API","api":"GET https://api.apimart.ai/api/pricing/model?model=qwen3.8-max","href":"/en/api-reference/texts/qwen3.8-max/pricing"}]}]},{"group":"Image Series","icon":"image","pages":[{"group":"Nano banana 2.1","icon":"image","pages":[{"title":"Nano banana 2.1 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gemini-nano-banana-2.1/generation"}]},{"group":"Nano banana2","icon":"image","pages":[{"title":"Nano banana2 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gemini-3.1-flash/generation"},{"title":"Nano Banana Lite Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gemini-3.1-flash/generation-lite"}]},{"group":"Nano banana Pro","icon":"image","pages":[{"title":"Nano banana Pro Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gemini-3-pro/generation"}]},{"group":"Nano banana","icon":"image","pages":[{"title":"Nano banana Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gemini-2.5-flash/generation"}]},{"group":"Imagen-4.0","icon":"image","pages":[{"title":"Imagen 4.0 Apimart Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/imagen-4.0-apimart/generation"}]},{"group":"GPT-Image(1/1.5)","icon":"image","pages":[{"title":"GPT-Image(1/1.5) Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gpt-image-1/generation"}]},{"group":"GPT-Image-2","icon":"image","pages":[{"title":"GPT-Image-2 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gpt-image-2/generation"},{"title":"GPT-Image-2 Official Channel Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gpt-image-2/official"}]},{"group":"GPT-Image-2.5","icon":"image","pages":[{"title":"GPT-Image-2.5 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gpt-image-2.5/generation"}]},{"group":"GPT-Image-2.5 Ext","icon":"image","pages":[{"title":"GPT-Image-2.5 Ext Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/gpt-image-2.5-ext/generation"}]},{"group":"Seedream-4.0","icon":"image","pages":[{"title":"Seedream-4.0 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/seedream-4/generation"}]},{"group":"Seedream-4.5","icon":"image","pages":[{"title":"Seedream-4.5 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/seedream-4.5/generation"}]},{"group":"Seedream-5.0-Lite","icon":"image","pages":[{"title":"Seedream-5.0-Lite Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/seedream-5-lite/generation"}]},{"group":"Seedream-5.0-Pro","icon":"image","pages":[{"title":"Seedream-5.0-Pro Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/seedream-5-0-pro/generation"}]},{"group":"Seedream-5.0-Flash","icon":"image","pages":[{"title":"Seedream-5.0-Flash Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/seedream-5-0-flash/generation"}]},{"group":"Flux Kontext","icon":"image","pages":[{"title":"FLUX Kontext Image Generation and Editing","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/flux-kontext/generation"}]},{"group":"Flux 2.0","icon":"image","pages":[{"title":"FLUX.2 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/flux-2/generation"}]},{"group":"FLUX 3 Image","icon":"image","pages":[{"title":"FLUX 3 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/flux-3-image/generation"}]},{"group":"FLUX 3 Image Klein","icon":"image","pages":[{"title":"FLUX 3 Image Klein Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/flux-3-image-klein/generation"}]},{"group":"Hy-Image-3.5 Preview","icon":"image","pages":[{"title":"Hy-Image-3.5 Preview Image Generation","description":"Text-to-image and up to 5 reference images, with 1K / 2K / 4K output or exact pixel dimensions. One image per request.","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/hy-image-v3.5-preview/generation"}]},{"group":"Muse Image Ext","icon":"image","pages":[{"title":"Muse Image Ext Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/muse-image-ext/generation"}]},{"group":"MAI-Image-2.6","icon":"image","pages":[{"title":"MAI-Image-2.6 Image Generation","description":"Text-to-image, single-image editing, composition with up to 5 reference images, and web grounding. Available in high-quality and Flash versions.","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/mai-image-2.6/generation"}]},{"group":"Qwen Image 2.0","icon":"image","pages":[{"title":"Qwen Image 2.0 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/qwen-image/generation"}]},{"group":"Qwen Image 3.0","icon":"image","pages":[{"title":"Qwen Image 3.0 Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/qwen-image-3.0/generation"}]},{"group":"Z-Image-Turbo","icon":"image","pages":[{"title":"Z-Image-Turbo Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/z-image-turbo/generation"}]},{"group":"Grok Imagine","icon":"image","pages":[{"title":"Grok Imagine Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/grok-imagine/generation"}]},{"group":"Grok Imagine 2.0 Ext","icon":"image","pages":[{"title":"Grok Imagine 2.0 Ext Image Generation","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/grok-imagine-2.0-ext/generation"},{"title":"Grok Imagine 2.0 Ext Layers and Region Editing","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/grok-imagine-2.0-ext/layer-region-edit"},{"title":"Grok Imagine Image 2.0 Official Generation and Editing","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/grok-imagine-2.0-ext/official"}]},{"group":"wan2.7-image","icon":"image","pages":[{"title":"wan2.7 Image Generation \u0026 Editing","api":"POST https://api.apimart.ai/v1/images/generations","href":"/en/api-reference/images/wan2.7-image/generation"}]},{"group":"Midjourney","icon":"image","pages":[{"title":"Midjourney API overview","href":"/en/api-reference/images/midjourney/generation"},{"title":"Imagine (text-to-image)","api":"POST https://api.apimart.ai/v1/midjourney/generations","href":"/en/api-reference/images/midjourney/imagine"},{"title":"Blend (multi-image blend)","api":"POST https://api.apimart.ai/v1/midjourney/generations/blend","href":"/en/api-reference/images/midjourney/blend"},{"title":"Describe (image to text)","api":"POST https://api.apimart.ai/v1/midjourney/generations/describe","href":"/en/api-reference/images/midjourney/describe"},{"title":"Edits (image edit)","api":"POST https://api.apimart.ai/v1/midjourney/generations/edits","href":"/en/api-reference/images/midjourney/edits"},{"title":"Upscale","api":"POST https://api.apimart.ai/v1/midjourney/generations/upscale","href":"/en/api-reference/images/midjourney/upscale"},{"title":"Variation","api":"POST https://api.apimart.ai/v1/midjourney/generations/variation","href":"/en/api-reference/images/midjourney/variation"},{"title":"High Variation","api":"POST https://api.apimart.ai/v1/midjourney/generations/high-variation","href":"/en/api-reference/images/midjourney/high-variation"},{"title":"Low Variation","api":"POST https://api.apimart.ai/v1/midjourney/generations/low-variation","href":"/en/api-reference/images/midjourney/low-variation"},{"title":"Reroll","api":"POST https://api.apimart.ai/v1/midjourney/generations/reroll","href":"/en/api-reference/images/midjourney/reroll"},{"title":"Zoom","api":"POST https://api.apimart.ai/v1/midjourney/generations/zoom","href":"/en/api-reference/images/midjourney/zoom"},{"title":"Pan","api":"POST https://api.apimart.ai/v1/midjourney/generations/pan","href":"/en/api-reference/images/midjourney/pan"},{"title":"Inpaint","api":"POST https://api.apimart.ai/v1/midjourney/generations/inpaint","href":"/en/api-reference/images/midjourney/inpaint"},{"title":"Modal (submit parameters)","api":"POST https://api.apimart.ai/v1/midjourney/generations/modal","href":"/en/api-reference/images/midjourney/modal"},{"title":"Video (image-to-video)","api":"POST https://api.apimart.ai/v1/midjourney/generations/video","href":"/en/api-reference/images/midjourney/video"},{"title":"Remix (reshape, v8.1 / v8.2 only)","api":"POST https://api.apimart.ai/v1/midjourney/generations/remix-strong","href":"/en/api-reference/images/midjourney/remix"},{"title":"Get task","api":"GET https://api.apimart.ai/v1/midjourney/{task_id}","href":"/en/api-reference/images/midjourney/query"},{"title":"Best Practices","href":"/en/api-reference/images/midjourney/best-practices"},{"title":"End-to-End Workflow Examples","href":"/en/api-reference/images/midjourney/workflow"}]}]},{"group":"Video Series","icon":"video","pages":[{"group":"seedance-1-0-pro","icon":"video","pages":[{"title":"seedance-1-0-pro Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/doubao/generation"}]},{"group":"seedance-1-5-pro","icon":"video","pages":[{"title":"seedance-1-5-pro Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/seedance-1-5-pro/generation"}]},{"group":"seedance-2-0","icon":"video","pages":[{"title":"seedance-2.0 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/seedance-2-0/generation"},{"title":"Virtual Avatar Assets","api":"POST https://api.apimart.ai/v1/seedance2/private-avatar","href":"/en/api-reference/videos/seedance-2-0/private-avatar"}]},{"group":"seedance-2-5","icon":"video","pages":[{"title":"seedance-2.5 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/seedance-2-5/generation"}]},{"group":"VEO3","icon":"video","pages":[{"title":"VEO3 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/veo3/generation"},{"title":"VEO3 Video Remix","api":"POST https://api.apimart.ai/v1/videos/{task_id}/remix","href":"/en/api-reference/videos/veo3/remix"},{"title":"VEO3 Official Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/veo3/generation-official"}]},{"group":"MiniMax-Hailuo-02","icon":"video","pages":[{"title":"MiniMax-Hailuo-02 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/minimax-hailuo/generation"}]},{"group":"MiniMax-Hailuo-2.3","icon":"video","pages":[{"title":"MiniMax-Hailuo-2.3 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/minimax-hailuo-2.3/generation"}]},{"group":"MiniMax-H3","icon":"video","pages":[{"title":"MiniMax-H3 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/minimax-h3/generation"},{"title":"MiniMax-H3-Max Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/minimax-h3/max"},{"title":"MiniMax-H3 Context-IR Prompt Enhancement","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/minimax-h3/context-ir"},{"title":"MiniMax-H3 Regeneration","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/minimax-h3/regeneration"}]},{"group":"FLUX 3 Video","icon":"video","pages":[{"title":"FLUX 3 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/flux-3-video/generation"}]},{"group":"SkyReels V4","icon":"video","pages":[{"title":"SkyReels V4 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/skyreels-v4/generation"}]},{"group":"HappyHorse","icon":"video","pages":[{"title":"HappyHorse 1.0 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/happyhorse-1.0/generation"},{"title":"HappyHorse 1.1 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/happyhorse-1.1/generation"}]},{"group":"Wan3.0","icon":"video","pages":[{"title":"Wan3.0 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/wan3.0-video/generation"}]},{"group":"Wan2.7","icon":"video","pages":[{"title":"Wan2.7 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/wan2.7/generation"},{"title":"Wan2.7-R2V Reference-to-Video","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/wan2.7-r2v/generation"},{"title":"Wan2.7-VideoEdit Video Editing","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/wan2.7-videoedit/generation"}]},{"group":"Wan2.6","icon":"video","pages":[{"title":"Wan2.6 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/wan2.6/generation"},{"title":"wan2.6-i2v-flash Image-to-Video","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/wan2.6/i2v-flash-generation"}]},{"group":"Wan2.5","icon":"video","pages":[{"title":"wan2.5-preview Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/wan2.5/generation"}]},{"group":"Kling 2.6","icon":"video","pages":[{"title":"Kling 2.6 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/kling-v2-6/generation"},{"title":"Kling v2.6 Motion Control Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/kling-v2-6/kling-v2-6-motion-control-generation"}]},{"group":"Kling v3","icon":"video","pages":[{"title":"Kling v3 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/kling-v3/generation"}]},{"group":"Kling 3.0 Turbo","icon":"video","pages":[{"title":"Kling 3.0 Turbo Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/kling-3.0-turbo/generation"}]},{"group":"Kling v3 Omni","icon":"video","pages":[{"title":"Kling v3 Omni Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/kling-v3-omni/generation"}]},{"group":"Kling V4","icon":"video","pages":[{"title":"Kling V4 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/kling-v4/generation"}]},{"group":"Kling Video O1","icon":"video","pages":[{"title":"Kling Video O1 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/kling-video-o1/generation"}]},{"group":"Vidu Q3(pro/turbo)","icon":"video","pages":[{"title":"Vidu Q3(pro/turbo) Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/vidu-q3-pro/generation"}]},{"group":"Vidu Q4 Preview","icon":"video","pages":[{"title":"Vidu Q4 Preview Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/vidu-q4-preview/generation"}]},{"group":"Vidu Q3(mix/standard)","icon":"video","pages":[{"title":"Vidu Q3(mix/standard) Reference-to-Video","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/vidu-q3/generation"}]},{"group":"Grok Imagine","icon":"video","pages":[{"title":"Grok Imagine 1.5 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/grok-imagine/generation"},{"title":"Grok Official Video Models","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/grok-imagine/official"}]},{"group":"Pixverse v6","icon":"video","pages":[{"title":"Pixverse v6 Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/pixverse-v6/generation"}]},{"group":"PixVerse V6 Max","icon":"video","pages":[{"title":"PixVerse V6 Max Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/pixverse-v6-max/generation"}]},{"group":"Muse Video Ext","icon":"video","pages":[{"title":"Muse Video Ext Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/muse-video-ext/generation"}]},{"group":"gemini-omni-1.1-flash-ext","icon":"video","pages":[{"title":"gemini-omni-1.1-flash-ext Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/omni-flash-ext/generation"}]},{"group":"Gemini Omni 1.1 Flash","icon":"video","pages":[{"title":"Gemini Omni 1.1 Flash Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/gemini-omni-1.1-flash/generation"}]},{"group":"Gemini Omni Flash","icon":"video","pages":[{"title":"Gemini Omni Flash Video Generation","api":"POST https://api.apimart.ai/v1/videos/generations","href":"/en/api-reference/videos/gemini-omni-flash-preview/generation"}]}]},{"group":"Audio Series","icon":"microphone","pages":[{"title":"Whisper-1 Audio Transcription","api":"POST https://api.apimart.ai/v1/audio/transcriptions","href":"/en/api-reference/audios/whisper-1"},{"title":"TTS Text-to-Speech","api":"POST https://api.apimart.ai/v1/audio/speech","href":"/en/api-reference/audios/tts"},{"group":"Flow Music","icon":"music","pages":[{"title":"Generate Music","api":"POST https://api.apimart.ai/v1/music/generations","href":"/en/api-reference/audios/flow-music/music"},{"title":"Lyria 3.5 Generate Music","api":"POST https://api.apimart.ai/v1/music/generations","href":"/en/api-reference/audios/flow-music/music-lyria-3-5"},{"title":"Generate Lyrics","api":"POST https://api.apimart.ai/v1/music/generations/lyricsFlowMusic","href":"/en/api-reference/audios/flow-music/lyrics"},{"title":"Extend Music","api":"POST https://api.apimart.ai/v1/music/generations/extendFlowMusic","href":"/en/api-reference/audios/flow-music/extend"},{"title":"Lyria 3.5 Extend Music","api":"POST https://api.apimart.ai/v1/music/generations/extendFlowMusic","href":"/en/api-reference/audios/flow-music/extend-lyria-3-5"},{"title":"Replace Section","api":"POST https://api.apimart.ai/v1/music/generations/replaceFlowMusic","href":"/en/api-reference/audios/flow-music/replace"},{"title":"Lyria 3.5 Replace Section","api":"POST https://api.apimart.ai/v1/music/generations/replaceFlowMusic","href":"/en/api-reference/audios/flow-music/replace-lyria-3-5"},{"title":"Cover Rearrangement","api":"POST https://api.apimart.ai/v1/music/generations/coverFlowMusic","href":"/en/api-reference/audios/flow-music/cover"},{"title":"Lyria 3.5 Cover Rearrangement","api":"POST https://api.apimart.ai/v1/music/generations/coverFlowMusic","href":"/en/api-reference/audios/flow-music/cover-lyria-3-5"},{"title":"Stem Separation","api":"POST https://api.apimart.ai/v1/music/generations/stemsFlowMusic","href":"/en/api-reference/audios/flow-music/stems"},{"title":"Upload Audio","api":"POST https://api.apimart.ai/v1/music/generations/uploadAudioFlowMusic","href":"/en/api-reference/audios/flow-music/upload-audio"},{"title":"Download Audio","api":"POST https://api.apimart.ai/v1/music/generations/downloadAudioFlowMusic","href":"/en/api-reference/audios/flow-music/download-audio"},{"title":"Music Video Rendering","api":"POST https://api.apimart.ai/v1/music/generations/videoClipFlowMusic","href":"/en/api-reference/audios/flow-music/video-clip"},{"title":"Query Task","api":"GET https://api.apimart.ai/v1/music/tasks/{task_id}","href":"/en/api-reference/audios/flow-music/query"}]},{"group":"Suno","icon":"music","pages":[{"title":"Suno V6 General Agreements and Task Inquiry","api":"GET https://api.apimart.ai/v1/music/tasks/{task_id}","href":"/en/api-reference/audios/suno/overview"},{"title":"Generate music","api":"POST https://api.apimart.ai/v1/music/generations","href":"/en/api-reference/audios/suno/generation"},{"title":"Generate lyrics","api":"POST https://api.apimart.ai/v1/music/generations/lyrics","href":"/en/api-reference/audios/suno/lyrics"},{"title":"Inspiration generation (inspo)","api":"POST https://api.apimart.ai/v1/music/generations/inspo","href":"/en/api-reference/audios/suno/inspo"},{"title":"Sound effect generation","api":"POST https://api.apimart.ai/v1/music/generations/sounds","href":"/en/api-reference/audios/suno/sounds"},{"title":"Tag enhancement","api":"POST https://api.apimart.ai/v1/music/generations/upsampleTags","href":"/en/api-reference/audios/suno/upsample-tags"},{"title":"Upload audio","api":"POST https://api.apimart.ai/v1/music/generations/uploadTask","href":"/en/api-reference/audios/suno/upload"},{"title":"Upload Audio and Create a Cover","api":"POST https://api.apimart.ai/v1/music/generations/uploadCover","href":"/en/api-reference/audios/suno/upload-cover"},{"title":"Upload and Extend Audio","api":"POST https://api.apimart.ai/v1/music/generations/uploadExtend","href":"/en/api-reference/audios/suno/upload-extend"},{"title":"Create a Custom Model","api":"POST https://api.apimart.ai/v1/music/generations/createModel","href":"/en/api-reference/audios/suno/create-model"},{"title":"Continuation and extension","api":"POST https://api.apimart.ai/v1/music/generations/extend","href":"/en/api-reference/audios/suno/extend"},{"title":"Style cover","api":"POST https://api.apimart.ai/v1/music/generations/coverSong","href":"/en/api-reference/audios/suno/cover-song"},{"title":"Mastering","api":"POST https://api.apimart.ai/v1/music/generations/remaster","href":"/en/api-reference/audios/suno/remaster"},{"title":"Stem extraction","api":"POST https://api.apimart.ai/v1/music/generations/stems","href":"/en/api-reference/audios/suno/stems"},{"title":"Full stem separation","api":"POST https://api.apimart.ai/v1/music/generations/stemsAll","href":"/en/api-reference/audios/suno/stems-all"},{"title":"Add vocals","api":"POST https://api.apimart.ai/v1/music/generations/addVocals","href":"/en/api-reference/audios/suno/add-vocals"},{"title":"Add accompaniment","api":"POST https://api.apimart.ai/v1/music/generations/addInstrumental","href":"/en/api-reference/audios/suno/add-instrumental"},{"title":"Add stem (add stem)","api":"POST https://api.apimart.ai/v1/music/generations/addStem","href":"/en/api-reference/audios/suno/add-stem"},{"title":"Extract Vox (deprecated)","api":"POST https://api.apimart.ai/v1/music/generations/vox","href":"/en/api-reference/audios/suno/vox"},{"title":"Create voice","api":"POST https://api.apimart.ai/v1/music/generations/createVoice","href":"/en/api-reference/audios/suno/create-voice"},{"title":"Persona","api":"POST https://api.apimart.ai/v1/music/generations/persona","href":"/en/api-reference/audios/suno/persona"},{"title":"Section replacement","api":"POST https://api.apimart.ai/v1/music/generations/replaceMusic","href":"/en/api-reference/audios/suno/replace-music"},{"title":"Remove segment","api":"POST https://api.apimart.ai/v1/music/generations/removeSection","href":"/en/api-reference/audios/suno/remove-section"},{"title":"Crop audio","api":"POST https://api.apimart.ai/v1/music/generations/crop","href":"/en/api-reference/audios/suno/crop"},{"title":"Fade in","api":"POST https://api.apimart.ai/v1/music/generations/fadeIn","href":"/en/api-reference/audios/suno/fade-in"},{"title":"Fade out","api":"POST https://api.apimart.ai/v1/music/generations/fadeOut","href":"/en/api-reference/audios/suno/fade-out"},{"title":"Adjust speed","api":"POST https://api.apimart.ai/v1/music/generations/adjustSpeed","href":"/en/api-reference/audios/suno/adjust-speed"},{"title":"Full song synthesis / concatenation","api":"POST https://api.apimart.ai/v1/music/generations/concat","href":"/en/api-reference/audios/suno/concat"},{"title":"Generate mashup (mashup)","api":"POST https://api.apimart.ai/v1/music/generations/mashup","href":"/en/api-reference/audios/suno/mashup"},{"title":"Sample to song (sample)","api":"POST https://api.apimart.ai/v1/music/generations/sample","href":"/en/api-reference/audios/suno/sample"},{"title":"Generate MIDI","api":"POST https://api.apimart.ai/v1/music/generations/midi","href":"/en/api-reference/audios/suno/midi"},{"title":"Lyrics timeline","api":"POST https://api.apimart.ai/v1/music/generations/alignedLyrics","href":"/en/api-reference/audios/suno/aligned-lyrics"},{"title":"BPM analysis","api":"POST https://api.apimart.ai/v1/music/generations/bpm","href":"/en/api-reference/audios/suno/bpm"},{"title":"Generate music video (MV)","api":"POST https://api.apimart.ai/v1/music/generations/generateMp4","href":"/en/api-reference/audios/suno/generate-mp4"},{"title":"Download Audio Files","api":"POST https://api.apimart.ai/v1/music/generations/download","href":"/en/api-reference/audios/suno/wav"}]}]},{"group":"Moderation Series","icon":"shield-check","pages":[{"group":"omni-moderation-latest","icon":"shield-check","pages":[{"title":"omni-moderation-latest Content Moderation","api":"POST https://api.apimart.ai/v1/moderations","href":"/en/api-reference/moderations/omni-moderation-latest/generation"}]}]},{"group":"Upload Management","icon":"cloud-arrow-up","pages":[{"title":"Upload Image","api":"POST https://api.apimart.ai/v1/uploads/images","href":"/en/api-reference/uploads/images"}]},{"group":"Task Management","icon":"list-check","pages":[{"title":"Get Task Status","api":"GET https://api.apimart.ai/v1/tasks/{task_id}","href":"/en/api-reference/tasks/status"},{"title":"Task Completion Callback (Webhook)","href":"/en/api-reference/tasks/webhook"}]},{"group":"Account Management","icon":"wallet","pages":[{"title":"Query Token Balance","api":"GET https://api.apimart.ai/v1/balance","href":"/en/api-reference/account/token-balance"},{"title":"Query User Balance","api":"GET https://api.apimart.ai/v1/user/balance","href":"/en/api-reference/account/user-balance"},{"title":"Query Usage and Spending","api":"GET https://api.apimart.ai/v1/usage","href":"/en/api-reference/account/usage"}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/en/integrations/chat/chatbox"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/en/quickstart"}]},{"tab":"FAQs","pages":[{"title":"FAQs","href":"/en/faqs"}]}]},{"language":"zh-Hans","pages":[{"title":"zh-Hans","href":"/cn/api-reference/images/muse-image-ext/generation"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/api-reference/images/muse-image-ext/generation"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/api-reference/images/muse-image-ext/generation"}]},{"language":"ru","pages":[{"title":"ru","href":"/ru/api-reference/images/muse-image-ext/generation"}]},{"language":"de","pages":[{"title":"de","href":"/de/api-reference/images/muse-image-ext/generation"}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/api-reference/images/muse-image-ext/generation"}]},{"language":"pt","pages":[{"title":"pt","href":"/pt/api-reference/images/muse-image-ext/generation"}]},{"language":"id","pages":[{"title":"id","href":"/id/api-reference/images/muse-image-ext/generation"}]},{"language":"es","pages":[{"title":"es","href":"/es/api-reference/images/muse-image-ext/generation"}]}]},"title":"Muse Image Ext Image Generation - APIMart","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DmVyH30O.js","utils-BHQqGGOd.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CD-E4BIt.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp5Lq9Ds.js","snippetPresets-C4xAVCFP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CgXVLxUC.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BF8I5oUf.js","shallow-Byd0lWnC.js","getApiPlaygroundDisplay-BGOZG1OK.js","CodeSnippet-CpvQL0CY.js","CodeSnippets-B8wkBKXa.js","Page-CBCH2P7b.js","getPastedJson-Ry3scI3Y.js","icon-D7a9HcdD.js","MethodPill-CJ8pmHhz.js","DuplicateIcon-rh1HJF0t.js","createIcon-DvGznqYs.js","DynamicMarkdown-Cc6AuSHS.js","SectionHeading-B4A0S-ep.js","axios-vUo_bRtp.js"]}