> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/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 value: `application/json`
</ParamField>

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

## Request Body

<ParamField body="input" type="string[]" required={true}>
  The input text to embed, encoded as a string or an array of tokens. To embed multiple inputs in a single request, pass an array of strings or an array of token arrays. The input must not exceed the model's maximum input tokens (`text-embedding-ada-002` has 8192 tokens), must not be an empty string, and the dimensions of any array must be less than or equal to 2048.
</ParamField>

<ParamField body="model" type="string" required={true}>
  The model ID to use. Enum value:

  * `baai/bge-m3`
</ParamField>

<ParamField body="encoding_format" type="string" required={false}>
  The format for returning the embedding vector. Can be float or base64.
</ParamField>

## Response Information

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

<ResponseField name="data" type="object[]" required={true}>
  A list of embedding 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="number[]" required={true}>
      The embedding vector.
    </ResponseField>

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

<ResponseField name="model" type="string" required={true}>
  The model ID 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 total number of tokens.
    </ResponseField>
  </Expandable>
</ResponseField>
