Skip to Content

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_00000000000000000000000000000000

Endpoints

1. Create Task

Request

POST https://api.pixwithapi.online/api/task/create

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Api-Key{API_KEY}Yes

Request Parameters

ParameterTypeRequiredDescription
promptstringYesAn 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_urlsarrayConditionalProvide 1-10 publicly accessible image URLs for image editing or multi-image references. Input order is preserved. Omit for text-to-image generation.
model_idstringYes0-96 for both text-to-image and image-to-image generation. Providing image_urls selects image-to-image automatically.
optionsobjectNoGeneration options. Each API request generates one image.
options.prompt_optimizationbooleanNoTranslate and optimize the prompt before generation. Default: false.
options.resolutionstringNoOutput resolution. Valid values: '768P', '1K', '1.5K', '2K', '4K'. Default: '1K'.
options.aspect_ratiostringNoOutput 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

ParameterTypeDescription
codeint1=success, 0=error
messagestringSuccess and failure messages.
dataobjectTask data.
data.task_idstringTask identifier.
data.estimated_timeintEstimated 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