Documentation Index
Fetch the complete documentation index at: https://docs.anyapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
OpenClaw
OpenClaw is an AI coding agent with support for custom OpenAI-compatible providers, fallback chains, and messaging gateway mode (Discord, Slack, Telegram, etc.).AnyAPI is not a bundled provider in OpenClaw. You wire it in as a custom OpenAI-compatible provider under
models.providers. Once registered, OpenClaw addresses models as anyapi/<vendor>/<model> (your provider ID prefix + the upstream model ID).OpenClaw uses JSON5 at
~/.openclaw/openclaw.json — unquoted keys, trailing commas, and // comments are all valid.Quick Start
The fastest path is the non-interactive onboarding wizard:baseUrl: https://api.anyapi.ai/v1, stores the API key as an env reference, and sets openai/gpt-4o as the default model.
Then start OpenClaw:
Prefer interactive setup? Run
openclaw onboard without flags to walk through provider, URL, key, and model selection step by step.Manual Configuration
Edit~/.openclaw/openclaw.json directly for full control:
Model Reference Format
OpenClaw composes model refs as<provider-id>/<upstream-model-id>. With provider ID anyapi:
anyapi/openai/gpt-4o— correctanyapi/anthropic/claude-sonnet-4.6— correctopenai/gpt-4o— won’t route through theanyapiprovidergpt-4o— missing vendor prefix, AnyAPI returns HTTP 400
id field inside models.providers.anyapi.models[] is the upstream ID sent to AnyAPI (e.g. openai/gpt-4o). The anyapi/ prefix is added by OpenClaw based on your provider ID.
Browse all available models at anyapi.ai/ai-models or query the API:
Configuration Examples
- GPT-4o
- Claude Sonnet
- Multi-model with fallbacks
Advanced Configuration
Per-model parameters
Per-model parameters
Set per-model defaults via
agents.defaults.models:Model metadata (context window, image input)
Model metadata (context window, image input)
Enrich model entries to enable image inputs and set context windows:OpenClaw won’t infer image capability for custom providers automatically — declare it explicitly.
Custom headers
Custom headers
Add request headers for tracking:
Auth profiles
Auth profiles
For multi-account setups, OpenClaw supports auth profiles. Store a key in OS keychain:
CLI Reference
Troubleshooting
Provider not found / config validation fails
Provider not found / config validation fails
OpenClaw rejects unknown keys. Use the canonical field names:
baseUrl(camelCase, notbaseURL)apiKey(object or${VAR}template, notapiKeyEnvVar)
openclaw config validate.No API key for provider 'anyapi'
No API key for provider 'anyapi'
The
apiKey reference doesn’t resolve.- Confirm the env var is set:
echo $ANYAPI_API_KEY - Confirm the
apiKeyblock points to it: - Restart OpenClaw — env changes don’t apply to a running daemon.
Authentication failed (HTTP 401)
Authentication failed (HTTP 401)
Your key is invalid, expired, or revoked.
- Validate the key at dash.anyapi.ai
- Test directly:
Model not found / Bad Request (HTTP 400)
Model not found / Bad Request (HTTP 400)
The model ID is unknown or missing the vendor prefix.
- List the catalog:
curl -H "Authorization: Bearer $ANYAPI_API_KEY" https://api.anyapi.ai/v1/models - Use
vendor/modelform (e.g.openai/gpt-4o, not baregpt-4o) - Confirm the model is listed under
models.providers.anyapi.models[]in your config
Base URL errors
Base URL errors
Set
baseUrl to exactly https://api.anyapi.ai/v1 — no trailing slash, no /chat/completions suffix (OpenClaw appends that).Rate limiting (HTTP 429)
Rate limiting (HTTP 429)
Check usage at dash.anyapi.ai, upgrade your plan, or add fallbacks to spread load.
Best Practices
- Store keys as env refs, not plaintext — prefer
secret-input-mode refduring onboarding - Configure fallbacks across different vendors for cross-provider resilience
- Set
timeoutMsfor slow models — reasoning models likeopenai/o3can take minutes - Pin model capability metadata — declare
input: ["text", "image"]explicitly for vision models - Always use
vendor/modelformat — bare names return HTTP 400 - Monitor usage at dash.anyapi.ai
Support
- AnyAPI Dashboard: dash.anyapi.ai
- AnyAPI Discord: Discord community
- AnyAPI Email: support@anyapi.ai
- OpenClaw Issues: github.com/openclaw/openclaw/issues