Overview
Muse Image Image Generationendpoint.create endpoint supported2 localized example text, localized example textimage: | localized example text | Condition | Description |
|---|---|---|---|
| Text-to-Image | If omitted image | Image | |
| Reference image-to-Image | localized example textimage (1~9 images ) | Reference image+ Prompt, repainting, |
astask:create endpoint returntaskId, query endpointPolling.
- images, Text-to-Image and Reference image-to-Image,Reference imagelocalized example text
- supported 7 Aspect ratio, with Resolution,
resolution/quality- Request output 1 images, output image as WebP FormatBase URL:https://mm-internal-cn.leonecloud.com
Authentication
All endpoints require a token in the request header for authentication:
Authorization: Bearer {YOUR_AUTH_TOKEN}Quick Start
cURL Example
Create Task (Text-to-Image)
curl -X POST "https://mm-internal-cn.leonecloud.com/v1/images/generations" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"model": "muse-image",
"prompt": "A beautiful sunset over the ocean, oil painting style",
"size": "16:9"
}'Create Task (Reference image-to-Image)
curl -X POST "https://mm-internal-cn.leonecloud.com/v1/images/generations" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"model": "muse-image",
"prompt": "Transform the image into watercolor style",
"image": ["https://example.com/reference.jpg"]
}'Query Task Status
curl -X GET "https://mm-internal-cn.leonecloud.com/v1/images/generations/task_abc123" \
-H "Authorization: Bearer your_auth_token_here"Endpoints
1. create Muse Image task**POST** /v1/images/generations
Create a Muse Image Image Generationtask.
Content-Type: application/json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | localized example textmuse-image |
| prompt | string | Yes | Prompt, supported in, as (Reference image when Required) |
| image | string[] | No | Reference imagelist (URL or base64 data URI),up to 9 images, with Reference image exceeds 11MB; Reference image-to-Image, exceeds 9 images return ParameterError |
| size | string | No | Aspect ratio, Optional 1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3.If omittedorauto when:Text-to-Imagedefault1:1, Reference image-to-ImageReference image image |
| n | integer | No | Number of outputs, supported1, greater than 1 return ParameterError |
| callback_url | string | No | Callback notification URL after the task is complete |
| task_nickname | string | No | Task label, query / when |
Description:
- localized example textimagelocalized example text:If omittedText-to-Image, Reference image-to-Image, no field.
-size7 Aspect ratio ( andauto), (1024x1024pixel string,21:9etc. not ) return ParameterError.
- Model with Resolution,resolution/qualitylocalized example text.
-image11MB with Reference image, single image.
- supportedmaskrepainting,maskreturn ParameterError.
- supportedseed,negative_prompt,width,height,output_formatetc. Parameter,.
- images, Reference image, see below「Billing」.
Request Example
① Text-to-Image
{
"model": "muse-image",
"prompt": "A futuristic city at night, neon lights, cyberpunk",
"size": "16:9"
}② Reference image-to-Image (single imageReference image, image image )
{
"model": "muse-image",
"prompt": "Transform this image into watercolor style",
"image": ["https://example.com/ref1.jpg"]
}③ multiple imagesReference imagelocalized example text
{
"model": "muse-image",
"prompt": "Combine the subject from the first image with the background of the second",
"image": [
"https://example.com/ref1.jpg",
"https://example.com/ref2.jpg"
],
"size": "3:2"
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | Status Code, 0 indicates success |
| msg | string | Message |
| data.taskId | string | Task ID, used to query task status |
| data.status | string | Task Status, fixed to processing |
| data.createdAt | string | Created Time |
Response Example
Success
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20261104103000_abc12345",
"status": "processing",
"createdAt": "2026-11-04 10:30:00"
}
}2. Query Task Status
GET /v1/images/generations/{taskId}
query task execute Status.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| taskId | string | Yes | Task ID |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | Status Code, 0 indicates success |
| msg | string | Message |
| data.taskId | string | Task ID |
| data.status | string | Task Status:processing / success / failed |
| data.result | string[] | image URL list (Successreturned when applicable) |
| data.errorCode | string | Error Codes (Failurereturned when applicable) |
| data.errorMsg | string | Error Message (Failurereturned when applicable) |
| data.progress | int | , 0-100 |
| data.pointConsume | string | (decimal characters) |
| data.taskNickname | string | Task label (create when return ) |
| data.createdAt | string | Created Time (characters) |
| data.updatedAt | string | Updated Time (characters) |
Response Example
Success
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20261104103000_abc12345",
"status": "success",
"result": [
"https://fc-gw-sh.oss-accelerate.aliyuncs.com/images/2026/11/04/output_001.webp"
],
"progress": 100,
"createdAt": "2026-11-04 10:30:00",
"updatedAt": "2026-11-04 10:30:40"
}
}Failure
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20261104103000_abc12345",
"status": "failed",
"errorMsg": "Failure:",
"createdAt": "2026-11-04 10:30:00",
"updatedAt": "2026-11-04 10:30:30"
}
}Callback Notification
task complete (Success or Failure) when, if Create Task when providecallback_url, was provided when creating the task, the system sends a POST request to that URL.
Headers
Content-Type: application/json
X-Funcloud-Event: task.completed
X-Funcloud-Signature: {localized example text}Body (taskindata fieldin, and「Query Task Status」endpointlocalized example textdata ):```json
{
"event": "task.completed",
"timestamp": "2026-11-04T10:30:40+08:00",
"signature": "a1b2c3d4e5f6...",
"data": {
"taskId": "task_20261104103000_abc12345",
"status": "success",
"result": ["https://fc-gw-sh.oss-accelerate.aliyuncs.com/images/output_001.webp"],
"createdAt": "2026-11-04 10:30:00",
"updatedAt": "2026-11-04 10:30:40"
}
}
---
## Billing
**image**:images, Request output 1 images, Text-to-Image and Reference image-to-Image.
**Reference imagelocalized example text**:Reference image**localized example text**, 1 images 9 images,.
Create Taskwhen, taskSuccess after; taskFailure.
localized example text「localized example text」as.
---
## Error Codes
| code | Description |
|------|------|
| 0 | Success |
| 10002 | Parametermissing or malformed (prompt as, Reference image exceeds 9 images,`size` in 7 Aspect ratio,`n` greater than 1,`mask`) |
| 10005 | API Key invalid or missing |
| 30003 | Task not found, taskId|
| 40001 | Insufficient balance, no complete,|
| 40004 |, can after|
| 60001 | Modelcan use, after|
| 90003 | Internal server error |
---
## Best Practices
### -→ If omitted `image`
- with Reference image repainting,,→ localized example text`image` (1 images can )
- image (「A subject+ B localized example text」)→ multiple images`image`, and in prompt Description each image character### Reference imagerecommended
- Reference image, images Reference image will.
- Reference imageup to 9 images, exceeds 11MB, exceeds images will return ParameterError, will.
- Reference image-to-Imageimage image when If omitted`size`.
### Polling Strategy
- First 30 seconds:query every 3 seconds
- 30 seconds ~ 2 minutes:query every 5 seconds
- After 2 minutes:query every 10 seconds
localized example text`callback_url`, taskcomplete after, no Polling.
### Prompt recommended
- use,, can ( oil painting, watercolor, digital art etc. )
- Reference image-to-Imagewhen, prompt**localized example text**, image
- multiple imagesReference image when,「the first image」「the second image」refer to each image
- supported in