Authorization headers with a Router Service Key (RSK). All requests must be made over HTTPS.
Key Types
Router Service Keys (rsk_...)
Your primary method of interacting with the API. These are the keys you create in the dashboard.
- Access to all inference endpoints (
/v1/chat/completions,/v1/embeddings, etc.) - Per-key spend caps — set a maximum USD limit to prevent cost overruns
- Per-key rate limits — configurable Requests Per Minute (RPM), Requests Per Day (RPD), and Tokens Per Minute (TPM)
- Optional default model — a fallback model used when none is specified in the request
Provider Keys (BYOK)
If you supply your own API keys for upstream providers (OpenAI, Anthropic, AWS Bedrock, Google Vertex AI), Mesh securely stores and uses them on your behalf. You never reference these directly in your API calls — Mesh handles routing transparently. See Bring Your Own Keys for setup instructions.Security Best Practices
1. Set spend caps on every key. This limits your blast radius if a key is compromised — the attacker can only spend up to your cap. 2. Use environment variables — never hard-code keys in source files.Using the key
All examples in this documentation usersk_YOUR_KEY as a placeholder. Replace it with your actual key:
- curl
- Python
- Node.js