Together’s Embeddings API lets you turn some input text (the input) into an array of numbers (the embedding). The resulting embedding can be compared against other embeddings to determine how closely related the two input strings are. Embeddings from large datasets can be stored in vector databases for later retrieval or comparison. Common use cases for embeddings are search, classification, and recommendations. They’re also used for building Retrieval Augmented Generation (RAG) applications.Documentation Index
Fetch the complete documentation index at: https://togetherai-migration.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Generating a single embedding
Useclient.embeddings.create to generate an embedding for some input text, passing in a model name and input string:
data key, as well as some metadata:
JSON
Generating multiple embeddings
You can also pass an array of input strings to theinput option:
response.data key will contain an array of objects for each input string you provide:
JSON