/APIXO Docs

Flux Kontext

Context-aware image generation and editing

Flux Kontext

Fast, context-aware image generation with advanced controls.

Model ID
flux-kontext
Price
$0.03-0.06/image
Speed
10-15 seconds
Type
Image

Quality Modes

ModePriceDescription
pro$0.03Fast, cost-effective
max$0.06Higher quality output

Parameters

For common parameters (request_type, callback_url), see Request Format.

ParameterTypeRequiredDefaultDescription
modestringYes-pro or max
promptstringYes-Image description (max 10,000 characters)
image_urlstringNo-Reference image for editing
aspect_ratiostringYes16:9Output ratio. Options: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16
output_formatstringNojpegjpeg or png
promptUpsamplingbooleanNofalseAI prompt enhancement
enableTranslationbooleanNotrueAuto-translate prompts
safetyToleranceintegerNo2Content moderation (0-2)
watermarkstringNo-Custom watermark text

Examples

Text to Image

curl -X POST https://api.apixo.ai/api/v1/generateTask/flux-kontext \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "pro",
      "prompt": "A serene mountain landscape at golden hour",
      "aspect_ratio": "16:9"
    }
  }'

Image Editing

curl -X POST https://api.apixo.ai/api/v1/generateTask/flux-kontext \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "max",
      "prompt": "Transform into a watercolor painting style",
      "image_url": "https://example.com/photo.jpg",
      "aspect_ratio": "1:1"
    }
  }'

Tips

  • Polling: Wait 8 seconds, then poll every 3 seconds
  • Timeout: Set max wait to 2 minutes
  • Use pro for fast iterations, max for final output

On this page