Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
allow_fallbacks | OptionalNullable[bool] | ➖ | Whether to allow backup providers to serve requests - true: (default) when the primary provider (or your custom providers in “order”) is unavailable, use the next best provider. - false: use only the primary/custom provider, and return the upstream error if it’s unavailable. | |
data_collection | OptionalNullable[components.ImageGenerationRequestDataCollection] | ➖ | Data collection setting. If no available model provider meets the requirement, your request will return an error. - allow: (default) allow providers that may train on user data - deny: use only providers that do not train on user data. Providers may still retain prompts; set zdr: true to exclude retention. | allow |
ignore | List[components.ImageGenerationProviderPreferencesIgnore] | ➖ | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | [ “openai”, “anthropic” ] |
only | List[components.ImageGenerationProviderPreferencesOnly] | ➖ | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | [ “openai”, “anthropic” ] |
options | Optional[components.ImageGenerationProviderPreferencesOptions] | ➖ | N/A | { “black-forest-labs”: { “guidance”: 3, “steps”: 40 } } |
order | List[components.ImageGenerationProviderPreferencesOrder] | ➖ | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | [ “openai”, “anthropic” ] |
sort | OptionalNullable[components.ImageGenerationProviderPreferencesSort] | ➖ | The sorting strategy to use for this request, if “order” is not specified. When set, no load balancing is performed. | price |
zdr | OptionalNullable[bool] | ➖ | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |