OPENCLAW GUIDE

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.

Copy prompt · one RunAPI key · model catalog links
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
Copy prompt first /v1
OVERVIEW

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.

SETUP

Install RunAPI in OpenClaw with a prompt

1

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
2

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
3

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
REFERENCE

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.
FAQ

OpenClaw setup questions

Use one RunAPI key inside OpenClaw.

Browse the model catalog, pick the model ID, and add it to your OpenClaw provider config.