Key Info

OpenRouter says the best way to know whether new models fit your tasks is to test them on those tasks, and shows how an agent can do this through the generation/content endpoint. Input & Output Logging must be enabled in OpenRouter settings for it to work.

Highlights

  • The example uses a single generation id, but the same process can run across multiple generations via your logging or tracing method.
  • Other uses: debug failures with the raw provider error and every failed attempt.
  • Build an eval set from real prompts and shipped completions.
  • Read a model's reasoning behind a bad answer and inspect the exact messages your app sent.
  • API reference and Input & Output Logging docs are linked.