> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ninjachat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# FLUX.1 Kontext Dev

> Black Forest Labs' open-weight Kontext editor; a reference image is required.

<div className="ndoc-model-summary">
  <div className="ndoc-model-identity"><span className="ndoc-brand-mark">  <img src="https://cdn.photogenius.ai/new-ai-images/site/v1/landing/marks/marks/09b9d42e/bfl.png" alt="" width="32" height="32" /></span><div><strong>Black Forest Labs</strong><code>flux-kontext-dev</code></div></div>
  <div className="ndoc-model-stat"><span>Generation price</span><strong>\$0.025 per image</strong></div>
</div>

<div className="ndoc-capabilities" aria-label="Model capabilities">
  <span>Image editing</span>
  <span>Image reference</span>
</div>

## Pricing

| Unit      | Price   |
| :-------- | :------ |
| Per image | \$0.025 |

[Live pricing](https://www.ninjachat.ai/api/v1/models/flux-kontext-dev).

## Use this model

[Set up your SDK client](/sdks#create-a-client), then run:

This is an editing model: pass the source image as a public HTTPS URL in `image`.

<CodeGroup>
  ```typescript TypeScript SDK theme={null}
  const image = await client.images.generate({
    model: "flux-kontext-dev",
    prompt: "Replace the background with a clean studio backdrop",
    image: "https://your-cdn.example/source.png",
  });

  console.log(image.data[0].url);
  ```

  ```python Python SDK theme={null}
  image = client.images.generate(
      model="flux-kontext-dev",
      prompt="Replace the background with a clean studio backdrop",
      image="https://your-cdn.example/source.png",
  )

  print(image["data"][0]["url"])
  ```

  ```bash cURL theme={null}
  curl https://www.ninjachat.ai/api/v1/images/generations \
    -H "Authorization: Bearer $NINJACHAT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model":"flux-kontext-dev","prompt":"Replace the background with a clean studio backdrop","image":"https://your-cdn.example/source.png"}'
  ```
</CodeGroup>

## Supported parameters

<div className="ndoc-parameters"><code>prompt</code><code>model</code><code>n</code><code>size</code><code>aspect\_ratio</code><code>image</code><code>width</code><code>height</code></div>

<Accordion title="Check current availability and limits">
  ```typescript TypeScript SDK theme={null}
  const model = await client.models.retrieve("flux-kontext-dev");

  if (!model.servable) throw new Error("flux-kontext-dev is temporarily unavailable");

  console.log({
    capabilities: model.capabilities,
    supportedParameters: model.supportedParameters,
    pricing: model.pricing,
    providers: model.providers,
  });
  ```
</Accordion>

**Guides:** [Image generation](/image-generation) · [Pricing](/pricing) · [All models](/models-overview)
