OpenRouter Generation API

The Generation API allows querying for generation statistics and historical usage data, including token counts, cost calculations, cached token tracking, and reasoning token counts for completed requests via the /api/v1/generation endpoint.

OpenAPI Specification

openapi.json Raw ↑