How do I use the Wiozen API with OpenCode?
Add Wiozen to OpenCode as a custom provider.
In short: Add a provider to opencode.json that uses the @ai-sdk/openai-compatible package with baseURL set to https://api.wiozen.com/v1, then select the deepseek-v4.1-flash model with /models.
Requirements
- A Wiozen API key (
sk-gw-…). Sign-up is free; new accounts get trial credit. - An installed OpenCode (terminal agent).
Steps
- Put your key in the
WIOZEN_API_KEYenvironment variable. - Add the block below to the
opencode.jsonfile in your project folder. - Open OpenCode and select the Wiozen model with the
/modelscommand.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"wiozen": {
"npm": "@ai-sdk/openai-compatible",
"name": "Wiozen",
"options": {
"baseURL": "https://api.wiozen.com/v1",
"apiKey": "{env:WIOZEN_API_KEY}"
},
"models": {
"deepseek-v4.1-flash": { "name": "deepseek-v4.1-flash" }
}
}
}
}Which model name should I enter?
Only the names on the models page are accepted. Prices per 1 million tokens are listed there too. Any other model name returns 400.
Related guides
- How do you connect an OpenAI-compatible API to a tool you already use?
- Which model should you use in Cline, Cursor, OpenCode and Aider?
- How do you do function calling (tool use) with an AI API?
- How do I add web search to my AI app, and what does a search cost?
- Which AI model should I choose: deciding by price, context and quality
- An AI API returns "Unknown model": where do I find the right model name?
- My AI API returns "401 Invalid API key": why isn't my key accepted?
Other guides: Cline · Roo Code · Kilo Code · Cursor · Continue · Claude Code · Hermes Agent · Aider · Qwen Code · Open WebUI · LibreChat · AI Engine