flux-2defaultcheapestFlux 2 API — how to connect and pay
Flux 2 — the new FLUX generation. Text-to-image and image-to-image.
Channel comparison
last 7 days
flux-2:flow| Channel | Price |
|---|---|
Pixel flux-2defaultcheapest | from $0.033333 per image |
Flow flux-2:flow | from $0.04 per image |
Build the result you need
flux-2What is Flux 2
Flux 2 — the new FLUX generation. Text-to-image and image-to-image.
Contract at a glance
- Input
- text, image
- Output
- image
- Mode
- async (job + polling)
- Status polling
- every 3 s · up to 90 s
Strengths
- Pricing: per image
- Inputs: text, image
- 5 configurable options
- One API key for media generation
Where it is used
- Article and social media illustrations
- Product images
- Banners and covers
- Design prototypes
API contract
Generation runs asynchronously: create a job, then poll its status until completion.
- Create job
- POST /api/media/generate
- Check status
- GET /api/media/jobs/{jobId}
- Input
- text, image
- Output
- image
- Polling
- every 3 s · up to 90 s
- Authentication
- Authorization: Bearer sk-pv-…
Example request
Pass your key in the Bearer header. The API returns jobId for polling the status.
curl -sS https://getvibeapi.com/api/media/generate \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model":"flux-2","prompt":"a beautiful landscape","opts":{"aspect_ratio":"1:1","tier":"pro","mode":"text-to-image","resolution":"1K"}}'JavaScript
const response = await fetch('https://getvibeapi.com/api/media/generate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GETVIBE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model": "flux-2",
"prompt": "a beautiful landscape",
"opts": {
"aspect_ratio": "1:1",
"tier": "pro",
"mode": "text-to-image",
"resolution": "1K"
}
}),
});
if (!response.ok) throw new Error(`GetVibe API: ${response.status}`);
const { jobId } = await response.json();
console.log(jobId);API request parameters
Parameters for requests to Flux 2 via the GetVibe API.
promptreq.image_urlaspect_ratiotiermoderesolutioninput_urlsimage_file_idimage_base64input_file_idsinput_base64| Parameter | Type | Values | Default | Price |
|---|---|---|---|---|
promptreq. | text | text description | required | — |
image_url | URL | Public image URL | — | — |
aspect_ratio | option selection | 1:1 (default) · 16:9 · 9:16 · 4:3 · 3:4 | 1:1 | Included in the base price |
tier | option selection | Pro (top quality) (default) · Flex (fast) | Pro (top quality) | Pro (top quality): $0.033333, Flex (fast): $0.066667 |
mode | option selection | Generate (text → image) (default) · Image-to-Image | Generate (text → image) | Included in the base price |
resolution | option selection | 1K (default) · 2K | 1K | 1K: $0.033333, 2K: $0.046667 |
input_urls | Array<URLs>, 0–8 items | Public HTTP(S) URLs | — | Included in the base price |
image_file_id | text | Alternative to image_url: the id of your own file from POST /v1/files (file-pv-…) | — | Included in the base price |
image_base64 | text | Alternative to image_url: the file inline, as base64 or a data: URI | — | Included in the base price |
input_file_ids | Array<strings> | List of values | — | Included in the base price |
input_base64 | Array<strings> | List of values | — | Included in the base price |
Request: POST https://getvibeapi.com/api/media/generate. Prices in USD.
Price of Flux 2
The cost of Flux 2: from $0.033333 per image. The price is calculated dynamically at the current exchange rate, and the final charge is shown in the API response (priceRub). Payment in USD, no subscriptions.
What a default request costs
With no parameters sent, the request uses these values: Resolution — 1K, Version and quality — Pro (top quality), Mode — Generate (text → image), Frame format — 1:1. That request costs $0.033333.
Channels and prices for every parameter combination
For every channel, the price of every parameter combination. It is exactly the amount a successful generation is charged, and the same figure as in the machine-readable table linked below.
Pixelflux-2from $0.033333exact prices
| Version \ Resolution | 1K | 2K |
|---|---|---|
| Pro (top quality) | $0.033333 | $0.046667 |
| Flex (fast) | $0.066667 | $0.16 |
Every combination as JSON: /api/media/price-table?model=flux-2
Flowflux-2:flowfrom $0.04exact prices
| Version \ Resolution | 1K | 2K |
|---|---|---|
| Pro (top quality) | $0.04 | $0.10 |
| Flex (fast) | $0.066667 | $0.266667 |
Every combination as JSON: /api/media/price-table?model=flux-2%3Aflow
README
The machine-readable contract for Flux 2 contains the request schema, operations, limits, polling and response examples.
# Flux 2
Public model: flux-2
Create job: POST /api/media/generate
Check status: GET /api/media/jobs/{jobId}
## Input parameters
- `prompt` (text): text description; default: required
- `image_url` (URL): Public image URL; default: —
- `aspect_ratio` (option selection): 1:1 (default) · 16:9 · 9:16 · 4:3 · 3:4; default: 1:1
- `tier` (option selection): Pro (top quality) (default) · Flex (fast); default: Pro (top quality)
- `mode` (option selection): Generate (text → image) (default) · Image-to-Image; default: Generate (text → image)
- `resolution` (option selection): 1K (default) · 2K; default: 1K
- `input_urls` (Array<URLs>, 0–8 items): Public HTTP(S) URLs; default: —
- `image_file_id` (text): Alternative to image_url: the id of your own file from POST /v1/files (file-pv-…); default: —
- `image_base64` (text): Alternative to image_url: the file inline, as base64 or a data: URI; default: —
- `input_file_ids` (Array<strings>): List of values; default: —
- `input_base64` (Array<strings>): List of values; default: —
## Public variants
- `flux-2`: Pixel
- `flux-2:flow`: FlowFAQ about the Flux 2 API
How much does Flux 2 cost?
The price of Flux 2: from $0.033333 per image. The price is calculated dynamically at the current exchange rate.
Is it compatible with the OpenAI SDK?
Yes, the API is fully OpenAI-compatible. Just change base_url to https://getvibeapi.com/v1 and set your key — the rest of the code stays the same.