Model market
xAI

Grok Imagine Lite

Image generationFast · n=1–4
TPool price$0.003per image
Output specFast · n=1–4See the parameter table below
1 route

About this model

Fast text-to-image, up to 4 outputs

Request parameters

Text-to-image · POST /v1/images/generations

ParameterAccepted valuesDefaultDescription
modelRequiredModel ID—This page’s model ID
promptRequiredString,1–4000 characters—Prompt
nInteger,1 to 41Number of outputs
providerRoute ID or autoautoPin a route for multi-route models; auto uses the lowest price

Parameters outside this list return HTTP 400 with the field name and supported parameters. Parameters marked “Ignored” are accepted but unused by Web models.

Quick call

quickstart.py
from openai import OpenAI

client = OpenAI(api_key="$TPOOL_API_KEY", base_url="https://tpool.dev/v1")

image = client.images.generate(
    model="x-ai/grok-imagine-image-lite",
    prompt="A white lighthouse by the sea at dawn, light fog, a film look",
)
print(image.data[0].url)