Embeddings
Create dense vectors for semantic search, RAG indexing, clustering, and deduplication. RelayX currently routes Chinese-first embeddings to DashScope text-embedding-v4.
POST /v1/embeddingsTry it
curl https://relayx.timor419.com/v1/embeddings \
-H "Authorization: Bearer $RELAYX_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dashscope/text-embedding-v4",
"input": "RelayX 是一个 OpenAI 兼容 API 网关。",
"dimensions": 1024
}'Parameters
- `input`: a string or array of strings. Batch inputs return one vector per item; text-embedding-v4 accepts up to 10 items per request.
- `dimensions`: optional vector size. text-embedding-v4 defaults to 1024 and supports up to 2048.
- Billing is based on input tokens; responses include X-RelayX-Usage with input_tokens and vectors.