Undeploy Model
curl --request DELETE \
--url https://api.nugen.in/api/v3/models/{model_id}/deployment \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/models/{model_id}/deployment"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/models/{model_id}/deployment', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.nugen.in/api/v3/models/{model_id}/deployment")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/models/{model_id}/deployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"model_id": "alignment_01k4x9m2p7q3r8c1",
"message": "Undeployment started for alignment_01k4x9m2p7q3r8c1."
}{
"detail": {
"model_id": "model_01kmqm4nrn9fw6r",
"message": "Model cannot be undeployed. Current status: UNDEPLOYED."
}
}{
"detail": {
"model_id": "model_01kmqm4nrn9fw6r",
"message": "Model not found"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Models
Undeploy Model
Undeploy a deployed aligned model.
This endpoint undeploys a deployed model, removing it from the inference service.
Path Parameters:
model_id: Unique identifier of the model to undeploy
Returns:
model_id: Identifier of the model being undeployedmessage: Confirmation message
Raises:
400: If model is already undeployed404: If the model or its alignment project is not found
Example Request:
DELETE /api/v3/models/alignment_01k4x9m2p7q3r8c1/deployment
Headers: {"Authorization": "Bearer <api_key>"}
Example Response:
{"model_id": "alignment_01k4x9m2p7q3r8c1", "message": "Undeployment started for alignment_01k4x9m2p7q3r8c1."}
Notes:
- Poll
GET /api/v3/models/{model_id}/deployment/statusto track undeployment - Once UNDEPLOYED, the model will no longer be available for inference
- The model can be redeployed later using the deploy endpoint
DELETE
/
api
/
v3
/
models
/
{model_id}
/
deployment
Undeploy Model
curl --request DELETE \
--url https://api.nugen.in/api/v3/models/{model_id}/deployment \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/models/{model_id}/deployment"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nugen.in/api/v3/models/{model_id}/deployment', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.nugen.in/api/v3/models/{model_id}/deployment")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/models/{model_id}/deployment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"model_id": "alignment_01k4x9m2p7q3r8c1",
"message": "Undeployment started for alignment_01k4x9m2p7q3r8c1."
}{
"detail": {
"model_id": "model_01kmqm4nrn9fw6r",
"message": "Model cannot be undeployed. Current status: UNDEPLOYED."
}
}{
"detail": {
"model_id": "model_01kmqm4nrn9fw6r",
"message": "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
Response
Successfully initiated model undeployment
Was this page helpful?