POST
/
openai
/
v1
/
embeddings
curl --request POST \
  --url https://api.groq.com/openai/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "encoding_format": "float",
  "input": "The quick brown fox jumped over the lazy dog",
  "model": "nomic-embed-text-v1_5",
  "user": "<string>"
}'
{
  "data": [
    {
      "embedding": [
        123
      ],
      "index": 123,
      "object": "embedding"
    }
  ],
  "model": "<string>",
  "object": "list",
  "usage": {
    "prompt_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200 - application/json

OK

The response is of type object.