Announcing Together Python SDK v2.0
Captured source
source ↗Announcing Together Python SDK v2.0
⚡️ FlashAttention-4: up to 1.3× faster than cuDNN on NVIDIA Blackwell →
Introducing Together AI's new look →
🔎 ATLAS: runtime-learning accelerators delivering up to 4x faster LLM inference →
⚡ Together GPU Clusters: self-service NVIDIA GPUs, now generally available →
📦 Batch Inference API: Process billions of tokens at 50% lower cost for most models →
🪛 Fine-Tuning Platform Upgrades: Larger Models, Longer Contexts →
All blog posts
Company
Published 12/12/2025
Announcing Together Python SDK v2.0
Authors
Blaine Kasten, Zain Hasan
Table of contents
40+ Models Chosen for Production...40+ Models Chosen for Production...40+ Models Chosen for Production...
Links in this article
Python library Migration Guide Reference docs GitHub repo Discussion on Discord
TL;DR
📚 Migration guide: We’ve published a detailed Python SDK Migration Guide covering API‑by‑API changes, type updates, and troubleshooting tips. 🧑💻Code and docs: You can access the repo for Together Python v2 and refer to the reference docs that have code examples. 🎯 Main goal: Replace the legacy v1 Python SDK with a modern, strongly‑typed, OpenAPI‑generated client that matches the API surface more closely and stays in lock‑step with new features. ✨ Net new: All new features will be built in version 2 moving forward. This first version already includes beta APIs for our Instant Clusters!
Today we’re shipping the Python SDK v2.0 Release Candidate , a new, type‑safe, OpenAPI‑driven client for Together’s API — designed to be faster, easier to maintain, and ready for everything we’re building next. Why a new Python SDK? The core reasons: Modern architecture The new SDK is generated from our OpenAPI specification using Stainless , giving you a closer 1:1 mapping to our API, fewer edge‑case inconsistencies, and a much easier path for us to ship new features quickly. Better type safety & DX The SDK brings “TypeScript‑like” typing to Python , including typed parameters, responses, and helpers for chat messages and eval parameters. This makes it easier to build large codebases with confidence and better editor support. Future‑proof & feature‑first Active development and new API features will land in v2 first. After the RC period is over, v1 will move into maintenance and then deprecation uv Support Compatible with uv , the fast Python package installer - uv add together Modern HTTP client & performance. Under the hood, the new SDK uses httpx instead of requests , brings better timeout and connection handling, and in our benchmarks is about 20ms faster per request on average .
Getting started 1. Install the RC
Install the Together Python SDK
uv add together
pip still works aswell
pip install together
2. Skim the Migration Guide Start with the Python SDK Migration Guide for an overview, API‑by‑API notes and code snippets, breaking changes , new error handling , and more. The guide also includes a Feature Parity Matrix that breaks APIs into: ✅ Easy migrations: Chat, completions, embeddings, images, models, audio transcription/translation, many fine‑tuning flows. ⚠️ Medium effort: Files, fine‑tuning checkpoints/download, batches, endpoints, evals, code interpreter, some audio speech changes. 🆕 New capabilities: Jobs API, Hardware API, enhanced evals, code interpreter sessions, raw response helpers.
3. Try your existing workloads Begin with chat/completions/embeddings to confirm “no change” behavior. Then test Files, Batches, Endpoints, Evals, and Code Interpreter if you use them.
4. Report issues & suggestions Open an issue in the repo with a minimal repro. Report issues on Discord . Tell us which APIs you’re using and whether you’re on RC in the report.
Key breaking changes to know about The details live in the Breaking Changes section of the migration guide, but here are the highlights to keep in mind while you test the RC. Constructor parameters supplied_headers → default_headers New optional parameters: default_query, http_client, _strict_response_validation
Error handling TogetherException class internals methods and properties have changed Several old exceptions removed or folded into APIStatusError / specific HTTP status classes
Arguments No positional parameters — all calls must use keyword arguments **kwargs replaced by explicit extra_headers, extra_query, extra_body, timeout
Types Many response type names in together.types.* have changed
Files client.files.retrieve_content(...) is gone Use client.files.content(file_id) instead; it returns a streaming binary response, and no longer writes to disk by default
Batches Method renames: create_batch → create get_batch → retrieve list_batches → list cancel_batch → cancel
Parameter change: file_id → input_file_id Response change: create now returns the full API response; you access .job yourself
Endpoints client.endpoints.get(...) → client.endpoints.retrieve(...) min_replicas / max_replicas are now nested under an autoscaling parameter in create List methods (list, list_avzones) now return an object wrapper instead of a bare array
Evals Namespace change: client.evaluation → client.evals evals.create now takes a strongly‑typed parameters object (e.g., ParametersEvaluationClassifyParameters ) instead of a loose dictionary
Audio Speech Added client.audio.speech.with_streaming_response.create(...) method to stream audio out
Code Interpreter client.code_interpreter.run(...) → client.code_interpreter.execute(...) Result structure and sessions are updated (result.data.outputs[0].data, client.code_interpreter.sessions.list())
Some legacy CLI commands (like chat.completions, completions, images generate ) are removed or re‑shaped in v2
What’s in the 2.0 Release? APIs that “just work” (no code changes) For most common workloads, you can upgrade with little or no code change . The following APIs are effectively drop‑in compatible between v1 and v2: client.chat.completions.create client.completions.create client.embeddings.create client.images.generate client.rerank.create client.fine_tuning.create / list / retrieve / cancel client.models.list
If your app is mostly centered around calling a model, streaming results, generating images, transcribing, and maybe fine‑tuning, the migration should be straightforward. You can look at the new error model and breaking changes section . APIs with some changes Other APIs are available in the RC, but with updated signatures or response shapes :…
Excerpt shown — open the source for the full document.
Notability
notability 7.0/10Major SDK update from notable AI infrastructure company.