Using wylon with agents
The wylon Token Factory exposes an inference API compatible with both OpenAI and Anthropic, so it can serve as the model backend for a wide range of coding agents (harnesses). Just point three values — Base URL, API Key, and model name — at wylon. No SDK swap or code rewrite required.
Pick a tool below for its configuration sub-page:
| Tool | Form factor | Compatible protocol | Configuration |
|---|---|---|---|
| Claude Code | CLI | Anthropic-compatible | Environment variables |
| Codex | Desktop app | OpenAI-compatible | Config file |
| OpenCode | TUI | OpenAI-compatible | Config file / interactive |
| Openclaw | CLI / TUI / Dashboard | OpenAI-compatible | Interactive wizard |
| Hermes | CLI | OpenAI-compatible | Interactive wizard |
| WorkBuddy | Desktop app | OpenAI-compatible | Settings UI |
| DeepSeek Harness | CLI / Web UI | OpenAI-compatible | YAML / settings UI |
| TraeCode | Desktop app | OpenAI-compatible | Settings UI |
| Raccoon | Desktop app | OpenAI-compatible | Settings UI |
| Zcode | Desktop app | OpenAI-compatible | Settings UI |
| ComfyUI | Web UI | OpenAI Images-compatible | Custom node |
Prerequisites
Before configuring any tool, prepare the following three pieces of information.
1. API Key
Sign in to the wylon console, then create and copy a key on the API Keys page (it looks like
sk-...). Keep it safe — do not commit it to a repository or share it publicly.
2. Base URL (choose one, per the tool's protocol)
| Protocol | Base URL | Notes |
|---|---|---|
| OpenAI-compatible | https://api.wylon.cn/v1 | Used by most chat and coding tools |
| Anthropic-compatible | https://api.wylon.cn | Used by Claude Code; the client appends /v1/messages automatically, so do not include a path |
3. Model name
wylon uses model IDs in the org/model form, for example:
- A capable (high-quality) model, e.g.
moonshotai/Kimi-K2.6 - A lightweight (fast) model, e.g.
deepseek-ai/DeepSeek-V4.1-Flash
FAQ
What if wylon is not listed as a provider?
Choose Custom / OpenAI-compatible and enter the configuration manually.
Most tools do not include a built-in wylon preset. Enter the Base URL, API Key, and model name manually. For ComfyUI, install an image-generation node that accepts a custom api_base.
Should the Base URL include /v1?
Include /v1 for OpenAI-compatible tools, but not for Claude Code.
OpenCode, Openclaw, Hermes, WorkBuddy, DeepSeek Harness, TraeCode, Raccoon, and Zcode use https://api.wylon.cn/v1. The example ComfyUI node uses https://api.wylon.cn/v1/. Claude Code uses https://api.wylon.cn because the client appends /v1/messages.
What should I enter as the model name?
Use the complete organization/model ID.
For example, moonshotai/Kimi-K2.6. See the Models page for current IDs.
Do not place API keys in code or configuration repositories.
Inject keys through environment variables whenever possible.
If a tool requires a local configuration file, make sure that file is excluded from version control.