Skip to main content
POST
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.

Request headers

string
required
Use an APIMart API Key as Bearer <token>. Both submission and polling require authentication under the same user identity.
string
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.

Request parameters

string
required
Must be muse-image-ext.
string
required
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.
string[]
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.
string
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
string
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.
integer
default:"1"
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.

Other optional parameters

string
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.
string
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.

Generation with reference images

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.

Submission response

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.
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.
This version does not change the GET response structure. Do not add this header while continuing to parse submission responses as data[0].task_id.

Query task status and results

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. 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.

Limitations and error handling

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. 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.