curl --request GET \
--url https://api.nugen.in/api/v3/models/aligned \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/models/aligned"
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/aligned', 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/aligned",
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/aligned"
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/aligned")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/models/aligned")
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{
"domain_aligned_models": [
{
"base_model_id": "Qwen/Qwen2.5-0.5B-Instruct",
"base_model_name": "Qwen/Qwen2.5-0.5B-Instruct",
"created_at": "2024-01-15T10:30:00Z",
"deployment_status": "DEPLOYED",
"model_id": "model_01k4x9m2p7q3r9d1",
"model_name": "model_contract_risk"
},
{
"base_model_id": "Qwen/Qwen2.5-1.5B-Instruct",
"base_model_name": "Llama V3p3 70b Instruct",
"created_at": "2024-02-01T09:15:00Z",
"deployment_status": "UNDEPLOYED",
"model_id": "model_01k4x9m2p7q3r9d2",
"model_name": "model_clinical_coding"
}
]
}{
"detail": "Bad request"
}{
"detail": "No aligned models found"
}{
"detail": [
{
"loc": [
"header",
"Authorization"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}List Aligned Models
Retrieve all domain-aligned models for the authenticated user.
This endpoint returns a lean list row per aligned model. Fetch GET /models/{model_id} for the full record: performance metrics, evaluation data, usage, downloadability and conversation settings.
Query Parameters:
deployment_status(optional):UNDEPLOYED,DEPLOYING,DEPLOYEDorUNDEPLOYINGbase_model_id(optional): exact base model id, e.g.Qwen/Qwen2.5-0.5B-Instructlimit(optional): Number of models to return (1-100, default: 10)offset(optional): Number of models to skip for pagination (default: 0)
Returns:
domain_aligned_models: List of aligned model objects, each containing:model_id: Unique model identifier (oralignment-{id}for un-deployed models)model_name: Model namedeployment_status:UNDEPLOYED,DEPLOYING,DEPLOYEDorUNDEPLOYING. OnlyDEPLOYEDserves inference.base_model_id: Base model used for alignmentalignment_id: The alignment project that produced this modelcreated_at: Creation timestamp
Example Request:
GET /api/v3/models/aligned
Headers: {"Authorization": "Bearer <api_key>"}
Example Response:
{
"domain_aligned_models": [
{
"model_id": "model_01kmqm4nrn9fw6r",
"model_name": "customer_support_model",
"deployment_status": "DEPLOYED",
"base_model_id": "Qwen/Qwen2.5-0.5B-Instruct",
"alignment_id": "alignment_01k4x9m2p7q3r8c1",
"created_at": "2024-01-15T10:30:00Z"
}
]
}
Notes:
- Returns both deployed and undeployed aligned models
- Use
/models/baseto see available base models for alignment
curl --request GET \
--url https://api.nugen.in/api/v3/models/aligned \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nugen.in/api/v3/models/aligned"
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/aligned', 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/aligned",
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/aligned"
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/aligned")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/models/aligned")
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{
"domain_aligned_models": [
{
"base_model_id": "Qwen/Qwen2.5-0.5B-Instruct",
"base_model_name": "Qwen/Qwen2.5-0.5B-Instruct",
"created_at": "2024-01-15T10:30:00Z",
"deployment_status": "DEPLOYED",
"model_id": "model_01k4x9m2p7q3r9d1",
"model_name": "model_contract_risk"
},
{
"base_model_id": "Qwen/Qwen2.5-1.5B-Instruct",
"base_model_name": "Llama V3p3 70b Instruct",
"created_at": "2024-02-01T09:15:00Z",
"deployment_status": "UNDEPLOYED",
"model_id": "model_01k4x9m2p7q3r9d2",
"model_name": "model_clinical_coding"
}
]
}{
"detail": "Bad request"
}{
"detail": "No aligned models found"
}{
"detail": [
{
"loc": [
"header",
"Authorization"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Only models in this deployment state Where a model rests, and what it passes through in between. Only DEPLOYED serves inference. A failed attempt settles back to the state it came from and puts the reason in error.
UNDEPLOYED, DEPLOYING, DEPLOYED, UNDEPLOYING Only models aligned from this base model, by exact id
Number of models to return
1 <= x <= 100Number of models to skip
x >= 0Response
Returns a list of all domain-aligned models created by the authenticated user.
One summary row per aligned model. Performance metrics and evaluation data are served by GET /models/{model_id}.
Show child attributes
Show child attributes
Was this page helpful?