Quick Start
Get up and running in 4 steps. CloudVera uses an OpenAI-compatible API, so you only need to change your base URL.
Steps
Create an Account
Sign up at cloudvera.io with your email. You'll receive a magic link — no password required. Start with a 14-day free trial.
Create a Project
Navigate to AI Gateway → Projects and create your first project. Each project gets its own configuration, virtual keys, and security policies.
Get a Virtual Key
Go to your project settings and create a virtual API key. This key authenticates your app with CloudVera and routes traffic to your configured providers.
Update Your SDK
Change your OpenAI SDK base URL to the CloudVera gateway endpoint. Add your provider key as a header. That's it — all traffic now flows through CloudVera.
Code Examples
OpenAI SDK (Node.js)
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: 'cvk_your_cloudvera_key',
baseURL: 'https://api.cloudvera.io/v1',
defaultHeaders: {
'X-Provider-Key': process.env.OPENAI_API_KEY,
},
});
const completion = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(completion.choices[0].message.content);
Anthropic SDK
import Anthropic from '@anthropic-ai/sdk';
const anthropic = new Anthropic({
apiKey: 'cvk_your_cloudvera_key',
baseURL: 'https://api.cloudvera.io/v1',
defaultHeaders: {
'X-Provider-Key': process.env.ANTHROPIC_API_KEY,
},
});
const message = await anthropic.messages.create({
model: 'claude-sonnet-4-5-20250929',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude!' }],
});
cURL
curl https://api.cloudvera.io/v1/chat/completions \
-H "Authorization: Bearer cvk_your_cloudvera_key" \
-H "X-Provider-Key: sk-your-openai-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Google Gemini (via OpenAI SDK)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'cvk_your_cloudvera_key',
baseURL: 'https://api.cloudvera.io/v1',
defaultHeaders: {
'X-Provider-Key': process.env.GEMINI_API_KEY,
},
});
// Use any Gemini model — CloudVera translates the format automatically
const completion = await client.chat.completions.create({
model: 'gemini-2.5-flash',
messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(completion.choices[0].message.content);
Python (OpenAI SDK)
# pip install openai
from openai import OpenAI
import os
client = OpenAI(
api_key="cvk_your_cloudvera_key",
base_url="https://api.cloudvera.io/v1",
default_headers={
"X-Provider-Key": os.environ["OPENAI_API_KEY"],
},
)
completion = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}],
)
print(completion.choices[0].message.content)
Python (Anthropic SDK)
# pip install anthropic
from anthropic import Anthropic
import os
client = Anthropic(
api_key="cvk_your_cloudvera_key",
base_url="https://api.cloudvera.io/v1",
default_headers={
"X-Provider-Key": os.environ["ANTHROPIC_API_KEY"],
},
)
message = client.messages.create(
model="claude-sonnet-4-5-20250929",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello, Claude!"}],
)
print(message.content[0].text)
fetch (vanilla JS/TS)
const response = await fetch('https://api.cloudvera.io/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer cvk_your_cloudvera_key',
'X-Provider-Key': 'sk-your-openai-key',
},
body: JSON.stringify({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Hello!' }],
}),
});
const data = await response.json();
console.log(data.choices[0].message.content);