curl --request POST \
--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.post(url, headers=headers)
print(response.text)const options = {method: 'POST', 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 => "POST",
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("POST", 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.post("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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyDeploy Aligned Model
Deploy an aligned model for inference use, or hot-swap its latest checkpoint if already deployed.
This endpoint deploys a domain-aligned expert model, making it available for inference. Deploy several experts and serve them side by side, each through the same inference endpoints.
When called with early=true on a model that is already deployed and still in
train-time alignment, it hot-swaps the latest adapter checkpoint instead of erroring —
the inference URL stays the same, only the weights change.
Path Parameters:
model_id: Unique identifier of the aligned model to deploy
Returns:
- Fresh deploy:
{"model_id": "..."}— deployment queued asynchronously - Checkpoint hot-swap (
early=true, already deployed):{"model_id": "...", "adapter_checkpoint_step": 3, "adapter_updated_at": "..."}
Raises:
400: If the model is already deployed andearly=false(or training is done); undeploy first400: Ifearly=truebut the base model is not inference-ready404: If the model or its alignment project is not found409: If the model is still in train-time alignment; passearly=trueto deploy its newest checkpoint
Example Request:
POST /api/v3/models/{model_id}/deployment
Headers: {"Authorization": "Bearer <api_key>"}
Example Response (fresh deploy):
{"model_id": "model_01kmqm4nrn9fw6r"}
Example Response (checkpoint hot-swap):
{"model_id": "model_01kmqm4nrn9fw6r", "adapter_checkpoint_step": 3, "adapter_updated_at": "2026-07-20 23:52:02 UTC"}
Notes:
- Fresh deployment is asynchronous and may take 5-15 minutes to complete
- Poll
GET /api/v3/models/{model_id}/deployment/status; onFAILEDthe failure reason is inresult.error - Checkpoint hot-swap (
early=trueon an already-deployed model) is synchronous and returns once the swap is done - Model must be in
UNDEPLOYEDstate for a fresh deployment (unlessearly=trueduring train-time alignment)
curl --request POST \
--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.post(url, headers=headers)
print(response.text)const options = {method: 'POST', 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 => "POST",
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("POST", 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.post("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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyPath Parameters
Query Parameters
Response
Successfully initiated model deployment, or hot-swapped the latest adapter checkpoint (early=true on an already-deployed model)
Acknowledgement of a deploy request.
Was this page helpful?