Skip to main content
POST
Register an agent or an MCP server (atomic prove-then-persist)

Headers

Authorization
string | null

Bearer token with API key

Body

application/json

Request body for POST /api/v1/model (register an agent or an MCP server).

name
string
required

Display name for the target.

Required string length: 1 - 200
environment
enum<string>
default:staging
Available options:
prod,
staging,
dev
auth_type
enum<string>
default:none

bearer='Authorization: Bearer ', api_key='x-api-key: ', basic=HTTP Basic with the credential as 'user:password', oauth_client_credentials=an access token minted from the 'oauth' config below and re-minted before it expires. No enterprise auth. An MCP server takes none, bearer or api_key, which sends the credential in mcp.api_key_header.

Available options:
none,
bearer,
api_key,
basic,
oauth_client_credentials
credential
string | null

Required for bearer/api_key/basic, and the OAuth client secret for oauth_client_credentials; omit for none. Stored encrypted, never returned.

Minimum string length: 5
config
ApiAgentConfig · object | null

An agent's connection. Endpoint transport/parsing config (endpoint_url, response_field dot-path, transport, ...). Use request_timeout (<=180); ws_timeout is ignored here. Exactly one of 'config' and 'mcp'.

mcp
ApiMcpServerConfig · object | null

An MCP server instead of an agent: its endpoint and transport. Exactly one of 'config' and 'mcp'.

oauth
ApiOAuthClientCredentialsConfig · object | null

Required for auth_type='oauth_client_credentials', rejected otherwise. The token request that mints the bearer (token_url, client_id, and optionally scope/audience). Carries no secret — the client secret is 'credential'.

Response

Successful Response

Response for POST /api/v1/model (201).

The inventory id and the connection verdict only. It never echoes the config (it may hold a header secret), the credential, or any part of the target's reply.

model_id
string
required

Inventory model id — use directly as model_id in POST /api/v1/run.

connected
boolean
required

Always true: the target is persisted only after a successful probe.