Image / Muse

Muse Image Image Generation

Overview

Muse Image Image Generationendpoint.create endpoint supported2 localized example text, localized example textimage:localized example textConditionDescription
Text-to-ImageIf omitted imageImage
Reference image-to-Imagelocalized 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

ParameterTypeRequiredDescription
modelstringYeslocalized example textmuse-image
promptstringYesPrompt, supported in, as (Reference image when Required)
imagestring[]NoReference imagelist (URL or base64 data URI),up to 9 images, with Reference image exceeds 11MB; Reference image-to-Image, exceeds 9 images return ParameterError
sizestringNoAspect 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
nintegerNoNumber of outputs, supported1, greater than 1 return ParameterError
callback_urlstringNoCallback notification URL after the task is complete
task_nicknamestringNoTask label, query / when
Description:
- localized example textimage localized example text:If omittedText-to-Image, Reference image-to-Image, no field.
- size 7 Aspect ratio ( andauto), (1024x1024 pixel string,21:9 etc. not ) return ParameterError.
- Model with Resolution,resolution / quality localized example text.
- image 11MB with Reference image, single image.
- supportedmask repainting,mask return ParameterError.
- supportedseed, negative_prompt, width, height, output_format etc. 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

ParameterTypeDescription
codeintStatus Code, 0 indicates success
msgstringMessage
data.taskIdstringTask ID, used to query task status
data.statusstringTask Status, fixed to processing
data.createdAtstringCreated 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

ParameterTypeRequiredDescription
taskIdstringYesTask ID

Response Parameters

ParameterTypeDescription
codeintStatus Code, 0 indicates success
msgstringMessage
data.taskIdstringTask ID
data.statusstringTask Status:processing / success / failed
data.resultstring[]image URL list (Successreturned when applicable)
data.errorCodestringError Codes (Failurereturned when applicable)
data.errorMsgstringError Message (Failurereturned when applicable)
data.progressint, 0-100
data.pointConsumestring(decimal characters)
data.taskNicknamestringTask label (create when return )
data.createdAtstringCreated Time (characters)
data.updatedAtstringUpdated 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
Updated 2026-11-04