Page cover

Together.ai

Together.ai is an open platform for running, fine-tuning, and deploying large language models (LLMs) with high performance and low latency. Beyond inference, Together.ai supports distributed fine-tuning, model evaluation, and custom deployments, making it a flexible choice for teams building production-grade AI applications.

This tutorial will guide you through utilizing Arcee AI's language models on Together.ai using Together.ai's SDK.


Prerequisites

  • Together.ai Account

  • Together.ai API Key

    • If you don't have one, create one here.

  • together Python SDK (install using uv or pip)

Quickstart

Run a completion with an Arcee model

from together import Together

# Initialize client
client = Together(api_key="<YOUR_TOGETHER_API_KEY>")

# Run a chat completion with an Arcee model
response = client.chat.completions.create(
    model="arcee-ai/trinity-mini",
    messages=[
        {
            "role": "user",
            "content": "What are small language models and how do they compare to LLMs?"
        }
    ]
)

# Print result
print(response.choices[0].message.content)

Last updated