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 |
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 tools (OpenCode / Openclaw / Hermes) |
| 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-Flash
FAQ
I can't find wylon in the provider list — what do I do?
Apart from Claude Code (environment variables) and OpenCode (config file), tools like Openclaw and Hermes don't
ship a built-in wylon preset. In the wizard, choose a "Custom / OpenAI-compatible" option and enter the Base URL,
API Key, and model name manually.
Should the Base URL include /v1?
For OpenAI-compatible tools (OpenCode / Openclaw / Hermes), use https://api.wylon.cn/v1. Claude Code
uses the Anthropic-compatible protocol, so set ANTHROPIC_BASE_URL to https://api.wylon.cn
(no path — the client appends /v1/messages automatically).
What do I put for the model name?
Use the full org/model ID (e.g. moonshotai/Kimi-K2.6). For available models and their exact
IDs, refer to the Models page.
Keep your API Key out of code and config repositories.
Inject the key via an environment variable where possible. If you must write it into a local config file, make sure
that file is not committed to version control.