Overview
FLUX-3-IMAGE Image Generationendpoint.create endpoint supported2 localized example text, localized example textimage: | localized example text | Condition | Description |
|---|---|---|---|
| Text-to-Image | If omitted image | Image | |
| Image-to-Image | localized example textimage (1~10 images ) | Reference image+ Prompt, repainting, |
astask:create endpoint returntaskId, query endpointPolling.
FLUX-3-IMAGE Flux 3 imageModel, and FLUX-3-VIDEO (Video Generation)Model, Parameter and.Flux 2, FLUX-3-IMAGE with:
- Resolution as
768SQ/1K/1.5K/2K/4K, Flux 2 (1MP~4MP) - Reference imageup to 10 images,Reference imagelocalized example text
- Aspect ratio15,
autoin Text-to-Image and Image-to-Image can use - supported
nsfw_check, localized example textextra_body.safety_tolerancelocalized example textBase 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": "flux-3-image",
"prompt": "A beautiful sunset over the ocean, oil painting style",
"size": "16:9",
"resolution": "2K"
}'Create Task (Image-to-Image, Reference 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": "flux-3-image",
"prompt": "Transform the image into watercolor style",
"image": ["https://example.com/reference.jpg"],
"size": "auto",
"resolution": "1K"
}'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 FLUX-3-IMAGE task**POST** /v1/images/generations
Create a FLUX-3-IMAGE Image Generationtask.
Content-Type: application/json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | localized example textflux-3-image |
| prompt | string | Yes | Prompt, 3~5000 characters (characters, in as 1 characters) |
| image | string[] | No | Reference imagelist (URL or base64 data URI),up to 10 images; Image-to-Image, exceeds 10 images return ParameterError |
| size | string | No | Aspect ratio, default 1:1.Optional auto and 15:21:9 / 2:1 / 16:9 / 3:2 / 7:5 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 5:7 / 2:3 / 9:16 / 1:2 / 9:21 |
| resolution | string | No | Resolution, Optional768SQ / 1K / 1.5K / 2K / 4K, default 1K, size (768 etc.768SQ).heightsize andquality |
| quality | string | No | quality(field),high etc.2K, localized example text1K localized example text.localized example textresolution whenresolution as, useresolution |
| extra_body.safety_tolerance | integer | No | ,0~4, default 2.,0 localized example text.range return ParameterError |
| extra_body.grounding | boolean | No | grounding, defaulttrue.mustlocalized example texttrue / false, characters ("false")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, Image-to-Image, no field.
-size;resolution.insizelocalized example text2K, will Resolution, default1:1.
- Resolution tier priority:resolution>sizelocalized example text>quality.localized example textsize=16:9+resolution=2K16:9 2K image.
-sizelocalized example textautowhen:Text-to-ImageModel prompt, Image-to-Image number images Reference image.
-size(1024x1024pixel string) will1:1, localized example text.
-resolutionlocalized example text768SQ/1K/1.5K/2K/4Kwill return ParameterError, will.
-imagesupported URL or base64 data URI (data:image/jpeg;base64,...).
- Request output 1 images,nno.
- Model supportednsfw_check/extra_body.nsfw_checker,;extra_body.safety_tolerancelocalized example text.
- image Resolution, Reference image, see below「Billing」.
Request Example
① Text-to-Image
{
"model": "flux-3-image",
"prompt": "A futuristic city at night, neon lights, cyberpunk",
"size": "16:9",
"resolution": "2K"
}② Image-to-Image (single imageReference image, image )
{
"model": "flux-3-image",
"prompt": "Transform this image into watercolor style",
"image": ["https://example.com/ref1.jpg"],
"size": "auto",
"resolution": "1K"
}③ Image-to-Image (multiple imagesReference image, with Parameter)
{
"model": "flux-3-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",
"resolution": "4K",
"extra_body": {
"safety_tolerance": 1,
"grounding": false
}
}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_20261016103000_abc12345",
"status": "processing",
"createdAt": "2026-10-16 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_20261016103000_abc12345",
"status": "success",
"result": [
"https://fc-gw-sh.oss-accelerate.aliyuncs.com/images/2026/10/16/output_001.png"
],
"progress": 100,
"createdAt": "2026-10-16 10:30:00",
"updatedAt": "2026-10-16 10:31:30"
}
}Failure
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20261016103000_abc12345",
"status": "failed",
"errorMsg": "Failure:",
"createdAt": "2026-10-16 10:30:00",
"updatedAt": "2026-10-16 10:30:45"
}
}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-10-16T10:31:30+08:00",
"signature": "a1b2c3d4e5f6...",
"data": {
"taskId": "task_20261016103000_abc12345",
"status": "success",
"result": ["https://fc-gw-sh.oss-accelerate.aliyuncs.com/images/output_001.png"],
"createdAt": "2026-10-16 10:30:00",
"updatedAt": "2026-10-16 10:31:30"
}
}
---
## Billing
**image**:image Resolution (`768SQ` / `1K` / `1.5K` / `2K` / `4K`)images, height height; Text-to-Image and Image-to-Image.not Resolution when default`1K` localized example text.
**Reference imagelocalized example text**:Reference image**localized example text**, 1 images 10 images, image.
Create Taskwhen, taskSuccess after; taskFailure.
localized example text「localized example text」as.
---
## Error Codes
| code | Description |
|------|------|
| 0 | Success |
| 10002 | Parametermissing or malformed (prompt, Reference image exceeds 10 images,`resolution`,`safety_tolerance` 0~4, `extra_body` JSON )|
| 10005 | API Key invalid or missing |
| 30003 | Task not found, taskId|
| 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### Resolution Selection
| resolution | Scenario|
|---|---|
| `768SQ` |,,, image|
| `1K` | default, image,|
| `1.5K` | image, image|
| `2K` | image,,|
| `4K` |, image, image|
`4K` height, recommended`768SQ` or`1K` image and, after prompt height.
### Reference imagerecommended
- Reference image, images Reference image will.
- Reference imageup to 10 images, exceeds will return ParameterError, will.
- Image-to-Imageimage when`size=auto`.
### 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.
### Processing Time Reference
- Text-to-Image / Image-to-Image:Usually 10 ~ 60 seconds
- Resolutionheight, Reference image, when### Prompt recommended
- use,, can ( oil painting, watercolor, digital art etc. )
- Image-to-Image when,prompt localized example text**localized example text**, image
- multiple imagesReference image when,「the first image」「the second image」refer to each image
- supported, Usually