Flux 3
Overview
FLUX 3 Image gives you maximum control over every pixel. Generate an image from a prompt, edit specific details, combine up to ten references, and draw bounding boxes to place each element.
Test API KEY: key_00000000000000000000000000000000Endpoints
1. Create Task
Request
POST https://api.pixwithapi.online/api/task/createHeaders
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Api-Key | {API_KEY} | Yes |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | An image description or editing instruction, between 1 and 2000 characters after trimming whitespace. The prompt sent after optional optimization must also fit this limit. |
| image_urls | array | Conditional | Provide 1-10 publicly accessible image URLs for image editing or multi-image references. Input order is preserved. Omit for text-to-image generation. |
| model_id | string | Yes | 0-96 for both text-to-image and image-to-image generation. Providing image_urls selects image-to-image automatically. |
| options | object | No | Generation options. Each API request generates one image. |
| options.prompt_optimization | boolean | No | Translate and optimize the prompt before generation. Default: false. |
| options.resolution | string | No | Output resolution. Valid values: '768P', '1K', '1.5K', '2K', '4K'. Default: '1K'. |
| options.aspect_ratio | string | No | Output aspect ratio. Valid values: '21:9', '16:9', '3:2', '4:3', '5:4', '1:1', '4:5', '3:4', '2:3', '9:16', '9:21'. Default: '1:1'. |
Example Request - Text-to-Image
{
"prompt": "A quiet coastal road at dawn, cinematic composition, a vintage car with its headlights on",
"model_id": "0-96",
"options": {
"resolution": "768P",
"aspect_ratio": "21:9"
}
}Example Request - Image-to-Image
{
"prompt": "Keep the product from Image 1 and place it in the studio setting from Image 2",
"image_urls": [
"https://cdn.pixwithapi.online/example-product.jpg",
"https://cdn.pixwithapi.online/example-background.jpg"
],
"model_id": "0-96",
"options": {
"resolution": "4K",
"aspect_ratio": "4:5"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | 1=success, 0=error |
| message | string | Success and failure messages. |
| data | object | Task data. |
| data.task_id | string | Task identifier. |
| data.estimated_time | int | Estimated time in seconds. Generation time can vary; 4K output may take several minutes. |
Response
{
"code": 1,
"message": "success",
"data": {
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d",
"estimated_time": 120
}
}Use the returned task_id to get task results.
Last updated on