Integrations
zcode
Generic OpenAI-compatible setup for zcode.
zcode follows the standard OpenAI-compatible convention: a base URL plus an API key from the environment. Point both at TokenRouter and pick any routed model.
Setup
bash
export OPENAI_BASE_URL=https://api.tokenrouter.io/v1
export OPENAI_API_KEY=tr_your_key_here
zcodeIf your zcode install uses a config file instead, set the equivalent fields:
json
{
"provider": "openai-compatible",
"base_url": "https://api.tokenrouter.io/v1",
"api_key_env": "TOKENROUTER_API_KEY",
"model": "glm/glm-4.6"
}Notes
- All chat-completions features work: streaming, tools, and
reasoning_contentfor DeepSeek-family models. modelaccepts any routed model ID, includingauto.- This same recipe works for any other OpenAI-compatible tool not covered by a dedicated guide.