Grok Imagine Image 2.0
x-ai/grok-imagine-image-2.0ImageText to image.
Per image€0.009Each image you get back
DeliveryIn the responseBase64 (or a URL) in the same request
Uptime99.90%last 30 days
Uptime · 30 days99.90%
Measured on our own gateway, per day.
Good fit for
- Product shots, ads and illustrations
- Make images from text (/v1/images/generations)
- Edit your images (/v1/images/edits)
- One image per request
Make an image
import base64, osfrom openai import OpenAIclient = OpenAI( base_url="https://api.nexrouting.com/v1", api_key=os.environ["NEXROUTING_API_KEY"],)img = client.images.generate( model="x-ai/grok-imagine-image-2.0", prompt="A lighthouse at dawn, watercolor",)open("image.png", "wb").write(base64.b64decode(img.data[0].b64_json))