Skip to main content
POST
/
embeddings
Create embedding
curl --request POST \
  --url https://api.together.xyz/v1/embeddings \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "togethercomputer/m2-bert-80M-8k-retrieval",
  "input": "Our solar system orbits the Milky Way galaxy at about 515,000 mph"
}'
{
  "object": "list",
  "model": "<string>",
  "data": [
    {
      "object": "embedding",
      "embedding": [
        123
      ],
      "index": 123
    }
  ]
}

Authorizations

Authorization
string
header
default:default
required

Body

application/json
model
string
required

The name of the embedding model to use.

Example:

"togethercomputer/m2-bert-80M-8k-retrieval"

input
string
required

A string providing the text for the model to embed.

Example:

"Our solar system orbits the Milky Way galaxy at about 515,000 mph"

Response

200

object
enum<string>
required
Available options:
list
model
string
required
data
object[]
required