xAI image generation for expressive, prompt-driven concepts.
Pass one of these ids as model. Each id covers the tasks listed next to it; credit costs match the studio.
| Model Id | Tasks | Credits | Output | Est. Time |
|---|---|---|---|---|
grok-image | Text to Image, Image to Image | — | 1K | 10-45s |
Submit a text to image job with grok-image. The API answers 202 with a generation in queued state.
1curl https://vogoo.ai/api/v1/generations \2-H "Authorization: Bearer $VOGOO_API_KEY" \3-H "Content-Type: application/json" \4-d '{5"model": "grok-image",6"scene": "text-to-image",7"prompt": "Studio product shot of a matte black sneaker, soft light",8"options": {9"aspect_ratio": "1:1"10}11}'
| Field | Type | Description |
|---|---|---|
model | string, required | A model id from the models market or GET /api/v1/models. |
prompt | string | What to generate. Required unless options carries the full input. |
scene | string | One of the model's tasks, such as text-to-video or image-to-video. Defaults to the first one. |
options | object | Model settings such as aspect_ratio, duration, image_input (image models) or image_urls (video models). Unsupported keys are ignored. |
enhance_prompt | boolean | Let Vogoo rewrite the prompt before it reaches the model. Default false. |
Valid scene values for Grok Imagine: text-to-image, image-to-image.
Poll every few seconds until status is completed or failed.
curl https://vogoo.ai/api/v1/generations/$GENERATION_ID \
-H "Authorization: Bearer $VOGOO_API_KEY"{
"id": "…",
"object": "generation",
"status": "completed",
"model": "grok-image",
"model_name": "Grok Imagine",
"type": "image",
"scene": "text-to-image",
"outputs": [
{ "type": "image", "url": "https://…" }
],
"error": null
}Errors use one shape for every model. See the full list in the general API docs.
{ "error": { "code": "INSUFFICIENT_CREDITS", "message": "…" } }