Muse Image API
Generate an image from a prompt or up to nine reference images with Muse Image API. Choose a supported aspect ratio or follow the reference aspect ratio, then retrieve one WebP image through the task API.
Service Highlights
- Official Discounts
- Pay-as-you-go
- Fast & Low Latency
No generations yet.
Muse Image API Pricing
Transparent pricing with no hidden fees. Pay only for what you use.
| Variant | GoldCurrent price | Platinum | Diamond | Official | Your savings |
|---|---|---|---|---|---|
muse-image-ext | 0.048Credits(~$0.0048)/pic | 0.0456Credits(~$0.0046)/pic | 0.0432Credits(~$0.0043)/pic | 0.06Credits(~$0.006)/pic | 20% |
* Actual costs are subject to final output.
Build with Muse Image API
Generate an image from a prompt or up to nine reference images with Muse Image API. Choose a supported aspect ratio or follow the reference aspect ratio, then retrieve one WebP image through the task API.
What Muse Image API supports
Generation modes, inputs and output specifications for your application.
Text to image with Muse Image API
Reference images with Muse Image API
Seven aspect ratios for Muse Image
One WebP image from the Muse Image Model
Use muse-image-ext in your requests
Asynchronous tasks with Muse Image API
Muse Image API pricing
Retrieve and save Muse Image results
What you can create with Muse Image API
Plan each brief around the content you want to produce and review the delivered result.
Product scenes with Muse Image API
Campaign concepts with Muse Image
Editorial images with Muse Image API
Reference-led design with muse-image-ext
Social visuals with Muse Image
Image tools powered by Muse Image API
How to get a Muse Image API key and start building
Set up your key, prepare your brief and organize your results.
Get your Muse Image API key
Sign in to APIMart and create a key in API Keys. Keep the key on your server, outside browser code and public repositories.
Prepare a focused creative brief
Describe the intended result and its context. Keep the brief with your request so you can compare revisions.
Review and integrate the output
Check the output against your brief before using it. Keep your selected assets organized for the next stage of production.
Muse Image API examples and integration
Submit muse-image-ext to /v1/images/generations, save the task ID and query GET /v1/tasks/{task_id} for the result.
- 1
Authenticate Muse Image API requests
Store your API key on the server and send it as Authorization: Bearer <key>. Create one Idempotency-Key for each new generation operation.
- 2
Submit a muse-image-ext task
POST to /v1/images/generations with model and prompt. The default response provides data[0].task_id; preserve the same key and body when retrying an interrupted submission.
- 3
Retrieve the Muse Image result
Query GET /v1/tasks/{task_id} until completed or failed. Read data.result.images[0].url[0] on success, or data.error.message on failure; a local wait timeout is not task failure.
See the Muse Image API reference for request and response details.
IDEMPOTENCY_KEY="${IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "muse-image-ext",
"prompt": "A red ceramic cup on a white table, soft studio lighting, product photograph, no text",
"n": 1,
"aspect_ratio": "1:1"
}'import os
import time
import requests
import uuid
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
idempotency_key = os.environ.get("IDEMPOTENCY_KEY") or str(uuid.uuid4())
headers["Idempotency-Key"] = idempotency_key
print("Idempotency-Key:", idempotency_key)
# 1. Submit the generation task
payload = {
"model": "muse-image-ext",
"prompt": "A red ceramic cup on a white table, soft studio lighting, product photograph, no text",
"n": 1,
"aspect_ratio": "1:1"
}
resp = requests.post(f"{API_BASE}/v1/images/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
print("Task ID:", task_id)
# 2. Poll the task until it finishes
for _ in range(60):
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
print(task["result"]["images"][0]["url"][0])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(5)
else:
raise TimeoutError(f"task {task_id} did not finish in time; continue GET polling with this task ID")IDEMPOTENCY_KEY="${IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "muse-image-ext",
"prompt": "Keep the cup from the reference image and place it on a wooden cafe table in warm natural light",
"n": 1,
"image_urls": [
"https://example.com/reference.png"
]
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"Muse Image API parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | Default: — | Required model identifier: muse-image-ext. |
prompt | string | Required | Default: — | A nonempty text prompt after trimming whitespace; required with or without references. Chinese and English are supported. |
image_urls | string[] | Optional | Default: — | Up to nine accessible image URLs, Data URIs or base64 strings; original images total at most 11 MiB. Omit when there are no references. |
aspect_ratio | string | Optional | Default: — | 1:1, 16:9, 9:16, 4:3, 3:4, 3:2 or 2:3. For Auto, omit this field; do not send "auto". Without references the default is 1:1; with references it follows their aspect ratio. |
n | integer | Optional | Default: 1 | Only the number 1 is supported. One request produces one result. |
nsfw_check | boolean | Optional | Default: false | Enable platform content screening before submission. Successful submission does not guarantee that every moderation check has passed. |
Explore the Muse APIs
Choose the Muse page for the type of content your project needs.
Muse Image API FAQ
What is Muse Image API?
Muse Image API supports text-to-image and reference-image generation through APIMart. The muse-image-ext model returns one WebP image per asynchronous task.
Which model ID does Muse Image API use?
Use muse-image-ext, including -ext, as the model value in your request.
How do I get a Muse Image API key?
Sign in to APIMart and create an API key in API Keys. Keep it on your server and send Authorization: Bearer <key> when submitting and querying tasks.
How many reference images does Muse Image support?
Use zero to nine reference images, with a combined original size of at most 11 MiB. Send them in image_urls as accessible URLs, Data URIs or base64; a prompt is required even with references.
Which aspect ratios does Muse Image API support?
Supported ratios are 1:1, 16:9, 9:16, 4:3, 3:4, 3:2 and 2:3. Auto means omitting aspect_ratio: with references the composition follows them, while text-only requests default to 1:1.
Can I choose a Muse Image resolution or pixel size?
No. The model determines the dimensions, and the result is WebP. Do not send a resolution tier or a pixel size such as 1024x1024.
Can Muse Image API generate several images or use a mask?
Each request generates one image; n can only be the number 1. Masks and reference video or audio are not supported by this integration.
What if a Muse Image API task takes longer than the page wait?
Keep its task ID and query it again later. A browser timeout or stopped polling does not cancel the server task; do not create another generation request automatically.
How is Muse Image API pricing calculated?
Review the live pricing for your account before generating. Final task cost and your account statement determine the charge. Each request is billed per image.
Can I keep the results from Muse Image?
Download or archive the delivered files if you need to keep them. If expires_at is returned, save them before that time; an expired link should not trigger another paid generation automatically.
Related Models
Explore more models in the same category.

Hy Image V3.5 Preview
HY Image 3.5 Preview is an image generation and editing model developed by Tencent Hunyuan. It supports text-to-image creation, reference-based generation, and multi-turn editing, allowing users to refine images through conversational instructions. With support for up to 4K output and flexible image dimensions, it offers a versatile tool for creating and refining visual content.
0.192Credits~$0.0192Save 20%
LFlux 3 Image Klein
FLUX 3 Image Klein is a compact, open-weight image generation and editing model developed by Black Forest Labs. It combines text-to-image creation, image editing, and composition using up to 10 reference images in a single model. With support for up to 4K resolution and bounding-box layout control, it gives creators flexible tools to bring their ideas to life.
0.072Credits~$0.0072Save 20%
Mai Image 2.6
MAI-Image-2.6 is Microsoft's image model for text-to-image, single-image editing and composition with up to 5 reference images. It is available in high-quality and Flash versions, with 1K and 2K output and sharp text rendering.
0.32Credits~$0.032Save 20%
Mai Image 2.6 Flash
MAI-Image-2.6 Flash is the Flash version of Microsoft MAI-Image-2.6 for text-to-image and image editing with up to 5 references, 1K/2K PNG output and optional Bing grounding, billed by actual token usage.
0.16Credits~$0.016Save 20%