Image model API

FLUX Kontext Pro API

FLUX.1 Kontext [pro] handles both text and reference images as inputs, seamlessly enabling targeted, local edits and complex transformations of entire scenes. A state-of-the-art text-based image editing model that delivers high-quality outputs with excellent prompt following and consistent results for transforming images through natural language

Model id
flux-kontext-pro
Takes
Text (required)
Makes
Image
Endpoint
POST /api/v1/images/generations
Made by
Black Forest Labs
Mode
Synchronous

Call FLUX Kontext Pro

Base URL https://payload.rentprompts.com/api/v1. Replace the placeholder with your key.

Model flux-kontext-pro

POST /api/v1/images/generations

curl https://payload.rentprompts.com/api/v1/images/generations \
  -H "Authorization: Bearer rp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "flux-kontext-pro",
  "prompt": "A lighthouse at dusk, watercolor",
  "n": 1
}'

Replace rp_live_YOUR_KEY with your key, ideally via the RENTPROMPTS_API_KEY environment variable. Keys are shown only once, so they are never filled in here. Get your API key →

What a typical call costs

Worked out from FLUX Kontext Pro's published price (4.48 J / image). You pay only for successful results, from your Joule balance.
  • 1 image4.48 Joules
  • 4 images17.92 Joules

Send requests to POST /api/v1/images/generations. FLUX Kontext Pro answers synchronously: the result comes back in the response to the same request.

Settings

Optional parameters this model accepts (pass them in settings on /v1/run, or as top-level fields where OpenAI defines them).
NameTypeDefaultRange / options
aspect_ratioselect——
FLUX Kontext Pro API — Pricing & Code Examples | RentPrompts