Краткий вывод
- Supports prompt-based text-to-image workflows for marketing and creative assets.
- Supports reference-guided generation for stronger style consistency.
- Stabilize parameters in this guide first, then move into production API.
Ключевые параметры
- model | string | обяз. | grok-imagine-1-0 | - | Exact model identifier from ToAPIs.
- prompt | string | обяз. | - | - | Primary image instruction prompt.
- size | string | опц. | 1:1 | - | Output aspect ratio, model-dependent.
- n | integer | опц. | 1 | - | Number of generated images per request.
- reference_images | file[] | опц. | - | - | Reference images for style consistency.
Частые ошибки
- 400 invalid_request_error: триггер=Missing or invalid payload fields.; исправление=Validate model/prompt/size payload fields.; повтор=Retry only after payload fix.
- 401 authentication_error: триггер=Missing or invalid API key.; исправление=Verify Authorization header and key scope.; повтор=Retry after authentication fix.


