uv add together) and follow the quickstart instead.
Version 2 is a rebuild of the SDK. It’s generated from the API spec, adds comprehensive typing, and uses httpx instead of requests. Core calls run without edits: chat completions, streaming, embeddings, image generation, video generation, function calling, vision, and basic fine-tuning operations.
Breaking changes
Keyword-only arguments: All API method arguments must be passed as keyword arguments. Positional arguments raise aTypeError.
supplied_headers is now default_headers. The client also accepts two new optional parameters, default_query and http_client (an httpx.Client).
Omitted parameters: Omit optional parameters you don’t set. Passing None raises TypeError: Expected NotGiven, got None.
Extra parameters: The v1 **kwargs pattern is gone. Pass additional data through extra_body, extra_headers, or extra_query:
from together.types import ChatCompletionResponse is now from together.types.chat.chat_completion import ChatCompletion.
Removed CLI commands: together chat.completions, together completions, and together images generate no longer exist.
Renamed methods
Changed response and input shapes
- List responses wrap results in
.data:client.fine_tuning.list_checkpoints()and similar list calls return a response object, so iterate overresponse.datainstead of the response itself. - Downloads return content instead of writing to disk:
files.content()andfine_tuning.content()return binary data. Write it to a file yourself, for example withresponse.iter_bytes()inside awith open(path, "wb")block. - Audio uploads take file objects:
audio.transcriptions.create()andaudio.translations.create()require an open file object (with open("audio.mp3", "rb") as f:), not a path string. - Voice listing uses attribute access: Read each listed voice’s fields as attributes, for example
voice.nameinstead ofvoice["name"]. - Checkpoint fields are renamed:
typeis nowcheckpoint_type, andtimestampis nowcreated_at. Thenamefield is gone, so construct it from the job ID andstep. - Batch creation returns a wrapper:
batches.create()returns a response object with the job atresponse.job. - Evaluations use typed parameter objects:
evals.create()takes aparametersobject (for example,ParametersEvaluationClassifyParametersfromtogether.types.eval_create_params) instead of top-level keyword arguments.retrieve()andstatus()take the workflow ID as a positional argument.
Exception changes
The base exceptionTogetherException is now TogetherError, and HTTP errors map to status-specific exceptions. Attribute names also changed, for example http_status is now status_code.
AuthenticationError, RateLimitError, and APIConnectionError keep their names. New status-specific exceptions include PermissionDeniedError (403), NotFoundError (404), ConflictError (409), and UnprocessableEntityError (422).
Getting help
- Browse the SDK source in the together-py repo.
- The API reference shows v2 code examples for every endpoint.
- Report issues on Discord or contact support.