OpenRouter

One API for many language and image models from different providers, compatible with the OpenAI chat completions format, billed from prepaid credit.

Website ↗

OpenRouter routes requests to many models through one endpoint, https://openrouter.ai/api/v1/chat/completions. In my RSS news it serves both Claude Haiku for rating and writing and Nano Banana for title images.

  • Structured output: response_format with a JSON schema and strict: true. provider.require_parameters: true limits the request to providers that support every parameter sent.
  • Supported parameters differ per model and are listed under supported_parameters in https://openrouter.ai/api/v1/models. A parameter the model does not support, together with require_parameters, leads to "No endpoints found" (404).
  • Images: modalities: ["image", "text"] and image_config.aspect_ratio; the image comes back as a base64 data: URL in choices[0].message.images.
  • Keys can get a spending limit, so a separate key per use can be limited and revoked on its own.

More on this

Used in
  • RSS News with n8n and OpenRouter Guide: n8n reads security notices, a language model rates and rewrites them, and a restricted SSH script commits them to the Git repository of a static site.
Tags

Show in the graph view →