> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://openrouter.ai/docs/llms.txt.
> For full documentation content, see https://openrouter.ai/docs/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://openrouter.ai/docs/_mcp/server.

# ImageGenerationServerToolConfig - Python SDK

The Python SDK and docs are currently in beta.
Report issues on [GitHub](https://github.com/OpenRouterTeam/python-sdk/issues).

Configuration for the openrouter:image\_generation server tool. Accepts all image\_config params (aspect\_ratio, quality, size, background, output\_format, output\_compression, moderation, etc.) plus a model field.

## Fields

| Field                | Type                                                                                                                                 | Required             | Description                                                                                        | Example                                                                    |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `model`              | *Optional\[str]*                                                                                                                     | :heavy\_minus\_sign: | Which image generation model to use (e.g. "openai/gpt-5-image"). Defaults to "openai/gpt-5-image". | openai/gpt-5-image                                                         |
| `__pydantic_extra__` | Dict\[str, [components.ImageGenerationServerToolConfigUnion](/docs/sdks/components/components/imagegenerationservertoolconfigunion)] | :heavy\_minus\_sign: | N/A                                                                                                | `{"aspect_ratio": "16:9","model": "openai/gpt-5-image","quality": "high"}` |