Qubico/flux1-schnell API Reference
Complete API documentation for the Flux.1 Schnell model supporting text-to-image and image-to-image generation with batch processing capabilities.
Base URL
https://api.qubico.ai/v1/inference
Header Params
x-api-key: YOUR_API_KEY
Model ID
Qubico/flux1-schnell
Request Example
POST https://api.qubico.ai/v1/inference Content-Type: application/json x-api-key: YOUR_API_KEY { "model": "Qubico/flux1-schnell", "task_type": "txt2img", "input": { "prompt": "A beautiful sunset over a mountain range with vibrant colors.", "negative_prompt": "No clouds in the sky.", "guidance_scale": 4.0, "batch_size": 2, "width": 512, "height": 512 }, "config": { "webhook_config": { "endpoint": "https://your-webhook.com/callback", "secret": "your_webhook_secret" } } }
Response Example
{ "task_id": "task_12345678", "status": "pending", "model": "Qubico/flux1-schnell", "task_type": "txt2img", "created_at": "2024-01-15T10:30:00Z", "estimated_time": 8 }
Required Parameters
model
Model identifier. Must be "Qubico/flux1-schnell"
task_type
Task type. Options: "txt2img"
, "img2img"
input.prompt
Text description of the desired image. Maximum 1000 characters. Required for both txt2img and img2img tasks.
Optional Parameters
input.negative_prompt
Text description of what to avoid in the image. Maximum 500 characters.
input.guidance_scale
Controls how closely the image follows the prompt. Range: 1.5-5.0, Default: 4.0
input.width
Output image width. Range: 256-1024, Default: 512. Must be divisible by 8. Can be used in txt2img ONLY. width×height cannot exceed 1,048,576.
input.height
Output image height. Range: 256-1024, Default: 512. Must be divisible by 8. Can be used in txt2img ONLY. width×height cannot exceed 1,048,576.
input.batch_size
Number of images to generate in parallel. Range: 1-4, Default: 1
input.denoise
Denoising strength for img2img. Range: 0.0-1.0, Default: 0.7
input.image
URL of the input image for img2img tasks. Supports JPEG, PNG, WebP formats.
Configuration Parameters
config.webhook_config
Webhook configuration for async notifications
endpoint
- Webhook URLsecret
- Webhook secret for verificationInitial Response (202 Accepted)
{ "task_id": "task_12345678", "status": "pending", "model": "Qubico/flux1-schnell", "task_type": "txt2img", "created_at": "2024-01-15T10:30:00Z", "estimated_time": 8 }
Completed Response (GET /v1/tasks/task_id)
{ "task_id": "task_12345678", "status": "completed", "model": "Qubico/flux1-schnell", "task_type": "txt2img", "created_at": "2024-01-15T10:30:00Z", "completed_at": "2024-01-15T10:30:15Z", "results": [ { "url": "https://cdn.qubico.ai/results/image_1.png", "width": 512, "height": 512, "format": "png" }, { "url": "https://cdn.qubico.ai/results/image_2.png", "width": 512, "height": 512, "format": "png" } ], "usage": { "credits_used": 2 } }
Status Values
Error Response Format
{ "error": { "code": "INVALID_PARAMETER", "message": "The parameter 'batch_size' must be between 1 and 4", "details": { "parameter": "batch_size", "value": 8, "allowed_range": "1-4" } } }
curl -X POST https://api.qubico.ai/v1/inference \ -H "Content-Type: application/json" \ -H "x-api-key: YOUR_API_KEY" \ -d '{ "model": "Qubico/flux1-schnell", "task_type": "txt2img", "input": { "prompt": "A beautiful sunset over a mountain range", "batch_size": 2, "width": 512, "height": 512 }, "config": { "webhook_config": { "endpoint": "https://your-webhook.com/callback", "secret": "your_webhook_secret" } } }'