快速结论
- 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 | 必填 | flux-2-pro | - | 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.


