Home Tutorials Categories Skills About
ZH EN JA KO
Model Integration

Together AI Model Integration Guide

· 5 min read

Together AI Introduction

Together AI is a cloud platform focused on open-source model inference, offering hosted inference for Llama, Mixtral, Qwen, and other mainstream models. Its API is fully OpenAI-compatible and typically priced lower than closed-source models, making it a great value choice for OpenClaw.

Get an API Key

  1. Visit api.together.ai and register
  2. New users usually receive free credits
  3. Get your API key from Settings -> API Keys

Basic Configuration

{
  "providers": {
    "together": {
      "type": "openai",
      "baseUrl": "https://api.together.xyz/v1",
      "apiKey": "{{TOGETHER_API_KEY}}",
      "models": [
        "meta-llama/Llama-3.1-70B-Instruct-Turbo",
        "meta-llama/Llama-3.1-8B-Instruct-Turbo",
        "mistralai/Mixtral-8x22B-Instruct-v0.1",
        "Qwen/Qwen2.5-72B-Instruct-Turbo"
      ]
    }
  }
}

Recommended Models

Model Parameters Features
Llama-3.1-70B-Instruct-Turbo 70B Strong general capabilities
Llama-3.1-8B-Instruct-Turbo 8B Fast and economical
Mixtral-8x22B-Instruct-v0.1 MoE Great value
Qwen2.5-72B-Instruct-Turbo 72B Excellent Chinese language abilities
DeepSeek-V3 671B Strong reasoning

Cost Optimization

  1. Use Turbo versions: Faster inference, lower per-token cost
  2. Use small models for simple tasks: 8B models handle everyday Q&A well
  3. Set maxTokens caps: Avoid unnecessarily long outputs

Using as a Fallback

{
  "models": {
    "main-model": {
      "provider": "openai",
      "model": "gpt-4o",
      "fallback": "together-smart"
    }
  }
}

Summary

Together AI offers rich open-source model selection and competitive pricing, making it an essential component of OpenClaw's multi-model strategy. Particularly suited for cost-sensitive scenarios that still need large model capabilities.

OpenClaw is a free, open-source personal AI assistant that supports WhatsApp, Telegram, Discord, and many more platforms