PhoenixKitAI.Providers.OpenRouter (PhoenixKitAI v0.23.0)

Copy Markdown View Source

PhoenixKitAI.Provider adapter for OpenRouter's unified Images API.

POST <base_url>/images serves both generation and editing: the prompt plus typed options (aspect_ratio, resolution, size, quality, background, output_format, output_compression, n, seed) and, for edits, the inputs as input_references. Every image model on the gateway — Gemini's, OpenAI's, Seedream, FLUX, Grok Imagine, Qwen and the rest — sits behind the same request, and GET /images/models says per model which options it accepts (see PhoenixKitAI.Images.ImageModel).

transport: :chat keeps the older chat-completions path (image parts, modalities: ["image","text"]) for models that only answer there.

provider_options becomes OpenRouter's provider.options object; provider_routing (order, only, ignore, sort, allow_fallbacks) is merged into the same provider object.