skillfed

together

The official Python library for the together API

together v2.31.0 2.7M downloads/30d#2,920 on PyPI11
Permissive license Apache-2.0 Active released

What it is and what it does

Together is the official Python SDK for accessing the Together API, a service that provides inference endpoints for language models and other AI services. It wraps the REST API with type-safe Python clients (both sync and async) generated by Stainless, handling authentication, request serialization, and response parsing automatically. The library supports chat completions, streaming responses via Server-Sent Events, and realtime audio transcription with automatic reconnection and speech buffering.

The package is designed for developers integrating language model inference into Python applications. It provides both a synchronous `Together` client for simple scripts and an `AsyncTogether` client for high-concurrency workloads. Optional extras like `aiohttp` backend and `realtime` transcription support allow customization for specific use cases. All request and response types are defined as TypedDicts with full type hints, enabling IDE autocomplete and static type checking.

Use it for:

  • Build a chatbot or conversational AI application using the chat completions API with streaming support for real-time token delivery.
  • Transcribe live audio from microphones or phone calls using the realtime transcription endpoint with automatic reconnection on network failures.
  • Integrate language model inference into an async web service or background job queue for high-throughput inference requests.
  • Prototype or deploy multi-turn dialogue systems that leverage typed request/response structures for validation and IDE support.
  • Stream model outputs directly to end users with Server-Sent Events while maintaining connection resilience.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python client library for the Together REST API, providing synchronous and asynchronous access to language models, chat completions, streaming responses, and realtime transcription services.

Yes. The package is actively maintained (release 2 days old), has no known vulnerabilities, low install friction, and provides a well-typed, production-ready interface to the Together API. The permissive Apache-2.0 license and support for modern Python versions (3.10+) make it suitable for most projects. Install it if you need to call the Together API from Python; the synchronous and asynchronous clients cover both simple and high-concurrency scenarios.

Install

together on PyPI

pip

pip install together

uv

uv add together

poetry

poetry add together

Installing together

Before you install

Low friction installation with a pure Python wheel. Active maintenance with a release 2 days old. Requires Python 3.10 or later and depends on 14 runtime packages including httpx for HTTP and pydantic for type validation.

License in practice

Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most production applications.

Quickstart

pip install together

import os
from together import Together

client = Together(api_key=os.environ.get("TOGETHER_API_KEY"))
chat_completion = client.chat.completions.create(
    messages=[{"role": "user", "content": "Say this is a test!"}],
    model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
)
print(chat_completion.choices)

Requires a valid TOGETHER_API_KEY environment variable or explicit api_key parameter to authenticate with the Together service.

Verify before relying

  • Whether the 14 runtime dependencies are all required for basic usage or if some are optional for specific features.
  • Performance characteristics and rate-limit handling of the synchronous vs. asynchronous clients under load.
  • Stability guarantees for the realtime transcription feature and automatic reconnection behavior in production.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 14 — anyio, cyclopts, detect-agent, distro, filelock, httpx, pydantic, rich, sniffio, tomli, tqdm, types-pyyaml, types-tqdm, typing-extensions
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 2,725,341/month — #2,920 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: together-2.31.0-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

together api python clientllm api wrapperchat completions libraryasync http client apirealtime transcription sdklanguage model inference clientstreaming response handler
llm-inferenceasync-http-clientapi-wrapper

More Python Modules packages