curl --request POST \
--url https://api.llmstore.ru/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dimensions": 1536,
"input": "The quick brown fox jumps over the lazy dog",
"model": "openai/text-embedding-3-small"
}
'import requests
url = "https://api.llmstore.ru/v1/embeddings"
payload = {
"dimensions": 1536,
"input": "The quick brown fox jumps over the lazy dog",
"model": "openai/text-embedding-3-small"
}
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({
dimensions: 1536,
input: 'The quick brown fox jumps over the lazy dog',
model: 'openai/text-embedding-3-small'
})
};
fetch('https://api.llmstore.ru/v1/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.llmstore.ru/v1/embeddings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dimensions' => 1536,
'input' => 'The quick brown fox jumps over the lazy dog',
'model' => 'openai/text-embedding-3-small'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.llmstore.ru/v1/embeddings"
payload := strings.NewReader("{\n \"dimensions\": 1536,\n \"input\": \"The quick brown fox jumps over the lazy dog\",\n \"model\": \"openai/text-embedding-3-small\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.llmstore.ru/v1/embeddings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dimensions\": 1536,\n \"input\": \"The quick brown fox jumps over the lazy dog\",\n \"model\": \"openai/text-embedding-3-small\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.llmstore.ru/v1/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dimensions\": 1536,\n \"input\": \"The quick brown fox jumps over the lazy dog\",\n \"model\": \"openai/text-embedding-3-small\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"embedding": [
0.0023064255,
-0.009327292,
0.015797347
],
"index": 0,
"object": "embedding"
}
],
"model": "openai/text-embedding-3-small",
"object": "list",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters"
}
}{
"error": {
"code": 401,
"message": "Missing Authentication header"
}
}{
"error": {
"code": 402,
"message": "Insufficient credits. Add more using https://llmstore.ru/credits"
}
}{
"error": {
"code": 404,
"message": "Resource not found"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 502,
"message": "Provider returned error"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable"
}
}{
"error": {
"code": 524,
"message": "Request timed out. Please try again later."
}
}{
"error": {
"code": 529,
"message": "Provider returned error"
}
}Оставить заявку на встраивание
Отправляет запрос на внедрение на маршрутизатор внедрения.
curl --request POST \
--url https://api.llmstore.ru/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dimensions": 1536,
"input": "The quick brown fox jumps over the lazy dog",
"model": "openai/text-embedding-3-small"
}
'import requests
url = "https://api.llmstore.ru/v1/embeddings"
payload = {
"dimensions": 1536,
"input": "The quick brown fox jumps over the lazy dog",
"model": "openai/text-embedding-3-small"
}
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({
dimensions: 1536,
input: 'The quick brown fox jumps over the lazy dog',
model: 'openai/text-embedding-3-small'
})
};
fetch('https://api.llmstore.ru/v1/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.llmstore.ru/v1/embeddings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dimensions' => 1536,
'input' => 'The quick brown fox jumps over the lazy dog',
'model' => 'openai/text-embedding-3-small'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.llmstore.ru/v1/embeddings"
payload := strings.NewReader("{\n \"dimensions\": 1536,\n \"input\": \"The quick brown fox jumps over the lazy dog\",\n \"model\": \"openai/text-embedding-3-small\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.llmstore.ru/v1/embeddings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dimensions\": 1536,\n \"input\": \"The quick brown fox jumps over the lazy dog\",\n \"model\": \"openai/text-embedding-3-small\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.llmstore.ru/v1/embeddings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dimensions\": 1536,\n \"input\": \"The quick brown fox jumps over the lazy dog\",\n \"model\": \"openai/text-embedding-3-small\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"embedding": [
0.0023064255,
-0.009327292,
0.015797347
],
"index": 0,
"object": "embedding"
}
],
"model": "openai/text-embedding-3-small",
"object": "list",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters"
}
}{
"error": {
"code": 401,
"message": "Missing Authentication header"
}
}{
"error": {
"code": 402,
"message": "Insufficient credits. Add more using https://llmstore.ru/credits"
}
}{
"error": {
"code": 404,
"message": "Resource not found"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 502,
"message": "Provider returned error"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable"
}
}{
"error": {
"code": 524,
"message": "Request timed out. Please try again later."
}
}{
"error": {
"code": 529,
"message": "Provider returned error"
}
}Authorizations
API-ключ в качестве токена носителя в заголовке авторизации
Body
Вложения запроса ввода
Текст, токен или мультимодальные входные данные для встраивания
1"The quick brown fox jumps over the lazy dog"
Модель, используемая для вложений
"openai/text-embedding-3-small"
Количество измерений для выходных вложений
x >= 11536
Формат выходных вложений
float, base64 "float"
Тип ввода (например, search_query, search_document)
"search_query"
Настройки маршрутизации поставщика для запроса.
Show child attributes
Show child attributes
{ "allow_fallbacks": true }
Уникальный идентификатор конечного пользователя.
"user-1234"
Response
Встраивание ответа
Ответ Embeddings, содержащий векторы внедрения
Список встраиваемых объектов
Show child attributes
Show child attributes
[
{
"embedding": [0.0023064255, -0.009327292, 0.015797347],
"index": 0,
"object": "embedding"
}
]
Модель, используемая для вложений
"openai/text-embedding-3-small"
list Уникальный идентификатор для ответа на встраивание
"embd-1234567890"
Статистика использования токенов
Show child attributes
Show child attributes
{ "prompt_tokens": 8, "total_tokens": 8 }