grok-imagine:whitedefaultcheapestGrok Imagine API — how to connect and pay
Grok Imagine — generation and image-to-image from xAI (docs.Pixel/market/grok-imagine/image-to-image). 4 credits per image; I2I requires an input image.
Channel comparison
last 7 days
grok-imagine| Channel | Price |
|---|---|
White grok-imagine:whitedefaultcheapest | from $0.021333 per image |
Pixel grok-imagine | from $0.021333 per image |
Build the result you need
grok-imagine:whiteWhat is Grok Imagine
Grok Imagine — generation and image-to-image from xAI (docs.Pixel/market/grok-imagine/image-to-image). 4 credits per image; I2I requires an input 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":"grok-imagine:white","prompt":"a beautiful landscape","opts":{"aspect_ratio":"1:1","mode":"text-to-image","enable_pro":false}}'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": "grok-imagine:white",
"prompt": "a beautiful landscape",
"opts": {
"aspect_ratio": "1:1",
"mode": "text-to-image",
"enable_pro": false
}
}),
});
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 Grok Imagine via the GetVibe API.
promptreq.image_urlaspect_ratiomodeenable_proimage_file_idimage_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 |
mode | option selection | Generation (default) · Image-to-Image | Generation | Included in the base price |
enable_pro | yes/no | Yes · No (default) | No | 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 |
Request: POST https://getvibeapi.com/api/media/generate. Prices in USD.
Price of Grok Imagine
The cost of Grok Imagine: from $0.021333 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: Mode — Generation, Frame format — 1:1, Pro (quality over speed) — No. That request costs $0.021333.
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.
Whitegrok-imagine:whitefrom $0.021333exact prices
| Pro (quality over speed) \ Mode | Generation |
|---|---|
| No | $0.021333 |
Every combination as JSON: /api/media/price-table?model=grok-imagine%3Awhite
Pixelgrok-imaginefrom $0.021333exact prices
| Pro (quality over speed) \ Mode | Generation |
|---|---|
| No | $0.021333 |
Every combination as JSON: /api/media/price-table?model=grok-imagine
README
The machine-readable contract for Grok Imagine contains the request schema, operations, limits, polling and response examples.
# Grok Imagine
Public model: grok-imagine:white
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
- `mode` (option selection): Generation (default) · Image-to-Image; default: Generation
- `enable_pro` (yes/no): Yes · No (default); default: No
- `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: —
## Public variants
- `grok-imagine:white`: White
- `grok-imagine`: PixelFAQ about the Grok Imagine API
How much does Grok Imagine cost?
The price of Grok Imagine: from $0.021333 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.