Model Family
curl --request GET \
--url https://api.deepinfra.com/model-families/{family_name}import requests
url = "https://api.deepinfra.com/model-families/{family_name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.deepinfra.com/model-families/{family_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/model-families/{family_name}",
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.deepinfra.com/model-families/{family_name}"
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.deepinfra.com/model-families/{family_name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepinfra.com/model-families/{family_name}")
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{
"name": "<string>",
"title": "<string>",
"description": "<string>",
"developer": "<string>",
"featured_models": [
"<string>"
],
"pp_sections_out": [
{
"section_id": "<string>",
"ptype": "tokens",
"title": "<string>",
"description": "<string>",
"entries": [
{
"model_name": "<string>",
"short_name": "<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"
},
"max_tokens": 123
}
],
"mf_description": ""
}
],
"meta_title": "<string>",
"meta_description": "<string>",
"faq_entries": [
{
"faq_id": "<string>",
"question": "<string>",
"answer": "<string>",
"order": 0
}
]
}{
"error": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Models
Model Family
GET
/
model-families
/
{family_name}
Model Family
curl --request GET \
--url https://api.deepinfra.com/model-families/{family_name}import requests
url = "https://api.deepinfra.com/model-families/{family_name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.deepinfra.com/model-families/{family_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/model-families/{family_name}",
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.deepinfra.com/model-families/{family_name}"
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.deepinfra.com/model-families/{family_name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepinfra.com/model-families/{family_name}")
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{
"name": "<string>",
"title": "<string>",
"description": "<string>",
"developer": "<string>",
"featured_models": [
"<string>"
],
"pp_sections_out": [
{
"section_id": "<string>",
"ptype": "tokens",
"title": "<string>",
"description": "<string>",
"entries": [
{
"model_name": "<string>",
"short_name": "<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"
},
"max_tokens": 123
}
],
"mf_description": ""
}
],
"meta_title": "<string>",
"meta_description": "<string>",
"faq_entries": [
{
"faq_id": "<string>",
"question": "<string>",
"answer": "<string>",
"order": 0
}
]
}{
"error": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Response
Successful Response