BETA
Instructions
How to connect OpenClaw to Apily
OpenClaw is a self-hosted agent. It reads the OpenAI-compatible base URL and key from environment variables in openclaw.json — set them to Apily and pick a catalog model.
Tool
OpenClaw OpenAI-compatible
Base URL
https://apily.pro/v1Key
apily_your-api-keyConfig file
openclaw.jsonConfiguration
The env block hands the values to OpenClaw's built-in OpenAI-compatible client; agent.model selects a catalog model with the openai/ prefix:
openclaw.json
{
"env": {
"OPENAI_BASE_URL": "https://apily.pro/v1",
"OPENAI_API_KEY": "apily_your-api-key"
},
"agent": {
"model": "openai/gpt-5.6-sol"
}
}- Open
openclaw.jsonand set theenvblock to Apily's base URL and your key. - Pick a model: the ID from the Models page in your Apily account with the
openai/prefix — e.g.openai/gpt-5.6-sol,openai/claude-opus-5,openai/deepseek-v4-flash-0731. - Restart OpenClaw. Agent requests now go through Apily.
Common errors and how to fix them
| Symptom | Cause | Fix |
|---|---|---|
401 Invalid API key | Key not set or truncated. | Set OPENAI_API_KEY to the full key, apily_ prefix included. |
| Model not found | Model referenced without the provider prefix. | Use openai/<catalog-id>. |
404 Not found | Base URL missing /v1. | Base URL: https://apily.pro/v1 — every request must land on a path Apily serves (/chat/completions, /responses, /models, …). |