Base URL
Two APIs, One Gateway
Raven has two distinct API surfaces:| API | Base Path | Authentication | Purpose |
|---|---|---|---|
| Proxy API | /v1/ | Virtual key (Bearer token) | Send LLM requests through the gateway |
| Management API | / | Session cookie or Bearer token | Manage providers, keys, guardrails, etc. |
Proxy API
The proxy API handles AI requests. It is OpenAI-compatible:Management API
The management API handles resource configuration:Authentication
Two authentication methods are supported. See Authentication for full details.| Method | Used For | Header |
|---|---|---|
| Virtual key | Proxy API and management API | Authorization: Bearer rk_live_... |
| Session cookie | Dashboard (web app) | Set automatically by the browser |
Request Format
All requests should include:Response Format
Success
Successful responses return JSON with the relevant data:Errors
Errors return a consistent structure:HTTP Status Codes
| Code | Description | Common Causes |
|---|---|---|
200 | Success | Request completed successfully |
201 | Created | Resource created successfully |
400 | Bad Request | Invalid input, missing required fields, unsupported model |
401 | Unauthorized | Missing or invalid API key |
402 | Payment Required | Budget exceeded |
403 | Forbidden | IP not in allowlist, insufficient permissions, data residency violation |
404 | Not Found | Resource does not exist |
409 | Conflict | Resource already exists (e.g., duplicate domain) |
413 | Payload Too Large | Request body exceeds size limit |
429 | Rate Limited | Rate limit exceeded |
500 | Internal Server Error | Unexpected server error |
Rate Limits
Rate limits are applied per virtual key. When exceeded, the API returns429 Too Many Requests. See Rate Limiting for configuration details.
Versioning
The chat completions endpoint is versioned under/v1:
Request IDs
Every response includes anX-Request-ID header for tracing:
Raven-Specific Headers
Proxy responses include additional headers:| Header | Description |
|---|---|
X-Raven-Provider | Provider that handled the request |
X-Raven-Model | Model that was used |
X-Raven-Latency-Ms | Total request latency in milliseconds |
X-Guardrail-Warnings | Guardrail warnings, if any |
BYOK (Bring Your Own Key)
You can provide your own provider API key for a request using theX-Provider-Key header:
X-Provider-Key is present, that key is used instead of the organization’s stored provider key. All gateway features (logging, guardrails, rate limiting, budgets) still apply.
Next Steps
Authentication
Learn about auth methods and virtual keys.
Chat Completions
Send your first LLM request.