Embeddings
Text embedding endpoint, compatible with the OpenAI Embeddings API.
Endpoint
POST $URL/v1/embeddingsQuick Example
bash
curl $URL/v1/embeddings \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": "Text to be embedded"
}'python
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="$URL/v1")
resp = client.embeddings.create(
model="text-embedding-3-small",
input="Text to be embedded",
)
print(resp.data[0].embedding[:8])Main Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model name |
input | string / array | Yes | Text to embed; supports batch array input |
To be expanded
This page is a basic version; detailed descriptions will be added later.
