Diagnose and fix common OpenRouter API errors. Use when encountering error codes or unexpected failures. Trigger with phrases like 'openrouter error', 'openrouter 401', 'openrouter 429', 'fix openrouter'.
From openrouter-packnpx claudepluginhub nickloveinvesting/nick-love-plugins --plugin openrouter-packThis skill is limited to using the following tools:
references/authentication-errors-(401).mdreferences/errors.mdreferences/examples.mdreferences/model-errors-(400).mdreferences/rate-limit-errors-(429).mdreferences/request-errors.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
This skill provides a comprehensive reference for diagnosing and resolving the most frequently encountered OpenRouter API errors.
error.code field in the response body for the specific error type| Error | Cause | Fix |
|---|---|---|
| 401 Unauthorized | Invalid, expired, or missing API key | Verify key starts with sk-or-; check it's not revoked at openrouter.ai/keys |
| 402 Payment Required | No credits remaining | Add credits at openrouter.ai/credits; or use a free model like google/gemma-2-9b-it:free |
| 429 Too Many Requests | Rate limit exceeded | Implement exponential backoff; respect Retry-After header; reduce request rate |
| 400 Bad Request | Malformed request body | Validate messages array format; check model ID includes provider prefix |
| 408 Request Timeout | Model took too long to respond | Retry with a faster model; reduce max_tokens; use streaming |
| 502/503 Server Error | Upstream provider outage | Retry with backoff; check status.openrouter.ai; use fallback models |
See ${CLAUDE_SKILL_DIR}/references/errors.md for full error reference.
See ${CLAUDE_SKILL_DIR}/references/examples.md for runnable code samples.