> ## 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.

# ImageGenerationProviderPreferences

Provider routing preferences and provider-specific passthrough configuration.

## Example Usage

```typescript theme={null}
import { ImageGenerationProviderPreferences } from "@openrouter/sdk/models";

let value: ImageGenerationProviderPreferences = {};
```

## Fields

| Field            | Type                                                                                                        | Required             | Description                                                                                                                                                                                                                                                                                         | Example                                                                            |
| ---------------- | ----------------------------------------------------------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `allowFallbacks` | *boolean*                                                                                                   | :heavy\_minus\_sign: | Whether to allow backup providers to serve requests<br />- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br />- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br /> |                                                                                    |
| `ignore`         | *models.ImageGenerationProviderPreferencesIgnore*\[]                                                        | :heavy\_minus\_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.                                                                                                                                                               | \[<br />"openai",<br />"anthropic"<br />]                                          |
| `only`           | *models.ImageGenerationProviderPreferencesOnly*\[]                                                          | :heavy\_minus\_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.                                                                                                                                                                | \[<br />"openai",<br />"anthropic"<br />]                                          |
| `options`        | [models.ImageGenerationProviderPreferencesOptions](../models/imagegenerationproviderpreferencesoptions.mdx) | :heavy\_minus\_sign: | N/A                                                                                                                                                                                                                                                                                                 | \{<br />"black-forest-labs": \{<br />"guidance": 3,<br />"steps": 40<br />}<br />} |
| `order`          | *models.ImageGenerationProviderPreferencesOrder*\[]                                                         | :heavy\_minus\_sign: | 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.                     | \[<br />"openai",<br />"anthropic"<br />]                                          |
| `sort`           | *models.ImageGenerationProviderPreferencesSort*                                                             | :heavy\_minus\_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.                                                                                                                                                                                | price                                                                              |
