> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# BatchProviderPreferences

Batch provider routing preferences. Only `provider.only` and `provider.allow_fallbacks` are supported.

## 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.  | |
| `only` | List\[[components.BatchProviderPreferencesOnly](../components/batchproviderpreferencesonly.mdx)] | ➖ | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | \[ "openai", "anthropic" ] |
