ImageGenerationServerToolOpenRouter - Python SDK

ImageGenerationServerToolOpenRouter method reference

The Python SDK and docs are currently in beta. Report issues on GitHub.

OpenRouter built-in server tool: generates images from text prompts using an image generation model

Fields

FieldTypeRequiredDescriptionExample
parametersOptional[components.ImageGenerationServerToolConfig]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.{"aspect_ratio": "16:9","model": "openai/gpt-5-image","quality": "high"}
typecomponents.ImageGenerationServerToolOpenRouterType✔️N/A