Flux Kontext API

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

Operasyonel · 2 variants · başlayan $0.050
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.",
});
<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\FluxKontext\FluxKontextClient;

$client = new FluxKontextClient();
$result = $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."
)
npx skills add runapi-ai/flux-kontext -g
# Claude Code
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp

# Codex
codex plugin install runapi-mcp@agents

# Cursor / Windsurf / VS Code
npx @runapi.ai/mcp init cursor
@runapi.ai/flux-kontext v1
OVERVIEW

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.

  • Farklı hız / kalite seviyeleri için birden çok varyant
  • Model skill dokümanları, şemaları ve kurulum notlarını içerir
  • Uygulama odaklı kodlama workflow’larıyla çalışır
  • Başarısız üretimler ücretlendirilmez
VARIANTS

Tüm API varyantlarını karşılaştırın

Variant Billing From
flux-kontext-max call $0.100 Gör →
flux-kontext-pro call $0.050 Gör →
SKILLS

Uygulama geliştirme için Flux Kontext skill’ini kurun

Model dokümanlarını, şemaları, fiyat notlarını ve kurulum adımlarını kod workspace’inize yükleyin.

# Install the model skill for app development workflows
npx skills add runapi-ai/flux-kontext -g
Installs docs, schemas, pricing context, and setup notes into your developer workspace.
Or use this setup request in your coding tool:
Install the Flux Kontext skill for this app:

1. Add runapi-ai/flux-kontext with the skills installer.
2. Load SKILL.md in this workspace.
3. Use its docs, schemas, pricing notes, and setup steps when adding model features.
4. Confirm the install path when done.
NASIL ÇALIŞIR

Model skill’den ilk sonuca dört adımda

01

Modeli seçin

Çıktı tipi, kalite eşiği ve gecikme hedefinize uygun model ve varyantı seçin.

02

Yapılandır

RunAPI anahtarınızı ayarlayın ve model skill’i kod workspace’inize kurun.

03

Geliştirin

Skill talimatlarını kullanarak model özelliğini uygulamanızın içine ekleyin.

04

Al

Task ID ile sorgulayın, destekleniyorsa stream edin veya webhook callback’i işleyin.

CONTEXT

Flux Kontext API nedir?

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
NEDEN RUNAPI

Flux Kontext API neden RunAPI üzerinden kullanılmalı

Tek kimlik doğrulama, tüm sağlayıcılar

Tek bir RunAPI anahtarı tüm kataloğu açar. Ayrı hesap yok, her entegrasyon için anahtar döndürme yok.

Birleşik fiyatlandırma ve faturalandırma

USD bazında çağrı başı fiyatlandırma, aylık faturalandırılır. Başarısız üretimler ücretlendirilmez.

Şemalı skill

Tipli şemalar ve kurulum notları model skill içinde paketlenir; uygulama doğru kontrattan başlar.

FAQ

Sık sorulan sorular

What is contextual editing?

Flux Kontext edits a specific region of an image while preserving the lighting, perspective, and style of the untouched areas.

What is the difference between Pro and Max?

Pro is the standard tier for most editing tasks. Max offers higher fidelity and is suited for complex multi-element edits.

What input formats are supported?

JPEG, PNG, and WebP. Keep input images under 10 MB for optimal performance.

Can I maintain character identity across edits?

Yes — Kontext is designed to preserve character consistency when editing backgrounds, clothing, or scene elements.

How fast is generation?

Typically 3–5 seconds per image, depending on complexity and variant.

Hangi varyantla başlamalıyım?

Kalite beklentinizi karşılayan en uygun fiyatlı varyantı seçin. Çoğu ekip hızlı varyantla başlar ve üretimde pro sürüme geçer.

Ücretsiz bir katman var mı?

Yeni hesaplar her modelde ilk çağrıları ücretsiz alır. Sonrasında çağrı başına ödeme yaparsınız.

Sonuçları streaming olarak sunuyor musunuz?

Streaming desteklendiğinde RunAPI uçtan uca streaming sağlar.

Başarısız işlemler nasıl ücretlendirilir?

Başarısız üretimler ücretlendirilmez.

Çıktılar önbelleğe alınıyor mu?

Üretilen çıktılar saklanır ve görev ID’siyle geri alınabilir. Girdiler önbelleğe alınmaz.

Ticari kullanım yapabilir miyim?

Evet — bir model lisansı bunu açıkça kısıtlamadıkça ticari kullanım tüm varyantlarda dahildir; kısıtlamalar varyant sayfasında belirtilir.

Oran limitleri ne durumda?

Anahtar bazlı oran limitleri kullanım kademesine göre ölçeklenir. Güncel limitler için fiyatlandırma sayfasına bakın.

Sorunları nereye bildirebilirim?

Herkese açık GitHub reposunda bir issue açın veya destek ekibine e-posta gönderin.

ŞİMDİ BAŞLAYIN

Flux Kontext API ile geliştirmeye başlayın.