Deploy Status
curl --request GET \
--url https://api.deepinfra.com/deploy/{deploy_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deepinfra.com/deploy/{deploy_id}"
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/deploy/{deploy_id}', 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/deploy/{deploy_id}",
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/deploy/{deploy_id}"
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/deploy/{deploy_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepinfra.com/deploy/{deploy_id}")
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{
"deploy_id": "fkj843kjh8",
"model_name": "google/vit-base-patch16-224",
"version": "d8b79b422843bd59d628bf25b01aded94a9ec1a9b917e69fe460df9ff39ec42b",
"task": "image-classification",
"status": "deployed",
"fail_reason": "Initialization failed",
"created_at": "2021-08-27T17:19:21+00:00",
"updated_at": "2021-08-27T17:19:21+00:00",
"type": "legacy",
"instances": {
"running": 123,
"pending": 123,
"warming": 0
},
"config": {
"gpu": "L4-24GB",
"num_gpus": 123,
"max_batch_size": 123,
"weights": {
"repo": "<string>",
"revision": "<string>",
"token": "<string>"
}
},
"settings": {
"min_instances": 1,
"max_instances": 1
},
"standard_args": {
"max_context_size": 5000000,
"max_concurrent_requests": 512,
"max_images_per_prompt": 512,
"gpu_memory_fraction": 0.735,
"max_prefill_tokens": 65792,
"kv_cache_dtype": "auto",
"enable_prefix_caching": true,
"quantization": "fp8"
},
"extra_args": [
"<string>"
],
"update_error": "<string>",
"rollout": {
"up_to_date": 123,
"outdated": 123,
"booting": 123
}
}{
"error": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Dedicated Models
Deploy Status
GET
/
deploy
/
{deploy_id}
Deploy Status
curl --request GET \
--url https://api.deepinfra.com/deploy/{deploy_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deepinfra.com/deploy/{deploy_id}"
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/deploy/{deploy_id}', 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/deploy/{deploy_id}",
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/deploy/{deploy_id}"
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/deploy/{deploy_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deepinfra.com/deploy/{deploy_id}")
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{
"deploy_id": "fkj843kjh8",
"model_name": "google/vit-base-patch16-224",
"version": "d8b79b422843bd59d628bf25b01aded94a9ec1a9b917e69fe460df9ff39ec42b",
"task": "image-classification",
"status": "deployed",
"fail_reason": "Initialization failed",
"created_at": "2021-08-27T17:19:21+00:00",
"updated_at": "2021-08-27T17:19:21+00:00",
"type": "legacy",
"instances": {
"running": 123,
"pending": 123,
"warming": 0
},
"config": {
"gpu": "L4-24GB",
"num_gpus": 123,
"max_batch_size": 123,
"weights": {
"repo": "<string>",
"revision": "<string>",
"token": "<string>"
}
},
"settings": {
"min_instances": 1,
"max_instances": 1
},
"standard_args": {
"max_context_size": 5000000,
"max_concurrent_requests": 512,
"max_images_per_prompt": 512,
"gpu_memory_fraction": 0.735,
"max_prefill_tokens": 65792,
"kv_cache_dtype": "auto",
"enable_prefix_caching": true,
"quantization": "fp8"
},
"extra_args": [
"<string>"
],
"update_error": "<string>",
"rollout": {
"up_to_date": 123,
"outdated": 123,
"booting": 123
}
}{
"error": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}When called with an API key, the key needs the
models:read scope (about scopes).Authorizations
Response
Successful Response