Skip to main content

Together AI

Together AI provides scalable inference for open-weight models via an OpenAI-compatible API. It hosts a broad catalog of Llama, Qwen, Mistral, and other community models.

Prerequisites

Create an API key at api.together.ai and set it on the gateway host:
echo 'TOGETHER_API_KEY=your-key-here' >> ~/.openclaw/.env

Configuration

Together AI’s endpoint is OpenAI-compatible. Set the base URL and API key:
{
  models: {
    providers: {
      together: {
        apiKey: "TOGETHER_API_KEY", // references the env var
        models: [
          "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
          "Qwen/Qwen2.5-72B-Instruct-Turbo",
        ],
      },
    },
  },
}
apiKey is the name of the environment variable, not the key value itself. Keep secrets in .env, not in committed config files.
Together AI’s API base URL is https://api.together.xyz/v1. This is set automatically for the together provider — no baseUrl override is needed.

Selecting a model

{
  agents: {
    defaults: {
      model: { primary: "together/meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo" },
    },
  },
}
ModelNotes
meta-llama/Meta-Llama-3.1-70B-Instruct-TurboLlama 3.1 70B — fast Turbo variant
Qwen/Qwen2.5-72B-Instruct-TurboQwen 2.5 72B — strong multilingual reasoning
Run openclaw models list --provider together for the full current catalog.

Troubleshooting

The API key is invalid or revoked. Generate a new one at api.together.ai and update ~/.openclaw/.env.
Together AI model IDs are case-sensitive and include the vendor prefix. Check the full ID in the Together AI model catalog.
You have exceeded request limits. Check your plan and usage at the Together AI console.