Получить модель
curl --request GET \
--url https://api.example.com/api/v2/models/{slug}import requests
url = "https://api.example.com/api/v2/models/{slug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/models/{slug}', 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.example.com/api/v2/models/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v2/models/{slug}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/models/{slug}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/models/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"token_cost": 123,
"min_token_cost": 123,
"max_token_cost": 123,
"min_plan": "<string>",
"config": {}
}Модели
Получить модель
Получить детали конкретной модели по слагу
GET
/
api
/
v2
/
models
/
{slug}
Получить модель
curl --request GET \
--url https://api.example.com/api/v2/models/{slug}import requests
url = "https://api.example.com/api/v2/models/{slug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/models/{slug}', 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.example.com/api/v2/models/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v2/models/{slug}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/models/{slug}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/models/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"token_cost": 123,
"min_token_cost": 123,
"max_token_cost": 123,
"min_plan": "<string>",
"config": {}
}Параметры пути
string
обязательно
Слаг модели, например:
dall-e-3, flux-1.1-pro, kling-v2.1Запрос
curl "https://elumenta.ru/api/v2/models/dall-e-3" \
-H "Authorization: Bearer nb_ВАШ_КЛЮЧ"
Ответ
{
"slug": "dall-e-3",
"name": "DALL-E 3",
"category": "image",
"provider": "OpenAI",
"min_plan": "free",
"token_cost": 5,
"min_token_cost": 5,
"max_token_cost": 13,
"description_ru": "DALL-E 3 от OpenAI — точное следование промпту, высокая когерентность",
"supports_streaming": false,
"config": {
"sizes": ["1024x1024", "1024x1792", "1792x1024"],
"formats": ["webp", "png", "jpeg"],
"quality_options": ["standard", "hd"]
}
}
Поля ответа
string
Идентификатор модели для запросов
/generate.integer
Базовая стоимость в токенах за генерацию.
integer
Минимальная стоимость (самые дешёвые параметры).
integer
Максимальная стоимость (самые дорогие параметры).
string
free (Starter-тир) или basic (требуется Basic+).object
Параметры модели: доступные размеры, форматы, качество и т.д.
⌘I

