Flux Kontext

In-context image editing — local edits, style transfer, and character-consistent generation.

Operational · 2 variants · a partir de $0.100
# Works with Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents
npx skills add runapi-ai/flux-kontext -g
The -g flag installs globally so every project picks it up.
Or paste this prompt to your AI agent:
Install the Flux Kontext skill for me:

1. Clone https://github.com/runapi-ai/flux-kontext
2. Copy the skills/flux-kontext/ directory into your
   user-level skills directory (e.g. ~/.claude/skills/
   for Claude Code, ~/.codex/skills/ for Codex).
3. Verify that SKILL.md is present.
4. Confirm the install path when done.
VISÃO GERAL

Flux Kontext is Black Forest Labs' in-context image editing model that applies targeted edits while preserving style, character identity, and scene composition. It excels at style transfer and maintaining visual consistency.

  • Installable agent skill
  • Unified API key
  • SDK examples included
  • Gerações com falha não são cobradas
VARIANTES

Variantes

Variant Billing From
flux-kontext-max call $0.200 Ver →
flux-kontext-pro call $0.100 Ver →
AGENT USAGE

Use this model from your agent

Prompt + SDK example
# User prompt to the agent
"Edit this product photo: change the background to a tropical beach while keeping the product exactly the same."
// Code generated by the agent via @runapi.ai/flux-kontext
import { FluxKontextClient } from '@runapi.ai/flux-kontext';

const client = new FluxKontextClient();
const result = await client.textToImage.run({
  model: 'flux-kontext-max',
  prompt: 'Edit this product photo: change the background to a tropical beach while keeping the product exactly the same.',
});
@runapi.ai/flux-kontext npm
COMO FUNCIONA

How to call this model

01

Install the skill

Add the model skill to your agent or install the SDK package.

02

Authenticate once

Use your RunAPI key for every supported model.

03

Send a request

Use the unified schema for the endpoint you need.

04

Receive output

Poll by task ID or handle the callback when the generation completes.

SDK QUICKSTART

SDK quickstart

runapi.ai
curl -X POST https://runapi.ai/api/v1/flux_kontext/text_to_image \
  -H "Authorization: Bearer $RUNAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "flux-kontext-max",
  "prompt": "Edit this product photo: change the background to a tropical beach while keeping the product exactly the same."
}'
import { FluxKontextClient } from "@runapi.ai/flux-kontext";

const client = new FluxKontextClient();
const result = await client.textToImage.run({
    model: "flux-kontext-max",
    prompt: "Edit this product photo: change the background to a tropical beach while keeping the product exactly the same.",
});
require "runapi/flux_kontext"

client = RunApi::FluxKontext::Client.new
result = client.text_to_image.run(
    model: "flux-kontext-max",
    prompt: "Edit this product photo: change the background to a tropical beach while keeping the product exactly the same."
)
@runapi.ai/flux-kontext v1
CONTEXTO

Where Flux Kontext fits

Flux Kontext is Black Forest Labs' context-aware editing model, built on the 12B-parameter Flux architecture. Through RunAPI, both Kontext Pro and Max variants share a single key.

Provider
Black Forest Labs
Modality
Image
POR QUE RUNAPI

Why use Flux Kontext through RunAPI

One API key

Use the same credentials across models and providers.

Agent-ready

Installable skills include docs and schema for tool calls.

Predictable billing

Usage-based pricing is visible before you call.

FAQ

Frequently asked questions

How do I call this model?

Use the RunAPI SDK, CLI, or REST endpoint shown on this page.

Do failed generations cost money?

Gerações com falha não são cobradas

Can agents use it directly?

Yes. Install the model skill and your agent gets the docs, schema, and examples.

COMEÇAR

Start building with Flux Kontext.