OpenRouterOpenRouterCopy pageOpenRouter Chat and Responses API examples for model routing, retries, structured output, and tools.ExampleDescriptionChatOpenRouter Chat API examples: basic agents, image generation, ordered model fallback, retries, structured output, and tool use.ResponsesAccess multiple AI models through a unified, stateless API.Image GenerationGenerate an image through OpenRouter, decode the returned bytes, and display the result with Pillow.OverviewIndex of Perplexity sonar-pro agent examples: basic runs, knowledge, memory, retries, structured output, and web search.