🎨 ChatGPT 最新生图 gpt-image-2-all 已上线 | Now Live:$0.03/张图,对话式端点提示词遵循最佳!详情 Details
curl --request POST \
--url https://api.apiyi.com/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "text-embedding-ada-002",
"input": "This is a sample text for embedding."
}
'{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0023064255,
-0.009327292,
0.015797347
]
}
],
"model": "text-embedding-ada-002",
"usage": {
"prompt_tokens": 12,
"total_tokens": 12
}
}Convert text into vector representations (embeddings) for use in semantic search, text clustering, recommendation systems, and more.
Supports single text or batch text input.
curl --request POST \
--url https://api.apiyi.com/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "text-embedding-ada-002",
"input": "This is a sample text for embedding."
}
'{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0023064255,
-0.009327292,
0.015797347
]
}
],
"model": "text-embedding-ada-002",
"usage": {
"prompt_tokens": 12,
"total_tokens": 12
}
}Documentation Index
Fetch the complete documentation index at: https://docs.apiyi.com/llms.txt
Use this file to discover all available pages before exploring further.
API Key obtained from the APIYI Console
Embedding model name
"text-embedding-ada-002"
"text-embedding-3-small"
"text-embedding-3-large"
Text to embed. Can be a single string or an array of strings.
"This is a sample text for embedding."
Encoding format for the returned vectors
float, base64