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": "READY",
"result": {},
"start_time": "2024-02-24T10:00:00Z",
"end_time": "2024-02-24T10:05:00Z"
}{
"detail": "Bad request"
}{
"detail": "Model not found"
}{
"detail": [
{
"loc": [
"path",
"model_id"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Get Model 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 statusPROCESSING: Deployment in progressREADY: Successfully deployedFAILED: Deployment failed
result: Task result details (if completed)start_time: Timestamp when deployment startedend_time: Timestamp when deployment completed (null if still pending)
Raises:
404: If model not found or doesn’t belong to user
Example Request:
GET /api/v3/models/deploy-model/alignment-xyz789/status
Headers: {"Authorization": "Bearer <api_key>"}
Example Response (Pending):
{
"model_id": "alignment-xyz789",
"status": "PROCESSING",
"result": null,
"start_time": "2024-02-24T10:00:00Z",
"end_time": null
}
Example Response (Completed):
{
"model_id": "aligned-model-01kmqm4nrn9fw6r",
"status": "READY",
"result": {
"deployment_id": "deploy-abc123",
"endpoint_url": "https://api.example.com/v1/models/alignment-xyz789"
},
"start_time": "2024-02-24T10:00:00Z",
"end_time": "2024-02-24T10:05:00Z"
}
Example Response (Failed):
{
"model_id": "aligned-model-01kmqm4nrn9fw6r",
"status": "FAILED",
"result": {
"error": "Deployment failed due to insufficient resources"
},
"start_time": "2024-02-24T10:00:00Z",
"end_time": "2024-02-24T10:02:30Z"
}
Notes:
- Poll this endpoint to track deployment progress
- Status
READYmeans the undeploy or deploy operation finished - Once completed, use
/models/alignedto get the inference endpoint URL
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": "READY",
"result": {},
"start_time": "2024-02-24T10:00:00Z",
"end_time": "2024-02-24T10:05:00Z"
}{
"detail": "Bad request"
}{
"detail": "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: PROCESSING (in progress), READY (successfully deployed) or FAILED
PROCESSING, READY, FAILED "READY"
Result payload; on FAILED carries error with the failure reason
Timestamp when deployment process started
"2024-02-24T10:00:00Z"
Timestamp when deployment process completed
"2024-02-24T10:05:00Z"
Was this page helpful?