curl --request POST \
--url https://api.example.com/api/v1/model \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"config": {
"endpoint_url": "<string>",
"request_field": "message",
"response_field": "response",
"session_field": "session_id",
"session_response_field": "<string>",
"session_response_header_field": "<string>",
"session_id_numeric": false,
"transport": "http",
"http_stream_format": "sync",
"chunk_combination": "concatenate",
"chunk_skip_roles": [
"<string>"
],
"extra_http_headers": {},
"request_body_template": {},
"ws_auth_endpoint": null,
"ws_url_endpoint": null,
"ws_request_extra_fields": {},
"ws_event_type_field": "type",
"ws_done_event_type": "<string>",
"ws_result_extract_field": "<string>",
"ws_stream_extract_field": "<string>",
"request_timeout": 180
},
"environment": "staging",
"auth_type": "none",
"credential": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/model"
payload = {
"name": "<string>",
"config": {
"endpoint_url": "<string>",
"request_field": "message",
"response_field": "response",
"session_field": "session_id",
"session_response_field": "<string>",
"session_response_header_field": "<string>",
"session_id_numeric": False,
"transport": "http",
"http_stream_format": "sync",
"chunk_combination": "concatenate",
"chunk_skip_roles": ["<string>"],
"extra_http_headers": {},
"request_body_template": {},
"ws_auth_endpoint": None,
"ws_url_endpoint": None,
"ws_request_extra_fields": {},
"ws_event_type_field": "type",
"ws_done_event_type": "<string>",
"ws_result_extract_field": "<string>",
"ws_stream_extract_field": "<string>",
"request_timeout": 180
},
"environment": "staging",
"auth_type": "none",
"credential": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
config: {
endpoint_url: '<string>',
request_field: 'message',
response_field: 'response',
session_field: 'session_id',
session_response_field: '<string>',
session_response_header_field: '<string>',
session_id_numeric: false,
transport: 'http',
http_stream_format: 'sync',
chunk_combination: 'concatenate',
chunk_skip_roles: ['<string>'],
extra_http_headers: {},
request_body_template: {},
ws_auth_endpoint: null,
ws_url_endpoint: null,
ws_request_extra_fields: {},
ws_event_type_field: 'type',
ws_done_event_type: '<string>',
ws_result_extract_field: '<string>',
ws_stream_extract_field: '<string>',
request_timeout: 180
},
environment: 'staging',
auth_type: 'none',
credential: '<string>'
})
};
fetch('https://api.example.com/api/v1/model', 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.example.com/api/v1/model",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'config' => [
'endpoint_url' => '<string>',
'request_field' => 'message',
'response_field' => 'response',
'session_field' => 'session_id',
'session_response_field' => '<string>',
'session_response_header_field' => '<string>',
'session_id_numeric' => false,
'transport' => 'http',
'http_stream_format' => 'sync',
'chunk_combination' => 'concatenate',
'chunk_skip_roles' => [
'<string>'
],
'extra_http_headers' => [
],
'request_body_template' => [
],
'ws_auth_endpoint' => null,
'ws_url_endpoint' => null,
'ws_request_extra_fields' => [
],
'ws_event_type_field' => 'type',
'ws_done_event_type' => '<string>',
'ws_result_extract_field' => '<string>',
'ws_stream_extract_field' => '<string>',
'request_timeout' => 180
],
'environment' => 'staging',
'auth_type' => 'none',
'credential' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/v1/model"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"config\": {\n \"endpoint_url\": \"<string>\",\n \"request_field\": \"message\",\n \"response_field\": \"response\",\n \"session_field\": \"session_id\",\n \"session_response_field\": \"<string>\",\n \"session_response_header_field\": \"<string>\",\n \"session_id_numeric\": false,\n \"transport\": \"http\",\n \"http_stream_format\": \"sync\",\n \"chunk_combination\": \"concatenate\",\n \"chunk_skip_roles\": [\n \"<string>\"\n ],\n \"extra_http_headers\": {},\n \"request_body_template\": {},\n \"ws_auth_endpoint\": null,\n \"ws_url_endpoint\": null,\n \"ws_request_extra_fields\": {},\n \"ws_event_type_field\": \"type\",\n \"ws_done_event_type\": \"<string>\",\n \"ws_result_extract_field\": \"<string>\",\n \"ws_stream_extract_field\": \"<string>\",\n \"request_timeout\": 180\n },\n \"environment\": \"staging\",\n \"auth_type\": \"none\",\n \"credential\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.example.com/api/v1/model")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"config\": {\n \"endpoint_url\": \"<string>\",\n \"request_field\": \"message\",\n \"response_field\": \"response\",\n \"session_field\": \"session_id\",\n \"session_response_field\": \"<string>\",\n \"session_response_header_field\": \"<string>\",\n \"session_id_numeric\": false,\n \"transport\": \"http\",\n \"http_stream_format\": \"sync\",\n \"chunk_combination\": \"concatenate\",\n \"chunk_skip_roles\": [\n \"<string>\"\n ],\n \"extra_http_headers\": {},\n \"request_body_template\": {},\n \"ws_auth_endpoint\": null,\n \"ws_url_endpoint\": null,\n \"ws_request_extra_fields\": {},\n \"ws_event_type_field\": \"type\",\n \"ws_done_event_type\": \"<string>\",\n \"ws_result_extract_field\": \"<string>\",\n \"ws_stream_extract_field\": \"<string>\",\n \"request_timeout\": 180\n },\n \"environment\": \"staging\",\n \"auth_type\": \"none\",\n \"credential\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/model")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"config\": {\n \"endpoint_url\": \"<string>\",\n \"request_field\": \"message\",\n \"response_field\": \"response\",\n \"session_field\": \"session_id\",\n \"session_response_field\": \"<string>\",\n \"session_response_header_field\": \"<string>\",\n \"session_id_numeric\": false,\n \"transport\": \"http\",\n \"http_stream_format\": \"sync\",\n \"chunk_combination\": \"concatenate\",\n \"chunk_skip_roles\": [\n \"<string>\"\n ],\n \"extra_http_headers\": {},\n \"request_body_template\": {},\n \"ws_auth_endpoint\": null,\n \"ws_url_endpoint\": null,\n \"ws_request_extra_fields\": {},\n \"ws_event_type_field\": \"type\",\n \"ws_done_event_type\": \"<string>\",\n \"ws_result_extract_field\": \"<string>\",\n \"ws_stream_extract_field\": \"<string>\",\n \"request_timeout\": 180\n },\n \"environment\": \"staging\",\n \"auth_type\": \"none\",\n \"credential\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model_id": "<string>",
"connected": true
}{
"detail": {
"error": "probe_failed",
"error_category": "unreachable",
"message": "Could not reach the target endpoint."
}
}Register an agent target (atomic prove-then-persist)
Fires a live round-trip and persists the target ONLY if the probe succeeds; a failed probe persists nothing and returns a categorized error (unreachable / auth_failed / parse_error). Static auth (none/bearer/api_key/basic) over http or websocket. The response never echoes the config, credential, or reply. The returned model_id is the handle for POST /api/v1/run. List first via GET /api/v1/model — creates are not deduplicated.
curl --request POST \
--url https://api.example.com/api/v1/model \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"config": {
"endpoint_url": "<string>",
"request_field": "message",
"response_field": "response",
"session_field": "session_id",
"session_response_field": "<string>",
"session_response_header_field": "<string>",
"session_id_numeric": false,
"transport": "http",
"http_stream_format": "sync",
"chunk_combination": "concatenate",
"chunk_skip_roles": [
"<string>"
],
"extra_http_headers": {},
"request_body_template": {},
"ws_auth_endpoint": null,
"ws_url_endpoint": null,
"ws_request_extra_fields": {},
"ws_event_type_field": "type",
"ws_done_event_type": "<string>",
"ws_result_extract_field": "<string>",
"ws_stream_extract_field": "<string>",
"request_timeout": 180
},
"environment": "staging",
"auth_type": "none",
"credential": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/model"
payload = {
"name": "<string>",
"config": {
"endpoint_url": "<string>",
"request_field": "message",
"response_field": "response",
"session_field": "session_id",
"session_response_field": "<string>",
"session_response_header_field": "<string>",
"session_id_numeric": False,
"transport": "http",
"http_stream_format": "sync",
"chunk_combination": "concatenate",
"chunk_skip_roles": ["<string>"],
"extra_http_headers": {},
"request_body_template": {},
"ws_auth_endpoint": None,
"ws_url_endpoint": None,
"ws_request_extra_fields": {},
"ws_event_type_field": "type",
"ws_done_event_type": "<string>",
"ws_result_extract_field": "<string>",
"ws_stream_extract_field": "<string>",
"request_timeout": 180
},
"environment": "staging",
"auth_type": "none",
"credential": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
config: {
endpoint_url: '<string>',
request_field: 'message',
response_field: 'response',
session_field: 'session_id',
session_response_field: '<string>',
session_response_header_field: '<string>',
session_id_numeric: false,
transport: 'http',
http_stream_format: 'sync',
chunk_combination: 'concatenate',
chunk_skip_roles: ['<string>'],
extra_http_headers: {},
request_body_template: {},
ws_auth_endpoint: null,
ws_url_endpoint: null,
ws_request_extra_fields: {},
ws_event_type_field: 'type',
ws_done_event_type: '<string>',
ws_result_extract_field: '<string>',
ws_stream_extract_field: '<string>',
request_timeout: 180
},
environment: 'staging',
auth_type: 'none',
credential: '<string>'
})
};
fetch('https://api.example.com/api/v1/model', 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.example.com/api/v1/model",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'config' => [
'endpoint_url' => '<string>',
'request_field' => 'message',
'response_field' => 'response',
'session_field' => 'session_id',
'session_response_field' => '<string>',
'session_response_header_field' => '<string>',
'session_id_numeric' => false,
'transport' => 'http',
'http_stream_format' => 'sync',
'chunk_combination' => 'concatenate',
'chunk_skip_roles' => [
'<string>'
],
'extra_http_headers' => [
],
'request_body_template' => [
],
'ws_auth_endpoint' => null,
'ws_url_endpoint' => null,
'ws_request_extra_fields' => [
],
'ws_event_type_field' => 'type',
'ws_done_event_type' => '<string>',
'ws_result_extract_field' => '<string>',
'ws_stream_extract_field' => '<string>',
'request_timeout' => 180
],
'environment' => 'staging',
'auth_type' => 'none',
'credential' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/v1/model"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"config\": {\n \"endpoint_url\": \"<string>\",\n \"request_field\": \"message\",\n \"response_field\": \"response\",\n \"session_field\": \"session_id\",\n \"session_response_field\": \"<string>\",\n \"session_response_header_field\": \"<string>\",\n \"session_id_numeric\": false,\n \"transport\": \"http\",\n \"http_stream_format\": \"sync\",\n \"chunk_combination\": \"concatenate\",\n \"chunk_skip_roles\": [\n \"<string>\"\n ],\n \"extra_http_headers\": {},\n \"request_body_template\": {},\n \"ws_auth_endpoint\": null,\n \"ws_url_endpoint\": null,\n \"ws_request_extra_fields\": {},\n \"ws_event_type_field\": \"type\",\n \"ws_done_event_type\": \"<string>\",\n \"ws_result_extract_field\": \"<string>\",\n \"ws_stream_extract_field\": \"<string>\",\n \"request_timeout\": 180\n },\n \"environment\": \"staging\",\n \"auth_type\": \"none\",\n \"credential\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.example.com/api/v1/model")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"config\": {\n \"endpoint_url\": \"<string>\",\n \"request_field\": \"message\",\n \"response_field\": \"response\",\n \"session_field\": \"session_id\",\n \"session_response_field\": \"<string>\",\n \"session_response_header_field\": \"<string>\",\n \"session_id_numeric\": false,\n \"transport\": \"http\",\n \"http_stream_format\": \"sync\",\n \"chunk_combination\": \"concatenate\",\n \"chunk_skip_roles\": [\n \"<string>\"\n ],\n \"extra_http_headers\": {},\n \"request_body_template\": {},\n \"ws_auth_endpoint\": null,\n \"ws_url_endpoint\": null,\n \"ws_request_extra_fields\": {},\n \"ws_event_type_field\": \"type\",\n \"ws_done_event_type\": \"<string>\",\n \"ws_result_extract_field\": \"<string>\",\n \"ws_stream_extract_field\": \"<string>\",\n \"request_timeout\": 180\n },\n \"environment\": \"staging\",\n \"auth_type\": \"none\",\n \"credential\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/model")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"config\": {\n \"endpoint_url\": \"<string>\",\n \"request_field\": \"message\",\n \"response_field\": \"response\",\n \"session_field\": \"session_id\",\n \"session_response_field\": \"<string>\",\n \"session_response_header_field\": \"<string>\",\n \"session_id_numeric\": false,\n \"transport\": \"http\",\n \"http_stream_format\": \"sync\",\n \"chunk_combination\": \"concatenate\",\n \"chunk_skip_roles\": [\n \"<string>\"\n ],\n \"extra_http_headers\": {},\n \"request_body_template\": {},\n \"ws_auth_endpoint\": null,\n \"ws_url_endpoint\": null,\n \"ws_request_extra_fields\": {},\n \"ws_event_type_field\": \"type\",\n \"ws_done_event_type\": \"<string>\",\n \"ws_result_extract_field\": \"<string>\",\n \"ws_stream_extract_field\": \"<string>\",\n \"request_timeout\": 180\n },\n \"environment\": \"staging\",\n \"auth_type\": \"none\",\n \"credential\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model_id": "<string>",
"connected": true
}{
"detail": {
"error": "probe_failed",
"error_category": "unreachable",
"message": "Could not reach the target endpoint."
}
}Headers
Bearer token with API key
Body
Request body for POST /api/v1/model (register an agent target).
Display name for the target.
1 - 200Endpoint transport/parsing config (endpoint_url, response_field dot-path, transport, ...). Use request_timeout (<=180); ws_timeout is ignored here.
Show child attributes
Show child attributes
prod, staging, dev bearer='Authorization: Bearer ', api_key='x-api-key: ', basic=HTTP Basic with the credential as 'user:password'. No enterprise auth.
none, bearer, api_key, basic Required for bearer/api_key/basic; omit for none. Stored encrypted, never returned.
5Response
Successful Response
Response for POST /api/v1/model (201).
Lean by contract: the inventory id + the connection verdict only. Never echoes the config (it may hold a customer-embedded header secret), the credential, or any part of the target's reply.