> ## Documentation Index
> Fetch the complete documentation index at: https://novita.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create embeddings

Creates an embedding vector representing the input text.

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format, for example: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="input" type="string | arrary" required={true}>
  Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for text-embedding-ada-002), cannot be an empty string, and any array must be 2048 dimensions or less.
</ParamField>

<ParamField body="model" type="enum<string>" required={true}>
  ID of the model to use. Enum: `baai/bge-m3`.
</ParamField>

<ParamField body="encoding_format" type="string" required={false}>
  The format to return the embeddings in. Can be either float or base64.
</ParamField>

## Response

<ResponseField name="object" type="string" required={true}>
  Fixed as list
</ResponseField>

<ResponseField name="data" type="array" required={true}>
  List of embeddings vectors generated by the model.

  <Expandable title="properties" defaultOpen={true}>
    <ResponseField name="index" type="integer" required={true}>
      The index of the embedding vector.
    </ResponseField>

    <ResponseField name="embedding" type="array" required={true}>
      The embedding vector.
    </ResponseField>

    <ResponseField name="object" type="string" required={true}>
      Fixed as embedding
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="model" type="string" required={true}>
  The ID of the model used.
</ResponseField>

<ResponseField name="usage" type="object" required={true}>
  Usage information.

  <Expandable title="properties" defaultOpen={true}>
    <ResponseField name="prompt_tokens" type="integer" required={true}>
      The number of prompt tokens.
    </ResponseField>

    <ResponseField name="total_tokens" type="integer" required={true}>
      The number of total tokens.
    </ResponseField>
  </Expandable>
</ResponseField>
