The source default,
togethercomputer/m2-bert-80M-32k-retrieval, was removed on February 6, 2026. Pass a current model ID and its matching dimensions explicitly. Together’s serverless catalog currently lists intfloat/multilingual-e5-large-instruct with 1024 dimensions.Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
id | str | The model ID to use for embeddings | "togethercomputer/m2-bert-80M-32k-retrieval" |
dimensions | int | Output dimensions of the embedding | 768 |
api_key | Optional[str] | Together API key | Environment variable TOGETHER_API_KEY |
base_url | str | Base URL for API requests | "https://api.together.xyz/v1" |
encoding_format | Literal["float", "base64"] | Format of the embedding output | "float" |
user | Optional[str] | A unique identifier representing your end-user | None |
organization | Optional[str] | Organization ID for API requests | None |
request_params | Optional[Dict[str, Any]] | Additional parameters for embedding requests | None |
client_params | Optional[Dict[str, Any]] | Additional parameters for client initialization | None |
openai_client | Optional[OpenAIClient] | Pre-configured OpenAI-compatible client | None |
async_client | Optional[AsyncOpenAI] | Pre-configured async OpenAI-compatible client | None |
enable_batch | bool | Embed multiple texts per API call when adding content to vector databases | False |
batch_size | int | Number of texts per batch when enable_batch is True | 100 |