API Reference
The CloudVera gateway is OpenAI-compatible. These are the additional headers and endpoints specific to CloudVera.
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer token with your CloudVera virtual key (cvk_...) |
| X-Provider-Key | Yes | Your actual provider API key (sk-..., etc.) |
| X-Model | No | Override the model in the request body |
| X-CF-Account-ID | Cloudflare only | Your Cloudflare account ID for Workers AI |
| X-Cache-TTL | No | Override cache TTL in seconds for this request |
| X-No-Cache | No | Set to "true" to bypass cache for this request |
| X-Routing-Tier | No | Routing preference: economy, standard, or premium |
| X-Routing-Max-Cost | No | Maximum cost per 1K tokens for model selection |
| X-Routing-Prefer-Providers | No | Comma-separated list of preferred providers (e.g. "openai,anthropic") |
| X-Routing-Exclude-Providers | No | Comma-separated list of providers to avoid |
| X-Routing-Capabilities | No | Required capabilities: vision, function_calling, etc. |
| X-Request-Timeout | No | Custom timeout in milliseconds for this request |
Code Examples
Endpoints
# Chat completions (OpenAI-compatible)
POST https://api.cloudvera.io/v1/chat/completions
# Embeddings
POST https://api.cloudvera.io/v1/embeddings
# Workers AI specialized models (summarization, translation, image gen, STT, TTS, etc.)
POST https://api.cloudvera.io/v1/run
# Models list
GET https://api.cloudvera.io/v1/models