---
title: &quot;Use RunAPI in OpenClaw — OpenAI-Compatible Setup Guide&quot;
url: &quot;https://runapi.ai/openclaw.md&quot;
canonical: &quot;https://runapi.ai/openclaw&quot;
locale: &quot;en&quot;
---

# RunAPI in OpenClaw

RunAPI works as an OpenAI-compatible endpoint for OpenClaw. Paste the setup prompt and the agent writes its own config — provider ID stays local, the model reference maps to runapi/gpt-5.5, and the key lives in RUNAPI_API_KEY.

## Install prompt

Copy this prompt into OpenClaw:

```text
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 &quot;https://runapi.ai/v1&quot;.
- Use api &quot;openai-completions&quot;.
- Register provider-local model id &quot;gpt-5.5&quot; with display name &quot;RunAPI GPT 5.5&quot;.
- Set the default model to &quot;runapi/gpt-5.5&quot; while keeping existing providers available.
- After editing config, run `openclaw models status` and confirm `runapi/gpt-5.5` appears.
- If RUNAPI_API_KEY is missing, ask me to set it before starting OpenClaw.
```

## Configuration

```json5
{
  agents: {
    defaults: {
      model: { primary: "runapi/gpt-5.5" },
      models: {
        "runapi/gpt-5.5": { alias: "RunAPI GPT 5.5" },
      },
    },
  },
  models: {
    mode: "merge",
    providers: {
      runapi: {
        baseUrl: "https://runapi.ai/v1",
        apiKey: "${RUNAPI_API_KEY}",
        api: "openai-completions",
        models: [
          {
            id: "gpt-5.5",
            name: "RunAPI GPT 5.5",
            reasoning: false,
            input: ["text"],
            contextWindow: 128000,
            maxTokens: 8192,
          },
        ],
      },
    },
  },
}
```

## Steps

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.
2. **Review the generated config** — OpenClaw should add gpt-5.5 as the provider-local model ID, then select it through the provider-prefixed reference runapi/gpt-5.5.
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.5.

## FAQ

### Can OpenClaw use RunAPI as a custom model provider?

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.

### Should the model ID include the provider prefix inside models.providers?

No. Inside models.providers.runapi.models, use the provider-local ID such as gpt-5.5. Use the provider-prefixed reference runapi/gpt-5.5 when selecting the model in OpenClaw defaults or commands.

### Where should I store the RunAPI API key?

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.

### Can I keep my existing OpenClaw models as fallbacks?

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.

### Can OpenClaw generate images through RunAPI without installing extra skills?

Yes. The same RUNAPI_API_KEY and /v1 endpoint you configured for chat also accept image generation requests. Specify a model like flux-kontext-pro or imagen-4, and OpenClaw can call it through the existing RunAPI provider — no GitHub skill or separate API key needed. For a full guide, see the OpenClaw image generation page.

### How does the OpenClaw agent know when an image or video task is ready?

Image, video, and music tasks are asynchronous. RunAPI returns a task ID on the first call. Your OpenClaw agent polls the status endpoint until the task completes, then receives the output URL. The RunAPI SDK handles polling automatically if you use it.


## Links

- [Model catalog](https://runapi.ai/models)
- [CLI](https://runapi.ai/cli)
- [MCP Server](https://runapi.ai/mcp)
- [Pricing](https://runapi.ai/pricing)
- [API docs](https://runapi.ai/docs)
- [Hermes Agent setup](https://runapi.ai/hermes-agent)
