Flux Kontext
Flux Kontext 画像生成
Generate and edit images using Flux Kontext model, supporting text-to-image and image editing
POST
- Flux Kontext image generation and editing model
- Choose
flux-kontext-pro(Pro) orflux-kontext-max(Max, higher quality) via the model parameter - Supports text-to-image and image editing modes
- With reference image = image editing; without = text-to-image
- Fixed billing per request
- Async task mode, returns
task_idfor querying results
Authorization
string
必須
All endpoints require Bearer Token authenticationGet your API Key: Visit the API Key Management Page to get your API KeyAdd to request header:
リクエストパラメータ
string
必須
Image generation model nameOptions:
flux-kontext-pro- Pro versionflux-kontext-max- Max version, higher quality
string
必須
Text description for image generation
string
Image aspect ratioDefault:
- With reference image:
match_input_image(match input image) - Without reference image:
16:9
string[]
Reference image URL array for image editing⚠️ URL format only (base64 not supported)
- Publicly accessible image URL (http:// or https://)
- Use the Upload 画像API to upload local images and get URLs
- Maximum 1 image
- With image = image editing mode; without = text-to-image mode
object
Metadata parameters for additional configuration options
レスポンス
string
Unique task identifier for querying task status
string
Object type, fixed as
generation.taskstring
モデル name used for generation
string
Task status
queued- Waiting to be processedin_progress- Processingcompleted- Successfully completedfailed- Failed
integer
Task progress percentage (0-100)
integer
Task creation timestamp (Unix timestamp)
object
Task metadata
Use Cases
Case 1: Text-to-Image
Case 2: Image Editing
Case 3: High-Quality Text-to-Image (Max モデル)
Query Task ResultsImage generation is an async task. After submission, a task ID is returned. Use the Get Image Task ステータス endpoint to query generation progress and results.