text-to-image
12-billion-parameter rectified-flow transformer for text-to-image generation with inpainting support
Use one of our client libraries to get started quickly.
12-billion-parameter rectified-flow transformer for text-to-image generation with inpainting support. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Send a POST request to start generation. The API returns immediately with a prediction ID for polling.
curl -X POST "https://api.vibedream.ai/api/v1/models/flux-dev/generate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VIBEDREAM_API_KEY" \
-d '{
"prompt": "A beautiful sunset over mountains with golden light",
"image": "https://example.com/your-image.jpg",
"mask_image": "https://example.com/your-mask_image.jpg",
"strength": 0.8,
"size": "1024*1024",
"num_inference_steps": 28,
"guidance_scale": 3.5,
"num_images": 1,
"seed": -1,
"output_format": "jpeg"
}'The API uses an API Key for authentication.
Get your API key from vibedream.ai/models/api-keys.
export VIBEDREAM_API_KEY="your-api-key"
Generation requests are queued and processed asynchronously. Poll the prediction endpoint until status is completed or failed.
curl -X POST "https://api.vibedream.ai/api/v1/models/flux-dev/generate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VIBEDREAM_API_KEY" \
-d '{
"prompt": "A beautiful sunset over mountains with golden light",
"image": "https://example.com/your-image.jpg",
"mask_image": "https://example.com/your-mask_image.jpg",
"strength": 0.8,
"size": "1024*1024",
"num_inference_steps": 28,
"guidance_scale": 3.5,
"num_images": 1,
"seed": -1,
"output_format": "jpeg"
}'Response
Returns immediately with a prediction ID. Use id to poll for results.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing",
"statusUrl": "https://api.vibedream.ai/api/v1/predictions/550e8400-e29b-41d4-a716-446655440000",
"estimatedTime": "5-15s",
"costCents": 2,
"createdAt": "2025-01-15T12:00:00.000Z"
}# Replace YOUR_PREDICTION_ID with the id from the submit response curl "https://api.vibedream.ai/api/v1/predictions/YOUR_PREDICTION_ID" \ -H "Authorization: Bearer $VIBEDREAM_API_KEY" # Poll every 1-2s until status is "completed" or "failed"
Completed response
outputs is string[] — an array of direct download URLs hosted on assets.vibedream.ai.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"modelId": "flux-dev",
"modelName": "FLUX.1 Dev",
"status": "completed",
"outputs": [
"https://assets.vibedream.ai/outputs/550e8400-e29b-41d4-a716-446655440000/1736942400000-0.png"
],
"error": null,
"createdAt": "2025-01-15T12:00:00.000Z",
"completedAt": "2025-01-15T12:00:30.000Z"
}Failed response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"modelId": "flux-dev",
"modelName": "FLUX.1 Dev",
"status": "failed",
"outputs": null,
"error": "Your request was flagged by content moderation. Please modify your prompt.",
"createdAt": "2025-01-15T12:00:00.000Z",
"completedAt": "2025-01-15T12:00:05.000Z"
}| Field | Type | Description |
|---|---|---|
| id | string | Unique prediction ID (UUID). |
| modelId | string | ID of the model used for generation. |
| modelName | string | Human-readable model name. |
| status | string | Current status. One of: processing, completed, failed. |
| outputs | string[] | null | Array of output URLs. Each URL is a direct download link to the generated file on assets.vibedream.ai. null when still processing or failed. |
| error | string | null | Error message if the generation failed. null on success. |
| createdAt | string | ISO 8601 timestamp when the request was submitted. |
| completedAt | string | null | ISO 8601 timestamp when generation finished. null while processing. |
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | -- | -- | The positive prompt for the generation |
| image | string | No | -- | -- | Optional image for image-to-image generationPass a public image URL. Accepted: JPEG, PNG, GIF, WebP. |
| mask_image | string | No | -- | -- | Mask for inpainting - white areas will be regenerated, black areas preservedPass a public image URL. Accepted: JPEG, PNG, GIF, WebP. |
| strength | number | No | 0.8 | 0 – 1 (step 0.1) | How much to transform the reference image (0 to 1) |
| size | string | No | 1024*1024 | 512*512, 768*768, 1024*1024, 1024*768, 768*1024, 1280*720, 720*1280 | The size of the generated image in pixels |
| num_inference_steps | number | No | 28 | 1 – 50 | Number of inference steps (higher = better quality, slower) |
| guidance_scale | number | No | 3.5 | 1 – 20 (step 0.5) | How closely to follow the prompt (higher = more faithful) |
| num_images | number | No | 1 | 1 – 4 | How many images to generate (1-4) |
| seed | number | No | -1 | -1 – 2147483647 | Random seed for reproducibility (-1 for random) |
| output_format | string | No | jpeg | jpeg, png, webp | The format of the output image |
{
"prompt": "A beautiful sunset over mountains with golden light",
"image": "https://example.com/your-image.jpg",
"mask_image": "https://example.com/your-mask_image.jpg",
"strength": 0.8,
"size": "1024*1024",
"num_inference_steps": 28,
"guidance_scale": 3.5,
"num_images": 1,
"seed": -1,
"output_format": "jpeg"
}{
"id": "550e8400-e29b-41d4-a716-446655440000",
"modelId": "flux-dev",
"modelName": "FLUX.1 Dev",
"status": "completed",
"outputs": [
"https://assets.vibedream.ai/outputs/550e8400-e29b-41d4-a716-446655440000/1736942400000-0.png"
],
"error": null,
"createdAt": "2025-01-15T12:00:00.000Z",
"completedAt": "2025-01-15T12:00:30.000Z"
}