Flux 2 flux-2-flex-text-to-image API
A model variant exposed through RunAPI's unified AI API.
Operational
·
image
·
Commercial use supported
# Works with Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents
npx skills add runapi-ai/flux-2 -g
Or paste this prompt to your AI agent:
Install the Flux 2 skill for me: 1. Clone https://github.com/runapi-ai/flux-2 2. Copy the skills/flux-2/ 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.
Switch variant
RESUMEN
Flux 2 flux-2-flex-text-to-image is available through the same RunAPI auth, SDKs, and agent skill workflow.
- Unified endpoint
- SDK snippets
- Agent install path
- Las generaciones fallidas no se cobran
PRECIOS
PRECIOS
Las generaciones fallidas no se cobran
Text to image
$0.14-$0.24
/ image
Output resolution: 1k
$0.14
Output resolution: 2k
$0.24
FICHA TÉCNICA
FICHA TÉCNICA
| Model ID | flux-2-flex-text-to-image |
| Proveedor | Black Forest Labs |
| Modalidad | image |
| Task type | asynchronous |
| Facturación | call |
| Endpoint | /api/v1/flux_2/text_to_image |
| Commercial | Yes |
| Status | Operational |
INICIO RÁPIDO
Quickstart — flux-2-flex-text-to-image
curl -X POST https://runapi.ai/api/v1/flux_2/text_to_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, 8K detail."
}'
import { Flux2Client } from "@runapi.ai/flux-2";
const client = new Flux2Client();
const result = await client.textToImage.run({
model: "flux-2-flex-text-to-image",
prompt: "Generate a photorealistic studio portrait of an astronaut holding a cat, dramatic rim lighting, 8K detail.",
});
require "runapi/flux_2"
client = RunApi::Flux2::Client.new
result = client.text_to_image.run(
model: "flux-2-flex-text-to-image",
prompt: "Generate a photorealistic studio portrait of an astronaut holding a cat, dramatic rim lighting, 8K detail."
)
CÓMO FUNCIONA
How to use flux-2-flex-text-to-image
01
Choose endpoint
Pick the endpoint and copy the SDK snippet.
02
Pass model ID
Use this variant ID in the request body.
03
Run task
Submit the request and store the returned task ID.
04
Collect output
Poll or receive the callback when the task finishes.
DIFERENCIAS
How flux-2-flex-text-to-image compares
VS FLUX-2-FLEX-REMIX-IMAGE
Adjustable steps + guidance; up to 10 ref images; best typography
Flex control + reference image input
VS FLUX-2-PRO-REMIX-IMAGE
Adjustable steps + guidance; up to 10 ref images; best typography
Pro quality with input image as style/content seed
VS FLUX-2-PRO-TEXT-TO-IMAGE
Adjustable steps + guidance; up to 10 ref images; best typography
Zero-config flagship; automatic prompt enhancement
CASOS DE USO
Where to use this variant
Image generation
Create visual assets from text prompts.
Editing
Transform existing images with prompt guidance.
Batch creative work
Use SDKs for repeatable generation.
FAQ
Frequently asked questions about flux-2-flex-text-to-image
How do I select flux-2-flex-text-to-image?
Pass the model ID shown in the quickstart.
Is pricing usage-based?
Yes. Pricing is metered per call or unit.
Other Flux 2 variants
flux-2-pro-remix-image
Cheapest
pro-remix-image
$0.050 / call
flux-2-pro-text-to-image
Quality
pro-text-to-image
$0.050 / call
flux-2-flex-remix-image
flex-remix-image
$0.140 / call
Related models
In-context image editing — local edits, style transfer, and character-consistent generation.
Voice, character, and multimodal video generation resources for narration, dialogue, and agent media workflows.
Text-to-image and image editing powered by OpenAI's image generation models.
EMPEZAR