Image / Flux

FLUX-3-IMAGE Image Generation

Overview

FLUX-3-IMAGE Image Generationendpoint.create endpoint supported2 localized example text, localized example textimage:localized example textConditionDescription
Text-to-ImageIf omitted imageImage
Image-to-Imagelocalized 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 as768SQ / 1K / 1.5K / 2K / 4K, Flux 2 (1MP~4MP)
  • Reference imageup to 10 images,Reference imagelocalized example text
  • Aspect ratio15,auto in Text-to-Image and Image-to-Image can use
  • supportednsfw_check, localized example textextra_body.safety_tolerance localized 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

ParameterTypeRequiredDescription
modelstringYeslocalized example textflux-3-image
promptstringYesPrompt, 3~5000 characters (characters, in as 1 characters)
imagestring[]NoReference imagelist (URL or base64 data URI),up to 10 images; Image-to-Image, exceeds 10 images return ParameterError
sizestringNoAspect 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
resolutionstringNoResolution, Optional768SQ / 1K / 1.5K / 2K / 4K, default 1K, size (768 etc.768SQ).heightsize andquality
qualitystringNoquality(field),high etc.2K, localized example text1K localized example text.localized example textresolution whenresolution as, useresolution
extra_body.safety_toleranceintegerNo,0~4, default 2.,0 localized example text.range return ParameterError
extra_body.groundingbooleanNogrounding, defaulttrue.mustlocalized example texttrue / false, characters ("false")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, Image-to-Image, no field.
- size;resolution.insize localized example text2K, will Resolution, default1:1.
- Resolution tier priority:resolution > size localized example text> quality.localized example textsize=16:9 + resolution=2K 16:9 2K image.
- size localized example textauto when:Text-to-ImageModel prompt, Image-to-Image number images Reference image.
- size (1024x1024 pixel string) will1:1, localized example text.
- resolution localized example text768SQ / 1K / 1.5K / 2K / 4K will return ParameterError, will.
- image supported URL or base64 data URI (data:image/jpeg;base64,...).
- Request output 1 images,n no.
- Model supportednsfw_check / extra_body.nsfw_checker,;extra_body.safety_tolerance localized 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

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_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

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_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
Updated 2026-10-16