Batch Input (Array)
- Endpoint:
POST https://api.olddog.shop/v1/embeddings
If you have multiple texts to embed at once, pass input as an array.
Request parameters (differences)
| Name | Type | Required | Description |
|---|---|---|---|
| input | array | Yes | A list of texts, e.g. ["a", "b", "c"]. |
cURL example (batch)
bash
curl --request POST "https://api.olddog.shop/v1/embeddings" \
--header "Authorization: Bearer $OLD_DOG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "text-embedding-3-small",
"input": [
"第一条文本",
"第二条文本",
"第三条文本"
]
}'