Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account.
import { OpenRouterCore } from "@openrouter/sdk/core.js";import { benchmarksGetBenchmarks } from "@openrouter/sdk/funcs/benchmarksGetBenchmarks.js";// Use `OpenRouterCore` for best tree-shaking performance.// You can create one instance of it to use across an application.const openRouter = new OpenRouterCore({ httpReferer: "<value>", appTitle: "<value>", appCategories: "<value>", apiKey: process.env["OPENROUTER_API_KEY"] ?? "",});async function run() { const res = await benchmarksGetBenchmarks(openRouter); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("benchmarksGetBenchmarks failed:", res.error); }}run();
Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.