curl --request PATCH \
--url https://api.nugen.in/api/v3/inference/capture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"models": {
"model_01k4x9m2p7q3r9d1": true
}
}
'import requests
url = "https://api.nugen.in/api/v3/inference/capture"
payload = {
"enabled": True,
"models": { "model_01k4x9m2p7q3r9d1": True }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, models: {model_01k4x9m2p7q3r9d1: true}})
};
fetch('https://api.nugen.in/api/v3/inference/capture', 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/inference/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'models' => [
'model_01k4x9m2p7q3r9d1' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nugen.in/api/v3/inference/capture"
payload := strings.NewReader("{\n \"enabled\": true,\n \"models\": {\n \"model_01k4x9m2p7q3r9d1\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.nugen.in/api/v3/inference/capture")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"models\": {\n \"model_01k4x9m2p7q3r9d1\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/inference/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"models\": {\n \"model_01k4x9m2p7q3r9d1\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"models": {}
}{
"detail": "not aligned models, so capture cannot apply to them: Qwen/Qwen2.5-0.5B-Instruct"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Inference Capture Settings
Turn capture on or off for your organisation.
Send enabled to move the default, models to set per model exceptions, or both. Aligned models you do not mention keep the setting they already have.
Whether Nugen keeps the instructions you send and the responses your aligned models return.
Capture is off for every organisation until you turn it on, and it covers aligned models only. Base model traffic is never kept, and a base model id is rejected by this endpoint.
Kept pairs become training data for POST /api/v3/alignment-projects/{alignment_id}/auto-align, so a model that gets used improves from that use. Turning capture off stops collection from the next request onwards and leaves already kept pairs in place.
Returns:
enabled: your organisation’s defaultmodels: aligned models that differ from that default, keyed by model id
curl --request PATCH \
--url https://api.nugen.in/api/v3/inference/capture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"models": {
"model_01k4x9m2p7q3r9d1": true
}
}
'import requests
url = "https://api.nugen.in/api/v3/inference/capture"
payload = {
"enabled": True,
"models": { "model_01k4x9m2p7q3r9d1": True }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, models: {model_01k4x9m2p7q3r9d1: true}})
};
fetch('https://api.nugen.in/api/v3/inference/capture', 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/inference/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'models' => [
'model_01k4x9m2p7q3r9d1' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nugen.in/api/v3/inference/capture"
payload := strings.NewReader("{\n \"enabled\": true,\n \"models\": {\n \"model_01k4x9m2p7q3r9d1\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.nugen.in/api/v3/inference/capture")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"models\": {\n \"model_01k4x9m2p7q3r9d1\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nugen.in/api/v3/inference/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"models\": {\n \"model_01k4x9m2p7q3r9d1\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"models": {}
}{
"detail": "not aligned models, so capture cannot apply to them: Qwen/Qwen2.5-0.5B-Instruct"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Send either field. enabled moves the org default, models merges the listed aligned models as exceptions to it.
Was this page helpful?