Use RunAPI in OpenClaw.
RunAPI works as an OpenAI-compatible endpoint for OpenClaw. Copy the prompt into OpenClaw, let it add the provider, and use the config tab only when you want to review the exact fields.
Configure this OpenClaw workspace to use RunAPI.
Requirements:
- Read the API key from RUNAPI_API_KEY. Do not hardcode the key.
- Add a model provider named runapi.
- Use baseUrl "https://runapi.ai/v1".
- Use api "openai-completions".
- Register provider-local model id "gpt-5.2" with display name "RunAPI GPT 5.2".
- Set the default model to "runapi/gpt-5.2" while keeping existing providers available.
- After editing config, run `openclaw models status` and confirm `runapi/gpt-5.2` appears.
- If RUNAPI_API_KEY is missing, ask me to set it before starting OpenClaw.
{
agents: {
defaults: {
model: { primary: "runapi/gpt-5.2" },
models: {
"runapi/gpt-5.2": { alias: "RunAPI GPT 5.2" },
},
},
},
models: {
mode: "merge",
providers: {
runapi: {
baseUrl: "https://runapi.ai/v1",
apiKey: "${RUNAPI_API_KEY}",
api: "openai-completions",
models: [
{
id: "gpt-5.2",
name: "RunAPI GPT 5.2",
reasoning: false,
input: ["text"],
contextWindow: 128000,
maxTokens: 8192,
},
],
},
},
},
}
export RUNAPI_API_KEY="runapi_xxx"
openclaw models status
openclaw models set runapi/gpt-5.2
openclaw
What this setup changes
OpenClaw can call custom OpenAI-compatible model providers through its model provider configuration. The fastest path is to paste the RunAPI setup prompt into OpenClaw and let the agent update its own config. The provider ID is local to your OpenClaw config, the model reference becomes runapi/gpt-5.2, and the API key stays in RUNAPI_API_KEY.
Install RunAPI in OpenClaw with a prompt
Paste the setup prompt
Copy the prompt from the first tab into OpenClaw. It tells OpenClaw to read RUNAPI_API_KEY, add the runapi provider, and keep existing providers available.
Copy prompt
Review the generated config
OpenClaw should add gpt-5.2 as the provider-local model ID, then select it through the provider-prefixed reference runapi/gpt-5.2.
runapi/gpt-5.2
Verify the selection
Run openclaw models status, switch to the RunAPI model, and start an OpenClaw session. If the model does not appear, confirm the allowlist includes runapi/gpt-5.2.
openclaw models status
Configuration fields
| Field | Value | Purpose |
|---|---|---|
baseUrl |
https://runapi.ai/v1 |
Points OpenClaw at RunAPI's OpenAI-compatible API surface. |
apiKey |
${RUNAPI_API_KEY} |
Reads the RunAPI API key from the environment. |
api |
openai-completions |
Uses the Chat Completions adapter expected by OpenAI-compatible endpoints. |
agents.defaults.model.primary |
runapi/gpt-5.2 |
Selects the RunAPI model as the default model for new OpenClaw sessions. |
OpenClaw setup questions
Yes. OpenClaw supports custom OpenAI-compatible providers through models.providers. Configure RunAPI with the /v1 base URL, set api to openai-completions, and choose the provider-prefixed model reference in agents.defaults.model.primary.
No. Inside models.providers.runapi.models, use the provider-local ID such as gpt-5.2. Use the provider-prefixed reference runapi/gpt-5.2 when selecting the model in OpenClaw defaults or commands.
Store the key in RUNAPI_API_KEY and read it from the OpenClaw config. That keeps the credential out of version control and makes the same config usable across local shells, servers, and automation.
Yes. Keep models.mode set to merge and add RunAPI as one provider. Your existing providers remain available, and you can add fallbacks under agents.defaults.model.fallbacks when you want recovery behavior.
Use one RunAPI key inside OpenClaw.
Browse the model catalog, pick the model ID, and add it to your OpenClaw provider config.