curl --request GET \
--url https://api.nugen.in/api/v3/models/{model_id}/deployment/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/models/{model_id}/deployment/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/models/{model_id}/deployment/status', 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.nugen.in/api/v3/models/{model_id}/deployment/status",
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.nugen.in/api/v3/models/{model_id}/deployment/status"
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.nugen.in/api/v3/models/{model_id}/deployment/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/models/{model_id}/deployment/status")
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_id": "model_abc123",
"status": "DEPLOYED",
"error": "<string>",
"created_at": "2024-02-24T10:00:00Z",
"completed_at": "2024-02-24T10:05:00Z",
"updated_at": "2023-11-07T05:31:56Z",
"progress": 123,
"eta_seconds": 123
}{
"detail": "Bad request"
}{
"detail": {
"model_id": "model_01kmqm4nrn9fw6r",
"message": "Model not found"
}
}{
"detail": [
{
"loc": [
"path",
"model_id"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Get Deployment Status
Check the deployment status of an aligned model.
This endpoint retrieves the current deployment status of a model, including progress and completion information.
Path Parameters:
model_id: Unique identifier of the model to check deployment status for
Returns:
model_id: The model identifierstatus: Deployment statusUNDEPLOYED: not serving, and deployableDEPLOYING: a deploy is in flightDEPLOYED: serving inferenceUNDEPLOYING: an undeploy is in flight
error: why the last attempt failed, null when it succeededcreated_at,completed_at,updated_at: timestampsprogress,eta_seconds: not wired up yet, always null
A failed attempt settles back to the state it came from, so read error alongside status: UNDEPLOYED with an error means the deploy failed, DEPLOYED with an error means the undeploy failed.
Raises:
404: If model not found or doesn’t belong to user
Example Request:
GET /api/v3/models/alignment_01k4x9m2p7q3r8c1/deployment/status
Headers: {"Authorization": "Bearer <api_key>"}
Example Response (deploy in flight):
{
"model_id": "model_01kmqm4nrn9fw6r",
"status": "DEPLOYING",
"error": null,
"created_at": "2024-02-24T10:00:00Z",
"completed_at": null,
"updated_at": "2024-02-24T10:00:00Z",
"progress": null,
"eta_seconds": null
}
Example Response (serving):
{
"model_id": "model_01kmqm4nrn9fw6r",
"status": "DEPLOYED",
"error": null,
"created_at": "2024-02-24T10:00:00Z",
"completed_at": "2024-02-24T10:05:00Z",
"updated_at": "2024-02-24T10:05:00Z",
"progress": null,
"eta_seconds": null
}
Example Response (deploy failed):
{
"model_id": "model_01kmqm4nrn9fw6r",
"status": "UNDEPLOYED",
"error": "provider rejected the adapter",
"created_at": "2024-02-24T10:00:00Z",
"completed_at": "2024-02-24T10:02:30Z",
"updated_at": "2024-02-24T10:02:30Z",
"progress": null,
"eta_seconds": null
}
Notes:
- Poll this endpoint to track deployment progress
- Only
DEPLOYEDserves inference; every other status returns 400 from the inference endpoints - A deploy that fails settles at
UNDEPLOYEDand an undeploy that fails settles atDEPLOYED, both with the reason inerror
curl --request GET \
--url https://api.nugen.in/api/v3/models/{model_id}/deployment/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/models/{model_id}/deployment/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/models/{model_id}/deployment/status', 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.nugen.in/api/v3/models/{model_id}/deployment/status",
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.nugen.in/api/v3/models/{model_id}/deployment/status"
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.nugen.in/api/v3/models/{model_id}/deployment/status")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/models/{model_id}/deployment/status")
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_id": "model_abc123",
"status": "DEPLOYED",
"error": "<string>",
"created_at": "2024-02-24T10:00:00Z",
"completed_at": "2024-02-24T10:05:00Z",
"updated_at": "2023-11-07T05:31:56Z",
"progress": 123,
"eta_seconds": 123
}{
"detail": "Bad request"
}{
"detail": {
"model_id": "model_01kmqm4nrn9fw6r",
"message": "Model not found"
}
}{
"detail": [
{
"loc": [
"path",
"model_id"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Returns the current deployment status of an aligned model.
model ID that you want to deploy
"model_abc123"
Deployment status. Only DEPLOYED serves inference.
UNDEPLOYED, DEPLOYING, DEPLOYED, UNDEPLOYING "DEPLOYED"
Why the last attempt failed, null when it succeeded. Read with status: UNDEPLOYED with an error means the deploy failed, DEPLOYED with an error means the undeploy failed.
Timestamp when this status check ran
"2024-02-24T10:00:00Z"
Timestamp when the deployment operation completed; null while still running
"2024-02-24T10:05:00Z"
Timestamp of the last status change
Completion progress, 0.0 to 100.0. Not wired up yet, always null.
Estimated time remaining in seconds. Not wired up yet, always null.
Was this page helpful?