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

# POST /v1/embeddings

> 文本向量生成接口。

## 用途

用于把文本转换为向量，适合检索、召回和语义相似度场景。

## 请求

* Method: `POST`
* URL: `https://api.hubto.ai/v1/embeddings`
* Auth: `Authorization: Bearer YOUR_API_KEY`
* Content-Type: `application/json`

## 最小请求体

```json theme={null}
{
  "model": "text-embedding-3-small",
  "input": "HubTo 是统一的大模型接口网关。"
}
```

## 请求示例

```bash theme={null}
curl https://api.hubto.ai/v1/embeddings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "HubTo 是统一的大模型接口网关。"
  }'
```

## 返回

成功时返回向量数组，通常位于 `data[0].embedding`。
