Embeddings

Creates an embedding vector representing the input text.

Changed on
post/openai/v1/embeddings

Request

  • Base URL
    https://api.groq.com
  • URL
    https://api.groq.com/openai/v1/embeddings
  • Auth
    HTTP bearer

Request body

encoding_format'float' | 'base64'

The format to return the embeddings in. Can only be float or base64.

userstring nullable

A unique identifier representing your end-user, which can help us monitor and detect abuse.

Example request

{
  "input": "This is a test.",
  "encoding_format": "float"
}

Response

OK

modelstring required

The name of the model used to generate the embedding.

object'list' required

The object type, which is always "list".

Changes

    • breaking

      the request property type changed from string to no type

    • info

      the endpoint scheme security api_key was removed from the API

    • info

      added subschema #1 subschema #2 to the request property anyOf list

    • warning

      removed the request property

    • info

      api tag Embeddings added

    • info

      api tag openai embeddings removed

    • info

      the request property default value was added

    • info

      the request property default value was added