Passa al contenuto principale

Embeddings

POST 

/v1/embeddings

Follows the exact same API spec as OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings

Request​

Body

required

    model stringrequired

    ID of the model to use

    input

    object

    required

    Input text to embed

    oneOf

    A single input text

    string

    encoding_format stringnullable

    The format to return the embeddings in

    Possible values: [float, base64]

    Default value: float

Responses​

Successful Response

Schema

    object stringrequired

    The object type, which is always 'list'

    Possible values: [list]

    data

    object[]

    required

    The list of embeddings generated

  • Array [

  • object stringrequired

    The object type

    Possible values: [embedding]

    embedding number[]required

    The embedding vector

    index integerrequired

    The index of the embedding in the list

  • ]

  • model stringrequired

    The model used to generate the embeddings

    usage

    object

    required

    completion_tokens integer

    The number of tokens in the output (always 0)

    prompt_tokens integerrequired

    The number of tokens in the input

    total_tokens integerrequired

    The total number of tokens used

    completion_tokens_details objectnullable

    Dettaglio dei token (oggetto) oppure null se non disponibile.

    prompt_tokens_details objectnullable

    Dettaglio dei token (oggetto) oppure null se non disponibile.

Loading...