VelATL + OpenCode
Run OpenCode through your VelATL balance.
One-minute setup. Same credits as the web workspace, same ledger, per-key spend caps - so your coding agent can't silently drain your balance.
1-minute setup
Create a key in Settings → API keys (name it e.g. “opencode laptop” - copy the secret once, revoke anytime), then add the VelATL provider to opencode.json:
opencode.json - VelATL provider preset
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"velatl": {
"npm": "@ai-sdk/openai-compatible",
"name": "VelATL",
"options": {
"baseURL": "https://velatl.ai/api/v1",
"apiKey": "velatl_..."
},
"models": {
"fast": { "name": "Swift (gpt-oss-20b)" },
"balanced": { "name": "Balanced (gpt-oss-120b)" }
}
}
}
}
# then use model: "velatl/fast" or "velatl/balanced"Sanity check - curl the same endpoint OpenCode hits
curl https://velatl.ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer velatl_..." \
-d '{"model":"balanced","messages":[{"role":"user","content":"Hi"}]}'
# 200 + assistant text = your key and baseURL are correct.What works
- Streaming, tool calling and JSON mode on both protocols (text + tools only).
- Model values:
balanced | fast- same slugs as the workspace picker. tool_choicemust be auto/none; the legacyfunctionsAPI is rejected with a clear 400 before billing.- Out of credits →
402 insufficient_credits- top up in billing, no silent failure. - Every response carries
X-Request-Id- quote it in support mail.
Control agent spend
Coding agents consume far more than casual chat: long context, tool loops and retries all bill as input tokens, including your tool schemas. Three guardrails keep this predictable:
- One key per machine. Name keys per laptop or project so Settings shows exactly where spend went.
- Per-key spend caps. New keys start capped at 5,000 credits/month, counting settled and in-flight spend; raise per project or lift it in Settings.
- Keep tool lists lean. Every tool definition bills as input tokens on every call - expose only what the task needs.
Which models can this key use?
curl https://velatl.ai/api/v1/models -H "Authorization: Bearer velatl_..." # per-1k credit rates included; failed calls refund automatically.
Why VelATL for OpenCode
One balance, INR billing
UPI, cards and netbanking via Razorpay in rupees. The same credits run the web workspace, OpenCode, Claude Code and MCP - nothing expires.
Workspace included
Go direct for the cheapest single-model tokens, or bring your agent here and get chat, docs, research and images on the same money. Entry plan covers balanced + fast from ₹199.
Honest alternative: pure API users who want 200 models should compare VelATL vs OpenRouter. Full compatibility list lives in the developer docs.