Skip to content
2api2api Docs
Open console

Other clients

OpenClaw

Add a custom provider in ~/.openclaw/openclaw.json, then point the default model at it.

Use a key from a GPT group (see Groups). First install OpenClaw by following the OpenClaw docs. You can skip the model configuration during installation.

  1. Open ~/.openclaw/openclaw.json, add a 2api entry under models.providers, and point agents.defaults.model.primary at it. Keep your other existing settings and merge in only these two sections:

    ~/.openclaw/openclaw.json
    {
    "models": {
    "providers": {
    "2api": {
    "baseUrl": "https://2api.dev/v1",
    "apiKey": "sk-your-key",
    "api": "openai-responses",
    "models": [
    {
    "id": "model-name",
    "name": "2api GPT",
    "reasoning": true,
    "input": ["text", "image"]
    }
    ]
    }
    }
    },
    "agents": {
    "defaults": {
    "model": { "primary": "2api/model-name" }
    }
    }
    }

    Replace both model-name values with the same name. Look it up with /v1/models.

  2. Save, restart the OpenClaw gateway, and send a message.