Skip to content

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

NameTypeRequiredDescription
modelstringYesEmbedding model ID, e.g. text-embedding-3-small (subject to availability).
inputstring / arrayYesInput text or list of texts.
userstringNoEnd-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": "向量嵌入是什么?"
  }'