Integration guide

Use 3llama in OpenClaw

OpenClaw is an open-source personal AI assistant that runs on your own computer, and you can reach it from the chat apps you already use. Connect it to 3llama, and it answers with the models in your plan, drawing on the same allowance as your chats.

  • About 10 minutes
  • macOS, Linux, and Windows
  • Needs API access
  1. Step 1

    Create an API token

    On the API tokens page, give your token a name you'll recognize, such as the computer you'll use it on, and select Create token.

    Open API tokens

    Copy your token as soon as it appears. It's shown only once to keep it secure. If you lose it, revoke it and create a new one.

  2. Step 2

    Install OpenClaw

    If OpenClaw isn't installed yet, run the installer for your system. It sets up everything OpenClaw needs, then starts onboarding.

    shell
    curl -fsSL https://openclaw.ai/install.sh | bash

    Finish onboarding as usual. You'll add 3llama as a model provider in the next steps.

  3. Step 3

    Save your token for OpenClaw

    OpenClaw's gateway runs in the background, so it doesn't see variables you set in a terminal. Instead, save your token in ~/.openclaw/.env, OpenClaw's own environment file. Create the file if it doesn't exist, and add this line with your token in place of the placeholder.

    ~/.openclaw/.env
    THREELLAMA_API_KEY=paste-your-token-here

    This file stores your token as plain text. Keep it private, and never share it or add it to version control.

  4. Step 4

    Add 3llama as a model provider

    Open ~/.openclaw/openclaw.json and merge in the models and agents sections below. They add 3llama as a provider, show each of its models by name, and make one of them your default. To keep your current default model, leave out agents.defaults.model.

    The configuration below lists every model on 3llama, with its limits. Your plan may not include all of them, so to copy one that lists only your plan's models, choose OpenClaw on the API tokens page.

    Get your plan's configuration
    Loading 3llama's models…

    OpenClaw checks its configuration strictly, so check your changes before moving on:

    shell
    openclaw config validate
  5. Step 5

    Check the connection and choose a model

    OpenClaw applies model changes automatically. Check that it can reach 3llama and lists your models:

    shell
    openclaw models status
    openclaw models list --provider 3llama

    Then, in any chat with your assistant, list the 3llama models by name and switch to the one you want:

    OpenClaw
    /models 3llama

    If your 3llama models don't appear, restart the gateway with openclaw gateway restart.

Troubleshooting

Most problems come down to the token, the configuration file, or your plan. Start with the one that matches what you see.

OpenClaw won't start after I edited the configuration

OpenClaw won't start if its configuration has an unknown key or a typo. Run openclaw doctor to see what's wrong, fix it, then run openclaw config validate again.

Requests fail with an authentication error

Check that ~/.openclaw/.env has a THREELLAMA_API_KEY line with your full token and nothing else, then run openclaw gateway restart. If you revoked the token, create a new one.

My 3llama models don't appear in the list

Make sure models.mode is set to merge and that each model you want is listed under the 3llama provider. To get the latest models in your plan, copy the configuration again from the API tokens page.

A request fails because the model isn't included in my plan

Your plan decides which models you can use through the API, and the guides list every model on 3llama. Copy the configuration from the API tokens page instead, so it lists only the models in your current plan.

Requests stopped working before the end of the month

Requests from your tools draw on the same allowance as your chats. When you've used all of it, requests pause until your allowance resets. You can check your usage in the app, or upgrade your plan for more.

Can I use one token on several computers?

You can, but a separate token for each computer is safer. If one is lost, you can revoke just that token and the others keep working.

Keep going