VanaAPI

← Writing

OpenCode API proxy setup with Vana API: one address, $0.10 credit

Agents at the terminalEN2026-11-07

§ Move OpenCode without rebuilding the project

Changing the model provider in an OpenCode project does not have to mean rewriting the application around it. OpenCode can talk to the OpenAI-compatible format offered by Vana API, so the main change can stay small: point the provider at one address, add a key, and select a model. Everything else in the project can remain as it is.

Vana API serves API requests at https://api.vanaapi.com. That is the only endpoint you need for this OpenCode setup. The dashboard, where you create keys, check your balance and review usage, is separate, on https://vanaapi.com. Keeping those two places distinct makes the setup easier to follow: requests go to the API address, while account details stay in the dashboard.

The central idea behind this Vana API API proxy setup is simple. One address supports three protocol formats, and OpenCode uses the OpenAI format at /v1/chat/completions. GPT models also answer on /v1/responses, which is the format used by Codex, but OpenCode can use the OpenAI-compatible chat completions route directly. You do not need to translate the rest of the project into another protocol.

There is also a small welcome credit for new accounts. Signing up provides $0.10 of credit. It is enough to make a few early requests while you confirm that OpenCode is connected and that the selected model behaves as expected in your workflow.

§ Set the OpenAI-compatible provider in OpenCode

OpenCode pairs with the GPT, Grok, DeepSeek, GLM, Kimi, Qwen, MiniMax and MiMo models available through Vana API. The relevant part of the configuration is the OpenAI-compatible provider: its base address should be https://api.vanaapi.com, and its API key should be the key you created in the Vana API dashboard.

Because the OpenAI format is used, you can select an OpenAI SDK or cURL as well as OpenCode itself. That gives you a straightforward way to check the endpoint outside the editor. A request can be sent to /v1/chat/completions with the model id you intend to use, and the same model id can then be placed in the OpenCode model configuration.

Several exact model ids are available for OpenCode. For example, the GPT family includes gpt-5.6-sol, gpt-6-astra and gpt-6.1-sol. The other listed options include grok-4.7, deepseek-v4-flash, deepseek-v4-pro, glm-5.3, kimi-k3, qwen3.7-plus, qwen3.8-max, MiniMax-M3 and MiMo-V2.6-Pro.

Choose the model id before changing the OpenCode configuration, rather than experimenting with several names in the editor. The names are case-sensitive where the list shows them that way, including MiniMax-M3 and MiMo-V2.6-Pro. Once the id matches, the rest of the OpenCode setup follows the same path for every OpenAI-format model supported by Vana API.

§ Compare the OpenCode model prices

Vana API charges by token, so the input and output prices make it easier to choose a model for a specific OpenCode workload. The GPT-5.6 Sol price is $0.3472 / $1.81 per million input and output tokens, compared with a listed price of $4 / $20. For a different balance, GPT-6 Astra is $0.6944 / $3.54, while GPT-6.1 Sol is $0.1389 / $0.8333.

DeepSeek is also available in two versions through Vana API. DeepSeek V4 Flash is priced at $0.2778 / $1.04 per million tokens, and DeepSeek V4 Pro is $1.11 / $3.33. These are exact per-million-token figures for input and output respectively, not monthly allowances or estimates.

The remaining OpenCode-compatible models have their own Vana API rates. Grok 4.7 is $0.4861 / $1.53. GLM-5.3 is $0.5556 / $1.67. Kimi K3 is $1.04 / $5.21. Qwen3.7 Plus is $0.1278 / $0.4167, and Qwen3.8 Max is $0.6944 / $2.08. MiniMax M3 is $0.1389 / $0.5556, and MiMo V2.6 Pro is $0.2083 / $0.3472.

These figures are useful when you want to compare a low-cost default with a more capable option without changing how OpenCode sends requests. Say you run the same task every day and want to test two models. You can switch the model id, send the same prompt, and review the results and token usage in the dashboard. That is an example of a comparison workflow, not a promise about output quality.

§ Use prepaid balance and keep usage visible

Vana API uses a prepaid balance and charges per real token. There is no monthly fee for this pay-as-you-go approach. You top up the balance, and usage is deducted according to the input and output prices for the model that handled the request. This keeps the OpenCode migration focused: you can begin with a small balance and observe actual use before deciding how much to add.

Every call is listed in the usage log in the Vana API dashboard. That log sits at https://vanaapi.com, while the request address remains https://api.vanaapi.com. When you return from OpenCode to check the log, you can see which calls were made and how the balance changed. Keys are also created and managed in the dashboard, so there is one place to handle credentials and one address to put into OpenCode.

A monthly option is available when usage becomes predictable. The plan for GPT up to $2,750 / 30 days costs $103.61 for 30 days, with at most $820 a week, and it covers GPT models only. It is separate from the per-token billing described above, so it is worth checking the GPT-only scope before selecting it for a project that also uses DeepSeek or another OpenAI-format model.

The refund policy also gives you a defined window. Unused balance can be refunded within 3 days of the top-up, minus what was used and the payment processor's fee. That is a specific condition rather than an open-ended refund promise, and it is worth keeping in mind when making an initial top-up for OpenCode.

§ Check the connection, then leave the project alone

A five-minute verification can be divided into a short sequence. Create a key in the Vana API dashboard, confirm the prepaid balance, and enter https://api.vanaapi.com as the OpenAI-compatible base address in OpenCode. Add the key, choose one model id from the list, and send a small request. If the response arrives, the provider path is working.

Next, open the usage log and confirm that the call appears there. That confirms both halves of the setup: the request reached the API address, and the call was recorded against your dashboard balance. If the model id is wrong, the usage log gives you a clear place to start checking the configuration before altering anything else in the project.

You can then keep the OpenCode workflow as it is and adjust only the model id when needed. The OpenAI-compatible path covers the listed GPT, Grok, DeepSeek, GLM, Kimi, Qwen, MiniMax and MiMo models, all through the same Vana API address. Other protocol formats are available on that address too, but they are separate from the OpenCode path and are not required for this migration.

Vana API also includes a referral programme. You receive 14% of what people you invite pay, with 5% one level further, and earnings can be withdrawn from $13.89. This does not affect the technical setup, but it is part of how the service handles prepaid balance and referrals.

The practical result is a contained change: one address, three protocol formats, and a small set of OpenCode settings. With OpenCode left in place, Vana API provides the endpoint, the token-based billing and a dashboard record of every call. The rest of the project can continue doing what it already does.