API Reference

The CloudVera gateway is OpenAI-compatible. These are the additional headers and endpoints specific to CloudVera.

HeaderRequiredDescription
AuthorizationYesBearer token with your CloudVera virtual key (cvk_...)
X-Provider-KeyYesYour actual provider API key (sk-..., etc.)
X-ModelNoOverride the model in the request body
X-CF-Account-IDCloudflare onlyYour Cloudflare account ID for Workers AI
X-Cache-TTLNoOverride cache TTL in seconds for this request
X-No-CacheNoSet to "true" to bypass cache for this request
X-Routing-TierNoRouting preference: economy, standard, or premium
X-Routing-Max-CostNoMaximum cost per 1K tokens for model selection
X-Routing-Prefer-ProvidersNoComma-separated list of preferred providers (e.g. "openai,anthropic")
X-Routing-Exclude-ProvidersNoComma-separated list of providers to avoid
X-Routing-CapabilitiesNoRequired capabilities: vision, function_calling, etc.
X-Request-TimeoutNoCustom 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