Together
Together AI hosts Llama, Qwen, Mixtral, GPT-OSS, and dozens of other open-weight models behind an OpenAI-compatible endpoint. Supercompat talks to it via the OpenAI SDK with a custom base URL.
Install
npm install supercompat openai
Minimal setup
import OpenAI from 'openai'
import {
supercompat,
togetherClientAdapter,
completionsRunAdapter,
memoryStorageAdapter,
} from 'supercompat/openai'
const together = new OpenAI({
apiKey: process.env.TOGETHER_API_KEY,
baseURL: 'https://api.together.xyz/v1',
})
const client = supercompat({
clientAdapter: togetherClientAdapter({ together }),
storageAdapter: memoryStorageAdapter(),
runAdapter: completionsRunAdapter(),
})
const response = await client.responses.create({
model: 'meta-llama/Llama-3.3-70B-Instruct-Turbo',
input: 'What is Llama good at?',
})
Tool use
await client.responses.create({
model: 'meta-llama/Llama-3.3-70B-Instruct-Turbo',
input: 'What is the weather in Oslo?',
tools: [
{
type: 'function',
name: 'get_weather',
parameters: {
type: 'object',
properties: { city: { type: 'string' } },
required: ['city'],
},
},
],
})
Models
Some current examples:
meta-llama/Llama-3.3-70B-Instruct-Turbo
Qwen/Qwen2.5-72B-Instruct-Turbo
mistralai/Mixtral-8x22B-Instruct-v0.1