RouterBase API Integration
Overview
Integrate applications with routerbase as an OpenAI-compatible model gateway. This skill covers SDK migration, base URL configuration, streaming, tool calling, JSON mode, vision inputs, request validation, error handling, and safe credential handling.
When to Use
Use this skill when the user asks for:
- Migrating OpenAI-compatible SDK calls to RouterBase
- Setting
base_url or baseURL to https://routerbase.com/v1
- Configuring RouterBase API keys without exposing secrets
- Implementing chat completions, streaming, tool calling, JSON mode, or vision inputs
- Writing concise RouterBase integration examples for Python, JavaScript, curl, LangChain, LlamaIndex, Vercel AI SDK, Cursor, Continue, or similar clients
Do not use
Do not use this skill for:
- Publishing, logging, or storing real API keys
- Guessing provider-specific behavior that is not documented by the user or upstream docs
- Rewriting a working provider integration when the user only needs model selection guidance
Instructions
- Identify the user's current client, language, model ID, and deployment environment.
- Keep the existing OpenAI-compatible SDK when possible; change only the base URL, model, and local secret configuration.
- Use placeholders such as
<ROUTERBASE_API_KEY> in examples.
- Keep credentials server-side and out of git.
- Prefer a small test request before suggesting broad application changes.
- Include a verification checklist with expected status code, response shape, timeout handling, and redaction requirements.
1---
2name: routerbase-api-integration
3description: Use when integrating applications with an OpenAI-compatible model gateway, migrating SDK calls, or documenting safe API key handling for RouterBase.
4---
5
6# RouterBase API Integration
7
8## Overview
9
10Integrate applications with [routerbase](https://routerbase.com/) as an OpenAI-compatible model gateway. This skill covers SDK migration, base URL configuration, streaming, tool calling, JSON mode, vision inputs, request validation, error handling, and safe credential handling.
11
12## When to Use
13
14Use this skill when the user asks for:
15- Migrating OpenAI-compatible SDK calls to RouterBase
16- Setting `base_url` or `baseURL` to `https://routerbase.com/v1`
17- Configuring RouterBase API keys without exposing secrets
18- Implementing chat completions, streaming, tool calling, JSON mode, or vision inputs
19- Writing concise RouterBase integration examples for Python, JavaScript, curl, LangChain, LlamaIndex, Vercel AI SDK, Cursor, Continue, or similar clients
20
21## Do not use
22
23Do not use this skill for:
24- Publishing, logging, or storing real API keys
25- Guessing provider-specific behavior that is not documented by the user or upstream docs
26- Rewriting a working provider integration when the user only needs model selection guidance
27
28## Instructions
29
301. Identify the user's current client, language, model ID, and deployment environment.
312. Keep the existing OpenAI-compatible SDK when possible; change only the base URL, model, and local secret configuration.
323. Use placeholders such as `<ROUTERBASE_API_KEY>` in examples.
334. Keep credentials server-side and out of git.
345. Prefer a small test request before suggesting broad application changes.
356. Include a verification checklist with expected status code, response shape, timeout handling, and redaction requirements.