Connect OpenClaw
Connect OpenClaw to this API using OpenAI Chat Completions.
On this page
Create a platform key and set the client’s base URL to https://api.saveapi.cc. The gateway accepts paths with and without /v1.
Run openclaw onboard. Choose Custom Provider and OpenAI compatibility, then enter the URL, key, and model ID. For the file-based setup, make AI_API_KEY available to OpenClaw.
{
"agents": {
"defaults": {
"model": {
"primary": "saveapi/deepseek-v4.1-flash"
}
}
},
"models": {
"mode": "merge",
"providers": {
"saveapi": {
"baseUrl": "https://api.saveapi.cc",
"api": "openai-completions",
"apiKey": "${AI_API_KEY}",
"models": [
{
"id": "deepseek-v4.1-flash",
"name": "DeepSeek V4.1 Flash",
"input": [
"text"
]
}
]
}
}
}
}| API format | Base URL | Configuration location |
|---|---|---|
| OpenAI Chat Completions | https://api.saveapi.cc | openclaw onboard · ~/.openclaw/openclaw.json |
Run the agent on your computer or server for scheduled or chat tasks. Select a model for the workload. Each call is billed by token usage, so more frequent checks generate more calls.
Claude Duet uses a Claude account. This guide configures a self-hosted agent that connects with your platform key and a custom model URL.
Set AI_API_KEY to your platform key and run the example. HTTP 200 confirms that the key and request URL work. When switching models, use an ID from GET /v1/models.
curl -sS "https://api.saveapi.cc/v1/chat/completions" \
-H "Authorization: Bearer $AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4.1-flash",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'| Status | What to do |
|---|---|
401 | Check that the request carries an active platform key in the correct header. |
402 | Check your wallet balance and top up before retrying. |
404 | Check the API format, path, and model ID. Use the ID from GET /v1/models. |
429 | Reduce request rate or concurrency. Wait for Retry-After when present, or back off between attempts. |
5xx | The service may be unavailable or timed out. Check the original call and usage history before retrying with bounded backoff. |
Include the x-request-id response header when reporting an issue, if available. It identifies the request on this platform.
Should the base URL end in /v1?
Follow the API format table above. The client appends the request path. Avoid repeating /v1 or using the full request path as the base URL.
Can I use another model?
Yes. Choose an enabled model that works with your API format and use its exact ID from GET /v1/models.
Can the client send images?
This platform’s model endpoints accept text input only. Select text if the client lets you set the input type.