Muse Image API
使用 Muse Image API,通过提示词或最多九张参考图生成图片。选择支持的画面比例,或跟随参考图比例,再通过任务接口获取一张 WebP 图片。
服务亮点
- 官方折扣
- 按量计费
- 高速低延
暂无生成记录。
Muse Image API 价格
透明定价,无隐藏费用。按量付费,用多少付多少。
| 型号 | 黄金价当前价格 | 铂金价 | 钻石价 | 官方价 | 为你节省 |
|---|---|---|---|---|---|
muse-image-ext | 0.048Credits(~$0.0048)/张 | 0.0456Credits(~$0.0046)/张 | 0.0432Credits(~$0.0043)/张 | 0.1Credits(~$0.01)/张 | 52% |
* 实际费用以最终输出为准。
使用 Muse Image API 开始创作
使用 Muse Image API,通过提示词或最多九张参考图生成图片。选择支持的画面比例,或跟随参考图比例,再通过任务接口获取一张 WebP 图片。
Muse Image API 支持的功能
了解生成模式、输入要求和输出规格,规划应用接入。
使用 Muse Image API 文生图
为 Muse Image API 提供参考图
Muse Image 的七种画面比例
Muse Image Model 输出单张 WebP
使用 muse-image-ext 调用模型
Muse Image API 异步任务
Muse Image API 实时价格
获取并保存 Muse Image 结果
Muse Image API 使用场景
围绕目标内容准备简报,并对照需求审核生成结果。
使用 Muse Image API 构建商品场景
使用 Muse Image 探索活动创意
使用 Muse Image API 制作文章配图
使用 muse-image-ext 开展参考图设计
使用 Muse Image 制作社交素材
使用 Muse Image API 构建图像工具
如何获取 Muse Image API Key 并开始接入
创建密钥、准备简报,并整理你的创作结果。
获取 Muse Image API Key
登录 APIMart,在 API Keys 中创建密钥。将密钥保存在服务端,不要放入浏览器代码或公开仓库。
准备清晰的创意简报
描述预期结果及其使用背景。将简报与请求一起保存,方便比较不同版本。
审核并整合生成结果
使用前对照简报检查结果。整理选定素材,方便进入下一阶段制作。
Muse Image API 调用示例与接入
向 /v1/images/generations 提交 muse-image-ext,保存任务 ID,再通过 GET /v1/tasks/{task_id} 查询结果。
- 1
为 Muse Image API 请求鉴权
在服务端保存 API Key,并发送 Authorization: Bearer <key>;每次新的生成操作创建一个 Idempotency-Key。
- 2
提交 muse-image-ext 任务
向 /v1/images/generations POST model 与 prompt,默认从 data[0].task_id 获取任务 ID;提交中断后重试须保留原键与请求体。
- 3
获取 Muse Image 结果
通过 GET /v1/tasks/{task_id} 查询至 completed 或 failed;成功读取 data.result.images[0].url[0],失败读取 data.error.message,本地等待超时不等于任务失败。
完整请求和响应说明见Muse Image API 文档。
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": "一只红色陶瓷杯放在白色桌面上,柔和棚拍灯光,产品摄影,无文字",
"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": "一只红色陶瓷杯放在白色桌面上,柔和棚拍灯光,产品摄影,无文字",
"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": "保留参考图中杯子的外观,将背景改为木质咖啡桌,温暖自然光",
"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 参数说明
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
model | string | 必填 | 默认值: — | 必填的模型标识:muse-image-ext。 |
prompt | string | 必填 | 默认值: — | 去除首尾空白后不能为空,支持中英文;有无参考图都必须提供。 |
image_urls | string[] | 可选 | 默认值: — | 最多九个可访问图片 URL、Data URI 或 base64 字符串,原始图片合计不超过 11 MiB;无参考图时省略。 |
aspect_ratio | string | 可选 | 默认值: — | 支持 1:1、16:9、9:16、4:3、3:4、3:2、2:3。自动时省略该字段,不发送 "auto";无图默认 1:1,有图跟随参考图比例。 |
n | integer | 可选 | 默认值: 1 | 只支持数值 1,每个请求返回一个结果。 |
nsfw_check | boolean | 可选 | 默认值: false | 启用平台提交前内容审核;成功提交不代表已保证通过所有审核。 |
探索 Muse API
根据项目所需的内容类型,选择对应的 Muse 页面。
Muse Image API 常见问题
什么是 Muse Image API?
Muse Image API 通过 APIMart 提供文生图与参考图生图。muse-image-ext 每个异步任务返回一张 WebP 图片。
Muse Image API 使用哪个模型 ID?
请求的 model 字段填写完整的 muse-image-ext,包括 -ext 后缀。
如何获取 Muse Image API Key?
登录 APIMart,在 API Keys 创建密钥,将其保存在服务端。提交和查询任务时均使用 Authorization: Bearer <key>。
Muse Image 支持多少张参考图?
支持零至九张参考图,原始大小合计不超过 11 MiB。通过 image_urls 发送可访问 URL、Data URI 或 base64;有参考图也必须填写提示词。
Muse Image API 支持哪些比例?
支持 1:1、16:9、9:16、4:3、3:4、3:2、2:3。自动表示省略 aspect_ratio:有图时跟随参考图比例,纯文字请求默认 1:1。
能否选择 Muse Image 清晰度或像素尺寸?
不能。尺寸由模型决定,结果为 WebP;不要发送清晰度档位或 1024x1024 这类像素尺寸。
Muse Image API 能批量出图或使用遮罩吗?
每个请求只生成一张图片,n 只能是数值 1。本次接入不支持遮罩、参考视频或参考音频。
Muse Image API 任务超过页面等待时间怎么办?
保留任务 ID,稍后继续查询。浏览器超时或停止轮询不代表服务端任务取消,不要自动新建生成请求。
Muse Image API 如何计费?
生成前查看当前账户的实时价格,最终费用以任务 cost 和账户账单为准。 每个请求按张计费。
可以保存 Muse Image 的生成结果吗?
可以下载或归档生成文件。响应提供 expires_at 时,请在对应时间前保存;链接失效不应自动触发新的付费生成。
相关模型
探索同类型的其他模型。

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.0192省 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.0072省 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.032省 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.016省 20%