Flux 2 API

Text-to-image and remix-image with strong prompt adherence from Black Forest Labs.

جاهز للتشغيل · 4 variants · ابتداءً من $0.050
runapi.ai
curl -X POST https://runapi.ai/api/v1/flux_2/remix_image \
  -H "Authorization: Bearer $RUNAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "flux-2-flex-text-to-image",
  "prompt": "Generate a photorealistic studio portrait of an astronaut holding a cat, dramatic rim lighting, fine detail."
}'
import { Flux2Client } from "@runapi.ai/flux-2";

const client = new Flux2Client();
const result = await client.remixImage.run({
    model: "flux-2-flex-text-to-image",
    prompt: "Generate a photorealistic studio portrait of an astronaut holding a cat, dramatic rim lighting, fine detail.",
});
<?php

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

use RunApi\Flux2\Flux2Client;

$client = new Flux2Client();
$result = $client->remixImage->run([
        'model' => 'flux-2-flex-text-to-image',
        'prompt' => 'Generate a photorealistic studio portrait of an astronaut holding a cat, dramatic rim lighting, fine detail.',
]);
require "runapi/flux_2"

client = RunApi::Flux2::Client.new
result = client.remix_image.run(
    model: "flux-2-flex-text-to-image",
    prompt: "Generate a photorealistic studio portrait of an astronaut holding a cat, dramatic rim lighting, fine detail."
)
npx skills add runapi-ai/flux-2 -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-2 v1
OVERVIEW

Flux 2 is Black Forest Labs' text-to-image and image remix model known for strong prompt adherence and high visual fidelity. Its pro tier auto-enhances prompts, while the flex tier exposes manual control over inference steps and guidance.

  • عدة إصدارات لمستويات مختلفة من السرعة / الجودة
  • يتضمن model skill التوثيق والـschemas وملاحظات الإعداد
  • يعمل مع workflows موجهة لتطوير التطبيقات
  • لا يتم احتساب رسوم على عمليات التوليد الفاشلة
VARIANTS

قارن جميع إصدارات API

Variant Billing From
flux-2-flex-remix-image call $0.140 عرض →
flux-2-flex-text-to-image call $0.140 عرض →
flux-2-pro-remix-image call $0.050 عرض →
flux-2-pro-text-to-image call $0.050 عرض →
SKILLS

ثبّت skill Flux 2 لتطوير التطبيقات

حمّل توثيق النموذج والـschemas وملاحظات الأسعار وخطوات الإعداد إلى مساحة عمل الكود.

# Install the model skill for app development workflows
npx skills add runapi-ai/flux-2 -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 2 skill for this app:

1. Add runapi-ai/flux-2 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.
كيف يعمل

من model skill إلى أول نتيجة في أربع خطوات

01

اختر النموذج

اختر النموذج والإصدار المناسبين لنوع المخرجات ومستوى الجودة وزمن الاستجابة المستهدف.

02

الإعداد

اضبط مفتاح RunAPI وثبّت model skill في مساحة عمل الكود.

03

التنفيذ

استخدم تعليمات المهارة لإضافة ميزة النموذج داخل تطبيقك.

04

الاستلام

استعلم عبر task ID أو استخدم البث عند دعمه أو عالج webhook callback.

CONTEXT

ما هي Flux 2 API؟

Flux 2 is Black Forest Labs' generation model, delivering high prompt adherence across text-to-image and remix-image tasks. Through RunAPI, Pro and Flex variants share the same API shape.

Provider
Black Forest Labs
Modality
Image
لماذا RunAPI

لماذا تستخدم Flux 2 API عبر RunAPI

مصادقة واحدة لكل مزود

مفتاح RunAPI واحد يفتح الوصول إلى الكتالوج بالكامل. لا حسابات منفصلة، ولا تدوير مفاتيح لكل تكامل.

تسعير وفوترة موحّدان

تسعير لكل استدعاء بالدولار الأمريكي، ويُفوتر شهريًا. لا تُحتسب التوليدات الفاشلة.

Skill مع schemas

تأتي الـschemas المعرّفة وملاحظات الإعداد داخل model skill حتى يبدأ التنفيذ من العقد الصحيح.

FAQ

أسئلة شائعة

What is the difference between Pro and Flex?

Pro is the flagship tier with automatic prompt enhancement. Flex gives you control over inference steps and guidance, and supports up to 8 reference images.

How strong is prompt adherence?

Flux 2 is specifically known for strong prompt adherence — it follows detailed descriptions including spatial relationships, colors, and object counts more faithfully than most models.

Does Flux 2 support remix-image?

Yes — both Pro and Flex have dedicated remix-image variants that use source images as style or content seeds.

What is automatic prompt enhancement?

The Pro variant automatically refines your prompt for better visual results. This is a zero-config feature — no extra parameters needed.

How does Flux 2 compare to Flux Kontext?

Flux 2 is for generating new images from prompts or remixing source images. Flux Kontext is for editing existing images with contextual awareness.

أي نسخة ينبغي أن أبدأ بها؟

اختر أرخص نسخة تفي بمعيار الجودة لديك. يبدأ معظم الفرق بالنسخة السريعة ثم ينتقلون إلى pro للإنتاج.

هل توجد خطة مجانية؟

تحصل الحسابات الجديدة على أول طلبات مجانية على كل نموذج. بعد ذلك، الدفع حسب كل طلب.

هل تدعمون البث المباشر للنتائج؟

حيث يتوفر البث المباشر، يوفّر RunAPI البث من البداية إلى النهاية.

كيف يتم احتساب الرسوم عند الفشل؟

لا يتم تحصيل رسوم على عمليات التوليد الفاشلة.

هل يتم تخزين المخرجات مؤقتًا؟

يتم حفظ المخرجات المولدة ويمكن استرجاعها بواسطة task ID. لا يتم تخزين المدخلات مؤقتًا.

هل يمكنني الاستخدام تجاريًا؟

نعم — يشمل كل إصدار الاستخدام التجاري ما لم يقيّده ترخيص النموذج صراحةً، ويُشار إلى ذلك في صفحة الإصدار.

ماذا عن حدود المعدل؟

تتدرج حدود المعدل لكل مفتاح وفق فئة الاستخدام. راجع صفحة الأسعار للاطلاع على الحدود الحالية.

أين يمكنني الإبلاغ عن المشاكل؟

افتح issue في مستودع GitHub العام أو راسل الدعم عبر البريد الإلكتروني.

ابدأ الآن

ابدأ البناء باستخدام Flux 2 API.