About this endpoint
What it does
Starts a text-to-image generation request using Flux.1-Schnell. You send a prompt plus optional generation settings, and the endpoint returns a task identifier to track the job.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| prompt | String | Yes | The text description of the image to generate. |
| seed | Integer | No | Random seed for reproducible generation. Default: 0. |
| steps | Integer | No | Number of inference steps. Default: 4. Minimum: 1. Maximum: 20. |
| width | Integer | No | Output image width in pixels. Default: 1024. Minimum: 256. Maximum: 1536. |
| height | Integer | No | Output image height in pixels. Default: 768. Minimum: 256. Maximum: 1536. |
Response
Returns a JSON object with status, message, and task_id string fields. The status field indicates the request has started processing, message provides the handoff instruction, and task_id is the identifier to use when checking the job result.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| status | String | No | Job state returned by the endpoint. Example: processing. |
| message | String | No | Human-readable status message. Example: Generation started. Poll GET /v1/tasks/{task_id} for result. |
| task_id | String | No | Identifier for the generation task. Example: a1b2c3d4e5f6. |
Notes
This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job id from task_id.