Docs
Connect Ervoila to Cursor, Claude Code, OpenCode, or Codex CLI.
Configure your snippets
Values are substituted into every example on this page. Nothing is sent anywhere.
Shown only once at creation — create one under API Keys, then paste it here.
Loading the catalogue…
OpenAI-compatible. Anthropic clients use the same host without the /v1 suffix.
Quickstart
curl https://loveuforever.freesrv.com/v1/chat/completions \
-H "Authorization: Bearer bps_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "[MODEL_ID]",
"messages": [{ "role": "user", "content": "Hello" }]
}'from openai import OpenAI
client = OpenAI(
base_url="https://loveuforever.freesrv.com/v1",
api_key="bps_YOUR_API_KEY",
)
response = client.chat.completions.create(
model="[MODEL_ID]",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://loveuforever.freesrv.com/v1",
apiKey: process.env.ERVOILA_API_KEY,
});
const response = await client.chat.completions.create({
model: "[MODEL_ID]",
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);Endpoints
| Method | Path | Auth | Purpose |
|---|---|---|---|
| POST | /v1/chat/completions | API key | OpenAI-compatible chat completions |
| POST | /v1/messages | API key | Anthropic-compatible messages |
| GET | /v1/models | Public | Catalogue with retail pricing |
| GET | /api/balance | Session | Account balance |
| GET | /api/usage | Session | Aggregated usage and request history |
| POST | /api/keys/create | Session | Mint an API key (shown once) |
| DELETE | /api/keys/:id | Session | Revoke an API key |
Client setup
Cursor
Settings → Models → OpenAI-compatible provider
Enable the OpenAI-compatible provider, then paste the Base URL https://loveuforever.freesrv.com/v1 and your API key. Add the model id exactly as it appears in the catalogue.
curl https://loveuforever.freesrv.com/v1/chat/completions \
-H "Authorization: Bearer bps_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "[MODEL_ID]",
"messages": [{ "role": "user", "content": "Hello" }]
}'Claude Code
Environment variables
export ANTHROPIC_BASE_URL="https://loveuforever.freesrv.com"
export ANTHROPIC_API_KEY="bps_YOUR_API_KEY"
export ANTHROPIC_MODEL="[MODEL_ID]"
claude$env:ANTHROPIC_BASE_URL="https://loveuforever.freesrv.com"
$env:ANTHROPIC_API_KEY="bps_YOUR_API_KEY"
$env:ANTHROPIC_MODEL="[MODEL_ID]"
claudeOpenCode
Create opencode.json in your project root
{
"provider": {
"ervoila": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ervoila Router",
"options": {
"baseURL": "https://loveuforever.freesrv.com/v1",
"apiKey": "bps_YOUR_API_KEY"
},
"models": {
"[MODEL_ID]": { "name": "[MODEL_ID]" }
}
}
},
"model": "ervoila/[MODEL_ID]"
}Codex CLI
Save as $HOME/.codex/config.toml
model = "[MODEL_ID]"
model_provider = "ervoila"
[model_providers.ervoila]
name = "Ervoila Router"
base_url = "https://loveuforever.freesrv.com/v1"
env_key = "ERVOILA_API_KEY"
wire_api = "responses"Authentication & errors
Presenting your key
Both header styles are accepted
Keys are prefixed bps_. Send one as a bearer token, or as x-api-key for Anthropic-compatible clients — that is what Claude Code and similar tools use.
Authorization: Bearer bps_YOUR_API_KEY
--- or ---
x-api-key: bps_YOUR_API_KEYYour key is never forwarded upstream; only the provider's own credential is.
Error codes
What each status means
- Bad request
- 400 missing or malformed field
- Unauthorized
- 401 key missing, wrong, or revoked
- Payment required
- 402 balance or key spend limit exhausted
- Forbidden
- 403 CAPTCHA check failed
- Not found
- 404 unknown model or route
- Payload too large
- 413 request body over the limit
- Too many requests
- 429 rate limited — retry with backoff
- Bad gateway
- 502 upstream model provider failed
- Unavailable
- 503 upstream unreachable
- Gateway timeout
- 504 upstream exceeded the deadline