Skip to main content
← Flux Model name: flux-2-pro/edit
Generation type: image_to_image
Endpoint: POST /api/asset_generator/

Pricing

0.5 credits per output. Prices are per output. When a request asks for several outputs, the charge is this price times the number of outputs.

Quick start

The example uses sample media from our CDN. Swap in publicly accessible URLs for your own files.

Input parameters

Send these fields in input_params.
string
required
PromptMinimum characters: 1. Maximum characters: 2500.
string[]
required
List of URLs of input images for editingMinimum items: 1. Maximum items: 3.
integer
Random seed for reproducibility. If None, a random seed is chosen.
string
default:"portrait_16_9"
The size of the image to generate. The width and height must be between 512 and 2048 pixels.Allowed values: "square_hd", "square", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9".
integer
default:1
The number of images to generate.Minimum: 1. Maximum: 1.

Response

The request returns the task with status: "initializing". Poll GET /api/asset_generator/{id}/ until status is done or failed, or pass a webhook_url to be notified. A finished task lists its files in assets and the credits it charged in credits_used.