Grok Imagine Image 2.0
x-ai/grok-imagine-image-2.0
Overview
Images
xAI's improved Grok Imagine model, with automatic quality settings and new aspect ratios such as 21:9 widescreen.
Made by xAI
Input
TextOutput
Images- Context
- 64.000
- Input, maximum
- 64.000
- Reasoning Not supported
- Automatic fallback routes Not supported
Routes and pricing
Providers are tried in the order listed below. We try these providers in order. If one fails, we move on to the next, and you pay the rate of the one that answers.
xAI
primary- Images
- Rp740,00per image$40000
Per-part units
- Max images per request
- 10
Today's reference rate: Rp18.500/USD
Prices exclude the 5,5% service fee
Data and privacy
xAI xAI API security FAQ
- Used to train models
- No
- Retention
- 30 days for abuse audits, then deleted.
- Processing location
- Not stated in the policy.
- At indoRouter
- We don't store your prompts or responses. Files you upload, batches, and responses you send with
store: trueare kept encrypted for up to 30 days.
Code samples
Use this model ID with any OpenAI SDK. The base URL is the same for every model.
curl https://api.indorouter.ai/v1/images/generations \
-H "authorization: Bearer $INDOROUTER_API_KEY" \
-H "content-type: application/json" \
-d '{"model": "x-ai/grok-imagine-image-2.0", "prompt": "kucing di atas becak"}'
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.indorouter.ai/v1",
api_key=os.environ["INDOROUTER_API_KEY"],
)
image = client.images.generate(model="x-ai/grok-imagine-image-2.0", prompt="kucing di atas becak")
print(image.data[0])
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.indorouter.ai/v1",
apiKey: process.env.INDOROUTER_API_KEY,
});
const image = await client.images.generate({ model: "x-ai/grok-imagine-image-2.0", prompt: "kucing di atas becak" });
console.log(image.data[0]);