Relyven API quickstart
This guide verifies the base URL, API key, model permission, and one real request. Use the protocol your client expects.
Step 1: Create an API key
Section titled “Step 1: Create an API key”Sign in to the dashboard, open API Keys, and create a key. Store it in an environment variable and never commit it to source control. See Account and API keys for lifecycle guidance.
Step 2: Choose a protocol
Section titled “Step 2: Choose a protocol”| Client | Base URL | Primary endpoint |
|---|---|---|
| OpenAI-compatible SDKs, Codex, Cline | https://api.relyven.com/v1 |
/responses or /chat/completions |
| Claude Code, Anthropic SDK | https://api.relyven.com |
/v1/messages |
Step 3: Verify authentication and models
Section titled “Step 3: Verify authentication and models”curl https://api.relyven.com/v1/models \ -H "Authorization: Bearer $RELYVEN_API_KEY"A 200 response confirms the base URL and key. A 401 means the key or header is wrong. A model missing from the list may be unavailable to that key.
Step 4: Make a request
Section titled “Step 4: Make a request”OpenAI Responses
Section titled “OpenAI Responses”curl https://api.relyven.com/v1/responses \ -H "Authorization: Bearer $RELYVEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"YOUR_MODEL_ID","input":"Reply with OK."}'Copy the exact model ID from the dashboard. Do not guess aliases.
Anthropic Messages
Section titled “Anthropic Messages”curl https://api.relyven.com/v1/messages \ -H "x-api-key: $RELYVEN_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{ "model":"YOUR_CLAUDE_MODEL_ID", "max_tokens":256, "messages":[{"role":"user","content":"Reply with OK."}] }'Messages requires max_tokens. Use a Claude model returned for the current key.
Next steps
Section titled “Next steps”- CC Switch: Configure CC Switch
- Claude Code: Direct custom API setup
- Codex: Direct custom provider setup
- Failures: Error handling