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": "Model not found"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Inference 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 models return.
By default, the capture is off for every organisation until you turn it on. It applies to both base models and aligned (fine-tuned) models.
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 default (applies to all models)models: 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": "Model not found"
}{
"detail": "Model not found"
}{
"detail": "Model not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
Send either field. enabled moves the org default, models merges the listed aligned models as exceptions to it.
Was this page helpful?