Create Embeddings
- Endpoint:
POST https://api.olddog.shop/v1/embeddings - Authentication:
Authorization: Bearer <API_KEY> - Content-Type:
application/json
Convert text (or a list of texts) into vector representations for search, clustering, similarity, etc. Compatible with the OpenAI Embeddings spec.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Embedding model ID, e.g. text-embedding-3-small (subject to availability). |
| input | string / array | Yes | Input text or list of texts. |
| user | string | No | End-user identifier. |
cURL example (single text)
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": "向量嵌入是什么?"
}'