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

# Create embeddings

> Convert text to vectors

| Field             | Type         | Required | Description                                   |
| ----------------- | ------------ | -------- | --------------------------------------------- |
| `model`           | string       | Yes      | Embedding model ID.                           |
| `input`           | string/array | Yes      | Non-empty text, text array, or token array.   |
| `encoding_format` | string       | No       | `float` or `base64`.                          |
| `dimensions`      | integer      | No       | Output dimensions for models that support it. |
| `user`            | string       | No       | End-user identifier.                          |

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.bianxie.ai/v1/embeddings \
    -H "Authorization: Bearer API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "your-model",
      "input": "Text to embed"
    }'
  ```

  ```python Python theme={null}
  client.embeddings.create(model="your-model", input="Text to embed")
  ```

  ```javascript Node.js theme={null}
  await client.embeddings.create({ model: "your-model", input: "Text to embed" });
  ```
</CodeGroup>

The response has `object: "list"`, `data[]` entries with `embedding`, `index`, and `object`, plus `model` and `usage`. Streaming is not supported.
