Concept beginner · 3 min read

What is Together AI

Quick answer
Together AI is an AI platform offering an OpenAI-compatible API that provides access to large language models like meta-llama/Llama-3.3-70B-Instruct-Turbo. It enables Python developers to integrate advanced LLMs easily by using the standard openai SDK with a custom base_url and API key.
Together AI is an AI API provider that offers OpenAI-compatible access to large language models for easy integration and deployment.

How it works

Together AI operates as a cloud-based AI service that hosts large language models such as meta-llama/Llama-3.3-70B-Instruct-Turbo. It exposes an API fully compatible with the OpenAI SDK, allowing developers to use familiar openai client calls with a custom base_url and API key. This compatibility means you can switch to Together AI's models without changing your existing OpenAI integration code, simply by pointing to their endpoint.

Think of Together AI as a drop-in replacement for OpenAI's API that specializes in hosting Meta's Llama 3 models and other advanced LLMs, providing high-performance inference with minimal integration effort.

Concrete example

python
from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["TOGETHER_API_KEY"],
    base_url="https://api.together.xyz/v1"
)

response = client.chat.completions.create(
    model="meta-llama/Llama-3.3-70B-Instruct-Turbo",
    messages=[{"role": "user", "content": "Explain retrieval-augmented generation (RAG) in simple terms."}]
)

print(response.choices[0].message.content)
output
Retrieval-augmented generation (RAG) combines a search system with a language model to provide answers grounded in specific documents, improving accuracy and relevance.

When to use it

Use Together AI when you want to leverage powerful Llama 3 models or other advanced LLMs with minimal code changes if you already use the OpenAI SDK. It is ideal for projects requiring high-quality instruction-tuned models for tasks like chatbots, content generation, and code assistance.

Do not use Together AI if you require models outside their offering or if you prefer a fully managed platform with additional tooling beyond API access.

Key Takeaways

  • Together AI offers an OpenAI-compatible API for easy integration of Llama 3 and other LLMs.
  • Use the standard openai Python SDK with a custom base_url and API key to access Together AI models.
  • Ideal for developers needing powerful instruction-tuned models without changing existing OpenAI client code.
Verified 2026-04 · meta-llama/Llama-3.3-70B-Instruct-Turbo
Verify ↗