Together AI

no

Original Documentation

Documentation Index#

Fetch the complete documentation index at: https://docs.trychroma.com/llms.txt Use this file to discover all available pages before exploring further.

Chroma provides a wrapper around Together AI embedding models. This embedding function runs remotely against the Together AI servers, and will require an API key and a Together AI account. You can find more information in the Together AI Embeddings Docs, and supported models.

from chromadb.utils.embedding_functions import TogetherAIEmbeddingFunction

os.environ["CHROMA_TOGETHER_AI_API_KEY"] = "<INSERT API KEY HERE>"

ef = TogetherAIEmbeddingFunction(
    model_name="togethercomputer/m2-bert-80M-32k-retrieval",
)
ef(input=["This is my first text to embed", "This is my second document"])
// npm install @chroma-core/together-ai

import { TogetherAIEmbeddingFunction } from '@chroma-core/together-ai';

process.env.TOGETHER_AI_API_KEY = "<INSERT API KEY HERE>"

const embedder = new TogetherAIEmbeddingFunction({
    model_name: "togethercomputer/m2-bert-80M-32k-retrieval",
});

// use directly
embedder.generate(['This is my first text to embed', 'This is my second document']);

You must pass in a model_name to the embedding function. It is recommended to set the CHROMA_TOGETHER_AI_API_KEY environment variable for the API key, but the embedding function also optionally takes in an api_key parameter directly.

Link last verified June 7, 2026. View original ↗
Source: Chroma Docs
Link last verified: 2026-03-04