Models Info
curl --request GET \
--url https://api.deepinfra.com/models/{model_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deepinfra.com/models/{model_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.deepinfra.com/models/{model_name}', 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.deepinfra.com/models/{model_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.deepinfra.com/models/{model_name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.deepinfra.com/models/{model_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepinfra.com/models/{model_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"model_name": "<string>",
"type": "<string>",
"tags": [
"<string>"
],
"reported_type": "<string>",
"version": "<string>",
"featured": true,
"public": true,
"curl_inv": "<string>",
"cmdline_inv": "<string>",
"txt_docs": "<string>",
"out_example": "<string>",
"out_docs": "<string>",
"pricing": {
"cents_per_sec": 123,
"discount": 0.2,
"discount_ends_at": 1786000000,
"short": "$0.15 / second",
"full": "$0.15 / second for 1080P, $0.10 / second for 720P",
"table": {
"columns": [
"resolution",
"$ cost per second"
],
"rows": [
[
"780P",
"$0.10"
],
[
"1080P",
"$0.15"
]
]
},
"type": "time"
},
"schemas": [
{
"key": "default",
"url": "<string>"
}
],
"description": "<string>",
"mf_description": "<string>",
"owner": false,
"in_schema": "<unknown>",
"out_schema": "<unknown>",
"in_fields": [
{
"name": "<string>",
"ftype": "<string>",
"parent": "<string>",
"description": "<string>",
"allowed": [
"<unknown>"
],
"default": "<unknown>",
"examples": [],
"minimum": 123,
"exclusiveMinimum": 123,
"maximum": 123,
"exclusiveMaximum": 123
}
],
"doc_blocks": [
{
"key": "http",
"url": "<string>"
}
],
"short_doc_block": {
"key": "http",
"url": "<string>"
},
"meta": {},
"max_tokens": 123,
"max_output_tokens": 123,
"replaced_by": "<string>",
"deprecated": 123,
"quantization": "<string>",
"mmlu": 123,
"expected": "<string>",
"import_time": "<string>",
"is_partner": false,
"is_custom_deployable": false,
"mf_name": "<string>",
"mf_title": "<string>"
}{
"error": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Models
Models Info
GET
/
models
/
{model_name}
Models Info
curl --request GET \
--url https://api.deepinfra.com/models/{model_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deepinfra.com/models/{model_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.deepinfra.com/models/{model_name}', 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.deepinfra.com/models/{model_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.deepinfra.com/models/{model_name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.deepinfra.com/models/{model_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepinfra.com/models/{model_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"model_name": "<string>",
"type": "<string>",
"tags": [
"<string>"
],
"reported_type": "<string>",
"version": "<string>",
"featured": true,
"public": true,
"curl_inv": "<string>",
"cmdline_inv": "<string>",
"txt_docs": "<string>",
"out_example": "<string>",
"out_docs": "<string>",
"pricing": {
"cents_per_sec": 123,
"discount": 0.2,
"discount_ends_at": 1786000000,
"short": "$0.15 / second",
"full": "$0.15 / second for 1080P, $0.10 / second for 720P",
"table": {
"columns": [
"resolution",
"$ cost per second"
],
"rows": [
[
"780P",
"$0.10"
],
[
"1080P",
"$0.15"
]
]
},
"type": "time"
},
"schemas": [
{
"key": "default",
"url": "<string>"
}
],
"description": "<string>",
"mf_description": "<string>",
"owner": false,
"in_schema": "<unknown>",
"out_schema": "<unknown>",
"in_fields": [
{
"name": "<string>",
"ftype": "<string>",
"parent": "<string>",
"description": "<string>",
"allowed": [
"<unknown>"
],
"default": "<unknown>",
"examples": [],
"minimum": 123,
"exclusiveMinimum": 123,
"maximum": 123,
"exclusiveMaximum": 123
}
],
"doc_blocks": [
{
"key": "http",
"url": "<string>"
}
],
"short_doc_block": {
"key": "http",
"url": "<string>"
},
"meta": {},
"max_tokens": 123,
"max_output_tokens": 123,
"replaced_by": "<string>",
"deprecated": 123,
"quantization": "<string>",
"mmlu": 123,
"expected": "<string>",
"import_time": "<string>",
"is_partner": false,
"is_custom_deployable": false,
"mf_name": "<string>",
"mf_title": "<string>"
}{
"error": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Response
Successful Response
- ModelPricingTime
- ModelPricingUptime
- ModelPricingTokens
- ModelPricingInputLength
- ModelPricingInputTokens
- ModelPricingInputCharacterLength
- ModelPricingImageUnits
- ModelPricingOutputLength
- ModelPricingFrameUnits
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes