From 50b74dd570bf0917b0a35ae79fcfdc746949c2a1 Mon Sep 17 00:00:00 2001 From: cryptam <102138190+CryptAm@users.noreply.github.com> Date: Wed, 24 Jun 2026 15:55:58 +0300 Subject: [PATCH] Fix: missing required `apiKey` The code example uses new `OpenRouter()` without passing the `apiKey` parameter. According to the SDK documentation and all other examples, the API key is mandatory. --- client-sdks/usage-for-agents.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-sdks/usage-for-agents.mdx b/client-sdks/usage-for-agents.mdx index d6206e8..65a8d9d 100644 --- a/client-sdks/usage-for-agents.mdx +++ b/client-sdks/usage-for-agents.mdx @@ -88,7 +88,7 @@ The assistant will know to use: ```typescript lines import { OpenRouter } from '@openrouter/sdk'; -const client = new OpenRouter(); +const client = new OpenRouter({ apiKey: process.env.OPENROUTER_API_KEY }); const completion = await client.chat.send({ model: 'anthropic/claude-sonnet-4',