Quick Answer
- 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.
Key Parameters
- model | string | required | gpt-image-1-5-official | - | Exact model identifier from ToAPIs.
- prompt | string | required | - | - | Primary image instruction prompt.
- size | string | optional | 1:1 | - | Output aspect ratio, model-dependent.
- n | integer | optional | 1 | - | Number of generated images per request.
- reference_images | file[] | optional | - | - | Reference images for style consistency.
Common Errors
- 400 invalid_request_error: trigger=Missing or invalid payload fields.; fix=Validate model/prompt/size payload fields.; retry=Retry only after payload fix.
- 401 authentication_error: trigger=Missing or invalid API key.; fix=Verify Authorization header and key scope.; retry=Retry after authentication fix.


