Creates an embedding vector representing the input text.
curl --request POST \
--url https://api.acedata.cloud/openai/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "text-embedding-3-small",
"input": "Hello!"
}
'import requests
url = "https://api.acedata.cloud/openai/embeddings"
payload = {
"model": "text-embedding-3-small",
"input": "Hello!"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'text-embedding-3-small', input: 'Hello!'})
};
fetch('https://api.acedata.cloud/openai/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0023064255,
-0.009327292,
0.015271,
0.001234
]
}
],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 9,
"total_tokens": 9
},
"created": 1714500000
}API Reference
Creates an embedding vector representing the input text.
POST
/
openai
/
embeddings
Creates an embedding vector representing the input text.
curl --request POST \
--url https://api.acedata.cloud/openai/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "text-embedding-3-small",
"input": "Hello!"
}
'import requests
url = "https://api.acedata.cloud/openai/embeddings"
payload = {
"model": "text-embedding-3-small",
"input": "Hello!"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'text-embedding-3-small', input: 'Hello!'})
};
fetch('https://api.acedata.cloud/openai/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0023064255,
-0.009327292,
0.015271,
0.001234
]
}
],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 9,
"total_tokens": 9
},
"created": 1714500000
}التفويضات
API token from https://platform.acedata.cloud
الترويسات
Openai Embeddings Param Accept
الخيارات المتاحة:
application/json الجسم
application/json
Openai Embeddings Model
الخيارات المتاحة:
text-embedding-3-small, text-embedding-3-large, text-embedding-ada-002 Openai Embeddings Input
Openai Embeddings Encoding Format
الخيارات المتاحة:
float, base64 Openai Embeddings Dimensions
النطاق المطلوب:
x >= 1الاستجابة
Openai Embeddings Response 200
هل كانت هذه الصفحة مفيدة؟

