POST/api/v1/imagine4 creditsSynchronousRequires image_url

Flux Kontext Pro

Provider · Black Forest LabsType · EditModel ID · flux-kontext-proUpstream ID · flux-context-pro

Flux Kontext Pro by Black Forest Labs (via BLTCY). Context-aware image editing — modifies only the described elements while preserving the rest of the scene. Popular choice for professional image editing workflows. Requires `image_url`.

Request Parameters

ParameterTypeRequiredDescription
promptstringRequiredThe text prompt describing the image to generate.
modelstringOptionalSet to `flux-kontext-pro` to use this model.Default: flux-kontext-pro
image_urlstringRequiredSource image URL. Required for this edit model — the request will fail without it.
aspect_ratiostringOptionalOutput aspect ratio. Allowed: 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3.Default: 1:1
webhook_urlstringOptionalURL where we POST the completed task result.
webhook_secretstringOptionalSent as x-webhook-secret header in webhook delivery for verification.

Example Request

cURL
curl -X POST https://api.journeyapi.com/api/v1/imagine \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-kontext-pro",
    "prompt": "replace the background with a sunset beach scene",
    "image_url": "https://example.com/portrait.jpg"
  }'

Response

This model is synchronous — the response includes the finished image_url directly. No polling required.

200 OK
{
  "task_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "finished",
  "image_url": "https://cdn.example.com/output.png"
}

Tips

  • 1Describe only what you want changed. The model preserves everything else.
  • 2Works best with clear, specific English instructions.

Quirks & Gotchas

English-only prompts. Non-English text may produce unexpected results.

Output images expire after 14 days — download and store results promptly.

Aspect ratio mismatch between your request and the source image will cause cropping or padding.