Learning resourcesReviewed · Together AI

Together AI OpenAI compatibility guide

Together AI's OpenAI compatibility guide is a configuration reference for developers connecting OpenAI-client applications to Together-hosted models, but endpoint support and model behavior are not identical.

Researched 24 Nov 2026

In short.

Together AI's OpenAI compatibility guide is a setup reference for developers reusing OpenAI clients with Together-hosted models, but several endpoints, parameters and response fields require different handling. It provides Python, TypeScript and cURL examples, a compatibility matrix and migration caveats. Standard pricing, runtime performance and successful execution are not established by the page.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete captured documentation page at [https://docs.together.ai/docs/inference/openai-compatibility.md], including its examples, compatibility tables, caveats and notices. Linked capability guides, model lists, pricing, authentication documentation, the documentation index, OpenAPI specification and external pages are excluded. Their contents are unknown here. No code, SDK calls or API requests were executed; compatibility and performance remain documentation claims.

The overview

Identity

This is Together AI's documentation for its OpenAI-compatible inference interface at [https://docs.together.ai/docs/inference/openai-compatibility.md]. It explains how existing OpenAI REST or SDK calls map to Together endpoints. The resource is a configuration guide; the underlying hosted inference service is Together AI.

Assessment

The guide is useful for identifying how much of an existing application can keep its current client calls. Its strongest feature is the combination of short setup examples with explicit exceptions, including dedicated-only embeddings, unsupported agent-management endpoints and silently ignored parameters.

Compatibility here concerns request and response interfaces. The page does not establish equivalent model answers, latency, reliability or operating cost. Its examples and support claims have not been independently executed or verified.

Users

The main audience is developers moving an application that already uses the OpenAI Python or TypeScript client, or direct HTTP requests, to models hosted by Together. Beginners get concrete configuration examples; experienced developers get the endpoint and response details needed to estimate migration work.

Applications using chat, tools, structured outputs or supported media endpoints are the clearest fit. Applications built around Assistants, Threads, Runs or OpenAI-shaped batch operations face additional implementation work.

Capabilities

The page documents support for chat completions and streaming, vision input, function calling, structured outputs, legacy text completions, image generation, speech generation, transcription, translation, model listing and retrieval, and the Responses API. Support for a particular feature still needs to match the selected model.

Embeddings require a dedicated endpoint; the page states that no serverless embedding models are available and names BAAI/bge-base-en-v1.5 for dedicated deployment. Video generation, additional image editing operations and some reasoning features require Together-native interfaces.

Using it

Requirements

The examples require a Together account, a Together API key and a suitable Together model identifier. Python and TypeScript examples use their respective OpenAI client libraries; the cURL example uses HTTP directly. The examples read the credential from TOGETHER_API_KEY.

Together model identifiers use a provider/model_name namespace. Existing OpenAI model names cannot simply be retained: the page says names such as gpt-4o return a 404. Minimum SDK versions, runtime versions, account quotas and dedicated-endpoint capacity requirements are not specified.

Mechanism

The application keeps OpenAI-style client methods but sends requests to Together using a Together key and the base URL [https://api.together.ai/v1]. For example, chat.completions.create maps to POST /v1/chat/completions. The model field must identify a Together-hosted model.

Response parsers need some flexibility. Cached token counts can appear under usage.prompt_tokens_details.cached_tokens or directly under usage.cached_tokens; reasoning token counts can appear under usage.completion_tokens_details.reasoning_tokens. Together uses its own identifier formats and error type and code values, so the page recommends portable error handling based on HTTP status.

Setup

Obtain a project key from [https://api.together.ai/settings/projects/~current/api-keys] and make it available as TOGETHER_API_KEY. Configure Python's api_key and base_url, or TypeScript's apiKey and baseURL, with that key and [https://api.together.ai/v1]. Replace the application's model name with an appropriate Together model identifier.

For US-specific inference processing, the page gives [https://us-api.together.ai/v1]. This endpoint supports only select models and has a pricing premium. The supported-model list and fuller geographic guarantees are outside this page.

Example

The Python example creates an openai.OpenAI client with the Together key and base URL, then calls client.chat.completions.create using model MiniMaxAI/MiniMax-M3.1-Flash and a user message containing Hello!. It reads the answer from response.choices[0].message.content.

Equivalent TypeScript and cURL examples illustrate the same request. These are documentation examples, not observed results: no request was run, and no response, latency measurement or charge was recorded.

Assessment & evidence

Limitations

Assistants, Threads and Runs are unsupported. OpenAI-shaped fine-tuning and batch calls require Together-native alternatives; file operations also use Together's own API. The moderations.create endpoint is unsupported.

Some differences are silent: service_tier, store, metadata, prediction and vision's detail field are accepted but ignored. Seed-based reproducibility is best-effort, n varies by model, and logit_bias is unsupported on most models. Together's logprobs response shape also differs.

The moderation guidance contradicts itself. The matrix points to Llama Guard through chat completions, while the later incompatibilities section says no moderation models are available. Actual moderation-model availability is unresolved by this page.

Integration tradeoffs

The practical benefit is reusing familiar client calls while changing the inference provider. That benefit is greatest when the application stays within supported endpoints and does not depend on ignored parameters, identical token-accounting fields or OpenAI-specific identifiers.

Reasoning models need particular attention. The page documents reasoning_effort values of low, medium and high for GPT-OSS models, while other controls require Together-native access. Model reasoning can appear in reasoning or reasoning_content on the assistant message; the page says to preserve the same field when returning prior turns for preserved thinking or multi-turn tool use.

Alternatives

For Together-specific features, the page recommends the Together SDK or direct HTTP through requests or fetch. These are relevant alternatives when an OpenAI client does not expose the required operation or response fields.

The page also mentions an Anthropic Messages interface and support for Responses. Their detailed behavior is not covered here. It provides no comparison with competing inference providers, so relative quality, performance and value remain unknown.

Evidence

The evidence is Together AI's first-party compatibility reference at [https://docs.together.ai/docs/inference/openai-compatibility.md]. It contains configuration examples, an endpoint matrix, parameter caveats and response-handling guidance.

The page supports a documentation-based account of the interface. It supplies no execution receipts, benchmarks or independent reliability evidence. Runtime correctness, output quality, security and production suitability were not assessed.

Access & freshness

Costs

Standard serverless prices and dedicated-endpoint prices are unknown from this page. It provides no worked cost example or evidence sufficient to calculate an application's bill. Free account registration does not establish free inference.

The stated exception is the US endpoint: input, cached input and output tokens cost 1.25 times the standard serverless rates. The underlying rates and eligible models are on a linked page and are not established here.

Rights

The page does not supply documentation redistribution terms, individual model licences, commercial-use permissions or output ownership terms. Its description of open-source models does not establish the terms of every hosted model.

Data retention and training-use policies are also unknown from this page. The Mintlify hosting notice supplies no stated redistribution permission.

Freshness

The available page snapshot was captured at 2026-11-24T03:47:56.979Z. No publication date, last-updated date or pinned SDK version is stated. The capture timestamp does not establish when individual claims were last checked.

Model availability, endpoint support and prices can change. Current availability and compatibility beyond this snapshot remain unverified.

Practical next steps

Before migrating an application, map its endpoint calls and parameters against the matrix, choose Together model identifiers, and identify any dependency on unsupported operations or ignored settings. Plan native API calls where the OpenAI client cannot express the required feature.

Validate response parsing, tool interactions, token accounting and error handling with the chosen models before relying on the integration. Confirm current model availability, actual prices and applicable terms separately, and resolve the conflicting moderation guidance if moderation is required.

Evidence for this report

selected-page.txtselected · checked 2026-11-24