Guides
OpenCode
Connection
| Setting | Field | Value |
|---|---|---|
| Base URL (OpenAI format) | provider.offmem.options.baseURL | https://api.offmem.app/v1 |
| Key | provider.offmem.options.apiKey | {env:OFFMEM_API_KEY} · Create key |
| Main model | model | offmem/offmem-glm-5.3-sem-censura |
| Fast model | small_model | offmem/offmem-glm-5.3-flash-sem-censura |
Commands to store the key in the OFFMEM_API_KEY variable
Setup
Paste the prompt into OpenCode and it edits its own configuration, or edit the files yourself:
~/.config/opencode/opencode.json (Windows: %USERPROFILE%\.config\opencode\opencode.json)
Configure OpenCode to use offmem (an API compatible with OpenAI). The key is already in the OFFMEM_API_KEY environment variable; do not show the key in your reply.
Create or edit ~/.config/opencode/opencode.json (Windows: %USERPROFILE%\.config\opencode\opencode.json), merging this content without deleting what is already there:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"offmem": {
"npm": "@ai-sdk/openai-compatible",
"name": "offmem",
"options": {
"baseURL": "https://api.offmem.app/v1",
"apiKey": "{env:OFFMEM_API_KEY}"
},
"models": {
"offmem-glm-5.3-flash-sem-censura": {
"name": "GLM 5.3 Flash"
},
"offmem-deepseek-v4.1-flash-sem-censura": {
"name": "DeepSeek V4.1 Flash"
},
"offmem-glm-5.3-sem-censura": {
"name": "GLM 5.3"
},
"offmem-kimi-k3.1-pro": {
"name": "Kimi K3.1 Pro"
},
"offmem-minimax-m3.1-flash": {
"name": "MiniMax M3.1 Flash"
},
"offmem-deepseek-v4.1-flash-fast": {
"name": "DeepSeek V4.1 Flash Fast"
}
}
}
},
"model": "offmem/offmem-glm-5.3-sem-censura",
"small_model": "offmem/offmem-glm-5.3-flash-sem-censura"
}
At the end, tell me: Open OpenCode, type /models and pick "GLM 5.3" from the offmem provider.Open OpenCode, type /models and pick "GLM 5.3" from the offmem provider.