curl --request POST \
--url https://api.dedaluslabs.ai/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "<string>",
"encoding_format": "float",
"dimensions": 2,
"user": "<string>"
}
'{
"data": [
{
"embedding": [
123
],
"index": 123,
"object": "embedding"
}
],
"model": "<string>",
"usage": {},
"object": "list"
}curl --request POST \
--url https://api.dedaluslabs.ai/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"model": "<string>",
"encoding_format": "float",
"dimensions": 2,
"user": "<string>"
}
'{
"data": [
{
"embedding": [
123
],
"index": 123,
"object": "embedding"
}
],
"model": "<string>",
"usage": {},
"object": "list"
}curl -X POST https://api.dedaluslabs.ai/v1/embeddings \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/text-embedding-3-small",
"input": "The quick brown fox jumps over the lazy dog"
}'
Bearer टोकन के माध्यम से API कुंजी का प्रमाणीकरण
फ़ील्ड्स:
एम्बेड करने के लिए इनपुट टेक्स्ट, जिसे एक string या tokens की array के रूप में दिया जाता है। एक ही अनुरोध में कई इनपुट एम्बेड करने के लिए, strings की array या token arrays की array पास करें। इनपुट, model के लिए निर्धारित अधिकतम इनपुट tokens (सभी embedding models के लिए 8192 tokens) से अधिक नहीं होना चाहिए, खाली string नहीं होनी चाहिए, और किसी भी array के dimensions 2048 से अधिक नहीं होने चाहिए। tokens गिनने के लिए Python कोड उदाहरण देखें। प्रति‑इनपुट token सीमा के अलावा, सभी embedding models एक अतिरिक्त अधिकतम सीमा भी लागू करते हैं: एक ही अनुरोध में सभी इनपुट्स का कुल मिलाकर 300,000 tokens से अधिक नहीं होना चाहिए।
उपयोग किए जाने वाले model का id। उपलब्ध एंबेडिंग मॉडलों के लिए हमारे Model Providers देखें।
परिणामी आउटपुट एंबेडिंग्स में कितने आयाम होने चाहिए। यह केवल text-embedding-3 और उसके बाद के मॉडलों में समर्थित है।
x >= 1सफल प्रतिक्रिया
embeddings endpoint से प्राप्त होने वाला response।
embedding ऑब्जेक्ट्स की सूची।
Show child attributes
embeddings को जनरेट करने के लिए प्रयुक्त model।
उपयोग से संबंधित आँकड़े (prompt_tokens, total_tokens)।
Show child attributes
ऑब्जेक्ट का प्रकार; हमेशा 'list'।
"list"Was this page helpful?