OpenClaw
OpenClaw is an open-source personal AI assistant gateway. Its local configuration lives at ~/.openclaw/openclaw.json. OpenClaw supports custom OpenAI-compatible model providers through models.providers; if the backend implements /v1/chat/completions, it can be connected as a custom provider. Sakrylle API is compatible with OpenAI Chat Completions, so the recommended adapter is openai-completions.
- Repo: https://github.com/openclaw/openclaw
- Configuration docs: https://documentation.openclaw.ai/gateway/config-tools
- Model provider docs: https://documentation.openclaw.ai/concepts/model-providers
Prerequisites
- OpenClaw installed and initialized with
openclaw onboardaccording to the official instructions. - An API Key created in the Sakrylle Console.
- The Key's model group includes the model you want to use; this example uses
gpt-5.6-solfor chat.
Recommended config
1. Set env
export SAKRYLLE_API_KEY="sk-xxxxxxxxxxxxxxxx"Add the line to your shell config (~/.zshrc or ~/.bashrc) for persistence.
2. Edit config
If the file already exists, merge in the agents.defaults and models.providers.sakrylle sections below:
{
agents: {
defaults: {
model: {
primary: "sakrylle/gpt-5.6-sol"
},
models: {
"sakrylle/gpt-5.6-sol": {
alias: "Sakrylle GPT-5.6 Sol"
}
}
}
},
models: {
mode: "merge",
providers: {
sakrylle: {
baseUrl: "https://api.sakrylle.com/v1",
apiKey: "${SAKRYLLE_API_KEY}",
api: "openai-completions",
models: [
{
id: "gpt-5.6-sol",
name: "GPT-5.6 Sol"
}
]
}
}
}
}Field reference:
baseUrl: Sakrylle's OpenAI-compatible endpoint, with/v1.apiKey: use${SAKRYLLE_API_KEY}so the real Key is not stored directly in a config file that might be synced.api:openai-completionsuses/v1/chat/completions; OpenClaw also defaults custom providers withbaseUrlto this adapter, but writing it explicitly is clearer.models.providers.sakrylle.models[].id: the provider-local model ID only. OpenClaw references it at runtime asprovider/model, so the full ref issakrylle/gpt-5.6-sol.models.mode: "merge": keep OpenClaw's existing model list and append the Sakrylle provider.
3. Verify
Restart OpenClaw, confirm the model picker shows Sakrylle GPT-5.6 Sol or sakrylle/gpt-5.6-sol, then send a simple message. If the response returns normally, the configuration is active.
Choose another model
To use another Sakrylle chat model:
- Add the model to
models.providers.sakrylle.models. - Add the matching
sakrylle/<model>entry underagents.defaults.models. - Point
agents.defaults.model.primaryto the target model ref.
Example:
{
agents: {
defaults: {
model: {
primary: "sakrylle/claude-haiku-4-5-20251001"
},
models: {
"sakrylle/gpt-5.6-sol": {
alias: "Sakrylle GPT-5.6 Sol"
},
"sakrylle/claude-haiku-4-5-20251001": {
alias: "Sakrylle Claude Haiku 4.5"
}
}
}
},
models: {
mode: "merge",
providers: {
sakrylle: {
baseUrl: "https://api.sakrylle.com/v1",
apiKey: "${SAKRYLLE_API_KEY}",
api: "openai-completions",
models: [
{
id: "gpt-5.6-sol",
name: "GPT-5.6 Sol"
},
{
id: "claude-haiku-4-5-20251001",
name: "Claude Haiku 4.5"
}
]
}
}
}
}For the available model list, see Models and Pricing.
Image model note
OpenClaw's official OpenAI plugin supports image generation and uses openai/gpt-image-2 as the image generation / editing model ref. Sakrylle's image model is gpt-image-2 (the GPT-Image group, ¥0.15/call). Because one Sakrylle API Key can bind to one group only, create separate Keys in the Console if you need both chat and image capabilities.
If you only configure the sakrylle chat provider above, OpenClaw chat requests will use Sakrylle, while image tools still depend on your separate OpenAI image-plugin configuration inside OpenClaw.
FAQ
- 401 / authentication failed: check that
SAKRYLLE_API_KEYis exported and thatapiKeyis either${SAKRYLLE_API_KEY}or a valid Key. - 404 / model not found: ensure
models[].idandagents.defaults.model.primaryuse model names listed in Models and Pricing. - OpenClaw cannot find the model: use the
provider/modelref such assakrylle/gpt-5.6-sol, not justgpt-5.6-sol. - Request-body compatibility errors: OpenClaw documents compatibility switches such as
compat.requiresStringContentandcompat.strictMessageKeys; add them only if the backend returns a message-format error. - 402 insufficient balance: top up in the Console.
