nexus claude and nexus codex: model policy and sessions. The agents' model calls go through the agent gateway, where each is reserved, metered, checked against the organization's policy and attributed to the person and their session.
Deprecated: an alias of GET /v1/policies/agents/{agent}. Allowed and default models for each coding agent (provider/model ids), as the model policy resolves them. An agent without a Gateway route (antigravity, cursor) allows none, and its defaultModel is empty.
403The credential does not hold `org.read`: a service account or sandbox key (`role_required`), or a scoped module key (`module_key`). Also `not_in_team` when `x-nexus-team` names a team the caller is not in.application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
404`x-nexus-team` names a team that does not exist in this organization (`unknown_team`).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
`x-nexus-team` names a team that does not exist in this organization (`unknown_team`).
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Deprecated: an alias that writes the agent's model policy: allowedModels becomes its allow list and defaultModel its default (a deny list already set stays).
A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.
allowedModelsarray of string
defaultModelstring
400`agent` is not `claude`, `codex`, `antigravity` or `cursor`, or `allowedModels` (a non-empty list) or `defaultModel` is missing (`invalid_request`); `agent` runs only on the person's own plan (`route_unsupported`); or the rule it makes is not valid (`invalid_policy`).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
403The caller does not hold `policy.manage`: only owners and admins set the agent policy (`role_required`). A scoped module key gets `module_key`.application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
`agent` is not `claude`, `codex`, `antigravity` or `cursor`, or `allowedModels` (a non-empty list) or `defaultModel` is missing (`invalid_request`); `agent` runs only on the person's own plan (`route_unsupported`); or the rule it makes is not valid (`invalid_policy`).
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
403
model_not_allowed
The caller does not hold `policy.manage`: only owners and admins set the agent policy (`role_required`). A scoped module key gets `module_key`.
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
May the agent launch on this model (no model: what nexus/default resolves to)? The model policy's decision, the same the gateway makes on every call. An agent without a Gateway route (antigravity, cursor) is a 400 route_unsupported.
A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.
modelstring | null
reasonstring
allowedModelsarray of string
defaultModelstring
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
route_unsupported
An agent without a Gateway route (`antigravity`, `cursor`) is a 400 `route_unsupported`
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Auto for a coding agent's session before it starts: the model, who pays and why. A signed-in plan with room comes first; a paid model is only returned as ask_for_paid_fallback, for the client to confirm. A dry run: it opens no session and holds no money. A model the policy refuses is never returned.
The agent to start; auto on a stop of an agent auto request
versionstringrequired
The auto router version that chose
reasonstringrequired
Plan_at_floor, plan_below_floor, paid_at_floor, paid_below_floor or pinned; for stop: no_classifier, no_offer or pinned_unavailable
class"light" | "standard" | "heavy"
modelstring
Canonical model id
providerModelstring | null
The id to start the agent with
effortstring | null
payer"plan" | "local_key" | "gateway"
accountinteger | null
The plan account handle the request named
access"byok" | "nexus" | null
Who pays on Gateway
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.
modelstring
via"nexus" | "subscription" | "ori"
Nexus: every model call through Gateway's agent gateway; subscription: the person's own plan (Claude Code on their Claude login, Codex on their ChatGPT login), calls straight to the vendor, usage as the agent reported it; ori: sessions from before the agent gateway
access"subscription" | "byok" | "nexus"
Who pays its model calls, as Gateway classified the session when it opened: subscription (the person's own plan), byok (the organization's own provider key, through Gateway) or nexus (Nexus's own key, for Nexus's own organizations; Nexus credit no longer pays an agent). Absent for ori, for sessions from before, and when no key would pay (Gateway refuses those calls).
personstring
cwdstring
startedAtstring (date-time)
endedAtstring (date-time)
durationMsnumber
exitCodeinteger
signalstring
agentSessionIdstring
The agent's own conversation id: nexus claude --resume <id> or nexus codex resume <id> picks it up again.
Subscription sessions, once the agent has reported: its calls summed. estimatedCostUsd is the list-price estimate of the priced calls (Claude Code's own, the catalog's for Codex), never charged; unpricedCalls counts the calls with no estimate
callsinteger
inputTokensinteger
outputTokensinteger
cacheReadTokensinteger
cacheCreationTokensinteger
estimatedCostUsdnumber
unpricedCallsinteger
Calls with no estimate, because the agent stated no cost or the call names no model the catalog lists
modelsarray of string
401No credential (`missing_credential`), or a credential Gateway does not accept (`invalid_credential`).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
403The key does not hold `spend.read_own` (`role_required`: a service account, a sandbox, or an agent not granted it).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Open a session before launching an agent. Through the gateway (via nexus, the default) the model is checked on every call; via ori (sessions from before the agent gateway) it is checked here (403 if not allowed).
A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.
via"nexus" | "subscription" | "ori"
Nexus (default): the agent runs through the agent gateway; subscription: on the person's own Claude login, usage reported by Claude Code; ori: sessions from before the agent gateway
modelstring
The model the agent was started on, as the agent names it; omit for the agent's default
personstring
Who runs it, e.g. the OS user
max length 80
cwdstring
Working directory; only its basename is kept
teamstring
A team slug you are in; default: your default team
planstring
The plan tier of the person's own account, as the app read it on the device. claude: free, pro, max, team, enterprise or unknown; codex (ChatGPT): free, plus, pro, team, enterprise or unknown. Any other string is kept as unknown: a plan never refuses a session. Kept only where plan collection is on, and never shown on GET /v1/agents/sessions. Never send the raw string, an account id or an email.
A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.
modelstring
via"nexus" | "subscription" | "ori"
Nexus: every model call through Gateway's agent gateway; subscription: the person's own plan (Claude Code on their Claude login, Codex on their ChatGPT login), calls straight to the vendor, usage as the agent reported it; ori: sessions from before the agent gateway
access"subscription" | "byok" | "nexus"
Who pays its model calls, as Gateway classified the session when it opened: subscription (the person's own plan), byok (the organization's own provider key, through Gateway) or nexus (Nexus's own key, for Nexus's own organizations; Nexus credit no longer pays an agent). Absent for ori, for sessions from before, and when no key would pay (Gateway refuses those calls).
personstring
cwdstring
startedAtstring (date-time)
endedAtstring (date-time)
durationMsnumber
exitCodeinteger
signalstring
agentSessionIdstring
The agent's own conversation id: nexus claude --resume <id> or nexus codex resume <id> picks it up again.
Subscription sessions, once the agent has reported: its calls summed. estimatedCostUsd is the list-price estimate of the priced calls (Claude Code's own, the catalog's for Codex), never charged; unpricedCalls counts the calls with no estimate
callsinteger
inputTokensinteger
outputTokensinteger
cacheReadTokensinteger
cacheCreationTokensinteger
estimatedCostUsdnumber
unpricedCallsinteger
Calls with no estimate, because the agent stated no cost or the call names no model the catalog lists
modelsarray of string
400The body is not valid: `agent` not claude, codex, antigravity or cursor, `via` not nexus, subscription or ori, `model`, `person` or `cwd` not a string, `team` not a slug, or a bad `Idempotency-Key`; or `via` nexus or ori for an agent that runs only on the person's own plan (`route_unsupported`).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
401No credential (`missing_credential`), or a credential Gateway does not accept (`invalid_credential`).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
403The key does not hold `products.use` (`role_required`: a service account, a sandbox, or an agent not granted it), the team named is not the caller's (`not_in_team`), or the organization turned subscription sessions off (`subscriptions_disabled`).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
404The team named does not exist in this organization (`unknown_team`).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
409The `Idempotency-Key`'s first request still runs (`idempotency_in_progress`) or was interrupted (`idempotency_interrupted`). The request does not run again.application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
422The `Idempotency-Key` was used for a different request (`idempotency_key_reused`).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
The body is not valid: `agent` not claude, codex, antigravity or cursor, `via` not nexus, subscription or ori, `model`, `person` or `cwd` not a string, `team` not a slug, or a bad `Idempotency-Key`; or `via` nexus or ori for an agent that runs only on the person's own plan (`route_unsupported`).
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
The team named does not exist in this organization (`unknown_team`).
409
The `Idempotency-Key`'s first request still runs (`idempotency_in_progress`) or was interrupted (`idempotency_interrupted`). The request does not run again.
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
The `Idempotency-Key` was used for a different request (`idempotency_key_reused`).
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
One coding-agent session with what its metered calls cost: yours, or any of the organization's for an owner or admin. Anyone else gets 404, as for an unknown id.
A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.
modelstring
via"nexus" | "subscription" | "ori"
Nexus: every model call through Gateway's agent gateway; subscription: the person's own plan (Claude Code on their Claude login, Codex on their ChatGPT login), calls straight to the vendor, usage as the agent reported it; ori: sessions from before the agent gateway
access"subscription" | "byok" | "nexus"
Who pays its model calls, as Gateway classified the session when it opened: subscription (the person's own plan), byok (the organization's own provider key, through Gateway) or nexus (Nexus's own key, for Nexus's own organizations; Nexus credit no longer pays an agent). Absent for ori, for sessions from before, and when no key would pay (Gateway refuses those calls).
personstring
cwdstring
startedAtstring (date-time)
endedAtstring (date-time)
durationMsnumber
exitCodeinteger
signalstring
agentSessionIdstring
The agent's own conversation id: nexus claude --resume <id> or nexus codex resume <id> picks it up again.
Subscription sessions, once the agent has reported: its calls summed. estimatedCostUsd is the list-price estimate of the priced calls (Claude Code's own, the catalog's for Codex), never charged; unpricedCalls counts the calls with no estimate
callsinteger
inputTokensinteger
outputTokensinteger
cacheReadTokensinteger
cacheCreationTokensinteger
estimatedCostUsdnumber
unpricedCallsinteger
Calls with no estimate, because the agent stated no cost or the call names no model the catalog lists
modelsarray of string
spendobjectrequired
What the calls metered to this session cost (refused calls left out); zero without calls.
usdnumberrequired
min 0
callsintegerrequired
min 0
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Every coding-agent session of the organization that matches the filters, as CSV (owners and admins). Nexus Gateway keeps an organization's newest 500 sessions, so an older one is in no file. At most 100,000 rows a file: past that the file stops, and its manifest says complete: false and gives nextCursor. Each export is an audit event (observability.exported) with the file's manifest, never its rows. An organization runs at most 60 exports an hour: the 61st is a 429 export_rate_limited, whose Retry-After is the seconds until the hour frees one (the RateLimit-* headers stay the per-minute limit's). A bad filter is a 400 before any row.
A comma-separated set of running, succeeded, failed and interrupted; default all four
cursorquery · string
A cut file's manifest.nextCursor: the next file of the same query. A manifest's watermark also works: it starts the same series again. It is bound to the organization, the caller and the query: anywhere else it is a 400 invalid_cursor
Responses
200CSV with a header row: one column per field of `AgentSessionRow`, in its order.text/csv
string
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
429
export_rate_limited
The 61st is a 429 `export_rate_limited`, whose `Retry-After` is the seconds until the hour frees one (the `RateLimit-*` headers stay the per-minute limit's)
Every coding-agent session of the organization that matches the filters, as JSON Lines (owners and admins). Nexus Gateway keeps an organization's newest 500 sessions, so an older one is in no file. At most 100,000 rows a file: past that the file stops, and its manifest says complete: false and gives nextCursor. Each export is an audit event (observability.exported) with the file's manifest, never its rows. An organization runs at most 60 exports an hour: the 61st is a 429 export_rate_limited, whose Retry-After is the seconds until the hour frees one (the RateLimit-* headers stay the per-minute limit's). A bad filter is a 400 before any row.
A comma-separated set of running, succeeded, failed and interrupted; default all four
cursorquery · string
A cut file's manifest.nextCursor: the next file of the same query. A manifest's watermark also works: it starts the same series again. It is bound to the organization, the caller and the query: anywhere else it is a 400 invalid_cursor
Responses
200JSON Lines: one `AgentSessionRow` per line, then one line `{"manifest": ExportManifest}`.application/jsonl
string
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
429
export_rate_limited
The 61st is a 429 `export_rate_limited`, whose `Retry-After` is the seconds until the hour frees one (the `RateLimit-*` headers stay the per-minute limit's)
A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.
modelstring
via"nexus" | "subscription" | "ori"
Nexus: every model call through Gateway's agent gateway; subscription: the person's own plan (Claude Code on their Claude login, Codex on their ChatGPT login), calls straight to the vendor, usage as the agent reported it; ori: sessions from before the agent gateway
access"subscription" | "byok" | "nexus"
Who pays its model calls, as Gateway classified the session when it opened: subscription (the person's own plan), byok (the organization's own provider key, through Gateway) or nexus (Nexus's own key, for Nexus's own organizations; Nexus credit no longer pays an agent). Absent for ori, for sessions from before, and when no key would pay (Gateway refuses those calls).
personstring
cwdstring
startedAtstring (date-time)
endedAtstring (date-time)
durationMsnumber
exitCodeinteger
signalstring
agentSessionIdstring
The agent's own conversation id: nexus claude --resume <id> or nexus codex resume <id> picks it up again.
Subscription sessions, once the agent has reported: its calls summed. estimatedCostUsd is the list-price estimate of the priced calls (Claude Code's own, the catalog's for Codex), never charged; unpricedCalls counts the calls with no estimate
callsinteger
inputTokensinteger
outputTokensinteger
cacheReadTokensinteger
cacheCreationTokensinteger
estimatedCostUsdnumber
unpricedCallsinteger
Calls with no estimate, because the agent stated no cost or the call names no model the catalog lists
modelsarray of string
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.
modelstring
via"nexus" | "subscription" | "ori"
Nexus: every model call through Gateway's agent gateway; subscription: the person's own plan (Claude Code on their Claude login, Codex on their ChatGPT login), calls straight to the vendor, usage as the agent reported it; ori: sessions from before the agent gateway
access"subscription" | "byok" | "nexus"
Who pays its model calls, as Gateway classified the session when it opened: subscription (the person's own plan), byok (the organization's own provider key, through Gateway) or nexus (Nexus's own key, for Nexus's own organizations; Nexus credit no longer pays an agent). Absent for ori, for sessions from before, and when no key would pay (Gateway refuses those calls).
personstring
cwdstring
startedAtstring (date-time)
endedAtstring (date-time)
durationMsnumber
exitCodeinteger
signalstring
agentSessionIdstring
The agent's own conversation id: nexus claude --resume <id> or nexus codex resume <id> picks it up again.
Subscription sessions, once the agent has reported: its calls summed. estimatedCostUsd is the list-price estimate of the priced calls (Claude Code's own, the catalog's for Codex), never charged; unpricedCalls counts the calls with no estimate
callsinteger
inputTokensinteger
outputTokensinteger
cacheReadTokensinteger
cacheCreationTokensinteger
estimatedCostUsdnumber
unpricedCallsinteger
Calls with no estimate, because the agent stated no cost or the call names no model the catalog lists
modelsarray of string
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Usage from a subscription session as an OpenTelemetry logs export (OTLP/HTTP JSON). Cursor sessions return 409 usage_unsupported. A record whose event.name (else its body) is api_request or claude_code.api_request counts as one model call. A request_id seen among the session's last 512 does not count again. Codex's codex.sse_event for response.completed counts too, once per conversation.id and event.timestamp. Other records are dropped unread. A body without resourceLogs is a 400.
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Request body · application/json
resourceLogsarray of object
Responses
200OK: an OTLP ExportLogsServiceResponse, empty, or with partialSuccess counting the entries that were not log objectsapplication/json
partialSuccessobject
rejectedLogRecordsinteger
errorMessagestring
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
409
usage_unsupported
Cursor sessions return 409 `usage_unsupported`
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Routes for coding agents with a released Nexus launcher: for each agent, the route it takes when you name none (from: your preference, the default, or the organization when it turned subscriptions off), each route with who pays (the organization's own key, Nexus, or your plan), whether it can run, and the commands that install and sign in the agent.
Who pays on this route: byok (the organization's own key), nexus (a key Nexus pays for) or subscription (the person's plan); null on gateway when no key would pay
availablebooleanrequired
Whether the route can run now; reason says why not
reasonstring
Why it cannot, and the command that fixes it
providerstring
Gateway: the provider Gateway calls
planstring
Subscription: the plan it runs on
vendorstring
loginstring
Subscription: how to sign the agent in to the plan, once, on the person's machine
loginStatusstring
Subscription: how to check that sign-in
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Choose the route each of your coding agents takes when you name none (nexus agents use), in every client: gateway or subscription; null forgets it (the default: subscription, or gateway when the organization turned subscription mode off). Yours in every organization, not audited (each session records its route). 403 subscriptions_disabled for a subscription the organization turned off; 400 route_unsupported for the gateway route of an agent that runs only on the person's own plan; 400 for a key-only organization key (a route belongs to a person).
Who pays on this route: byok (the organization's own key), nexus (a key Nexus pays for) or subscription (the person's plan); null on gateway when no key would pay
availablebooleanrequired
Whether the route can run now; reason says why not
reasonstring
Why it cannot, and the command that fixes it
providerstring
Gateway: the provider Gateway calls
planstring
Subscription: the plan it runs on
vendorstring
loginstring
Subscription: how to sign the agent in to the plan, once, on the person's machine
loginStatusstring
Subscription: how to check that sign-in
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
route_unsupported
403 `subscriptions_disabled` for a subscription the organization turned off; 400 `route_unsupported` for the gateway route of an agent that runs only on the person's own plan; 400 for a key-only organization key (a route belongs to a person)
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
403
subscriptions_disabled
403 `subscriptions_disabled` for a subscription the organization turned off; 400 `route_unsupported` for the gateway route of an agent that runs only on the person's own plan; 400 for a key-only organization key (a route belongs to a person)
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
The Nexus assistant's conversations of yours, newest change first, without their messages. limit is 1 to 100 (30 when absent); after is the last page's next; archived=true includes archived ones; externalKey answers only the live conversation under that key, if any. Your own conversations only: the organization and the person come from the credential, never from the request, and another person's is a 404. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it. Off, every call is a 404 assistant_conversations_off (NEXUS_ASSISTANT_CONVERSATIONS).
Only the live conversation under this key, such as slack:T1:C1:1712.34
Responses
200OKapplication/json
conversationsarray of AssistantConversationrequired
idstringrequired
titlestringrequired
externalKeystring | nullrequired
What the conversation continues, when its creator named it
messageCountintegerrequired
createdAtstringrequired
updatedAtstringrequired
archivedAtstring | nullrequired
nextstring | nullrequired
The after of the next page; null on the last
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
assistant_conversations_off
Off, every call is a 404 `assistant_conversations_off` (NEXUS_ASSISTANT_CONVERSATIONS)
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Starts a conversation, or returns your live one under the same externalKey (200, created: false). 201 for a new one. A person holds at most 1000 live conversations (413 assistant_conversations_full). Your own conversations only: the organization and the person come from the credential, never from the request, and another person's is a 404. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it. Off, every call is a 404 assistant_conversations_off (NEXUS_ASSISTANT_CONVERSATIONS).
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Request body · application/json
titlestring
max length 200
externalKeystring
min length 1 · max length 256
Responses
200The live conversation under the same externalKeyapplication/json
idstringrequired
titlestringrequired
externalKeystring | nullrequired
What the conversation continues, when its creator named it
messageCountintegerrequired
createdAtstringrequired
updatedAtstringrequired
archivedAtstring | nullrequired
createdbooleanrequired
False when the externalKey already named a live conversation
201Createdapplication/json
idstringrequired
titlestringrequired
externalKeystring | nullrequired
What the conversation continues, when its creator named it
messageCountintegerrequired
createdAtstringrequired
updatedAtstringrequired
archivedAtstring | nullrequired
createdbooleanrequired
False when the externalKey already named a live conversation
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
assistant_conversations_off
Off, every call is a 404 `assistant_conversations_off` (NEXUS_ASSISTANT_CONVERSATIONS)
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
One conversation and a page of its messages, in order. after is the number of the last message you read (the first page when absent); limit is 1 to 500 (100 when absent); nextAfter is the after of the next page. Your own conversations only: the organization and the person come from the credential, never from the request, and another person's is a 404. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it. Off, every call is a 404 assistant_conversations_off (NEXUS_ASSISTANT_CONVERSATIONS).
A conversation's id, as the list or the create answered it (404 assistant_conversation_not_found)
afterquery · integer
limitquery · integer
Responses
200OKapplication/json
idstringrequired
titlestringrequired
externalKeystring | nullrequired
What the conversation continues, when its creator named it
messageCountintegerrequired
createdAtstringrequired
updatedAtstringrequired
archivedAtstring | nullrequired
messagesarray of AssistantMessagerequired
seqintegerrequired
min 0
role"user" | "assistant" | "tool"required
contentanyrequired
Any JSON but null, as it was written
createdAtstringrequired
nextAfterinteger | nullrequired
The after of the next page of messages; null on the last
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
404
assistant_conversations_off
Off, every call is a 404 `assistant_conversations_off` (NEXUS_ASSISTANT_CONVERSATIONS)
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Renames a conversation: a title of at most 200 characters. Your own conversations only: the organization and the person come from the credential, never from the request, and another person's is a 404. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it. Off, every call is a 404 assistant_conversations_off (NEXUS_ASSISTANT_CONVERSATIONS).
A conversation's id, as the list or the create answered it (404 assistant_conversation_not_found)
Idempotency-Keyheader · string
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Request body · application/json
titlestringrequired
max length 200
Responses
200OKapplication/json
idstringrequired
titlestringrequired
externalKeystring | nullrequired
What the conversation continues, when its creator named it
messageCountintegerrequired
createdAtstringrequired
updatedAtstringrequired
archivedAtstring | nullrequired
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
404
assistant_conversations_off
Off, every call is a 404 `assistant_conversations_off` (NEXUS_ASSISTANT_CONVERSATIONS)
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Appends messages, numbered from 0, each one after the one before. Idempotent by seq: a message the conversation already holds with the same role and content changes nothing, so a retried batch is safe; other content at a held seq is a 409 assistant_seq_conflict, a seq past the next one a 409 assistant_seq_gap (nextSeq in the error), and an archived conversation takes no new message (409 assistant_conversation_archived). 1 to 100 messages of at most 256 KiB each; a conversation holds at most 5000 (413). Content is stored readable, not sealed. Your own conversations only: the organization and the person come from the credential, never from the request, and another person's is a 404. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it. Off, every call is a 404 assistant_conversations_off (NEXUS_ASSISTANT_CONVERSATIONS).
A conversation's id, as the list or the create answered it (404 assistant_conversation_not_found)
Idempotency-Keyheader · string
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Request body · application/json
messagesarray of NewAssistantMessagerequired
at most 100 items
seqintegerrequired
min 0
role"user" | "assistant" | "tool"required
contentanyrequired
Any JSON but null; at most 256 KiB
Responses
200OKapplication/json
writtenintegerrequired
How many messages the append wrote; the ones already held do not count
nextSeqintegerrequired
The number the next message takes
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
404
assistant_conversations_off
Off, every call is a 404 `assistant_conversations_off` (NEXUS_ASSISTANT_CONVERSATIONS)
409
seq
A message the conversation already holds with the same role and content changes nothing, so a retried batch is safe; other content at a held `seq` is a 409 assistant_seq_conflict, a `seq` past the next one a 409 assistant_seq_gap (`nextSeq` in the error), and an archived conversation takes no new message (409 assistant_conversation_archived)
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Archives a conversation: it leaves the default list, keeps its messages, and takes no new ones. Archiving again changes nothing. Nothing is deleted; account deletion and a member's removal delete conversations. Your own conversations only: the organization and the person come from the credential, never from the request, and another person's is a 404. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it. Off, every call is a 404 assistant_conversations_off (NEXUS_ASSISTANT_CONVERSATIONS).
A conversation's id, as the list or the create answered it (404 assistant_conversation_not_found)
Idempotency-Keyheader · string
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Responses
200OKapplication/json
idstringrequired
titlestringrequired
externalKeystring | nullrequired
What the conversation continues, when its creator named it
messageCountintegerrequired
createdAtstringrequired
updatedAtstringrequired
archivedAtstring | nullrequired
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
404
assistant_conversations_off
Off, every call is a 404 `assistant_conversations_off` (NEXUS_ASSISTANT_CONVERSATIONS)
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Delete every row of your agent memory in this organization: forget, unlink and uninstall. Audited as agent.memory_cleared when a row went. Your own rows only: the organization and the person come from the credential, never from the request. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it.
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Responses
200OKapplication/json
deletedintegerrequired
How many rows went
min 0
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
One page of your agent memory's keys in a collection, in byte order, with their versions and no values. limit is 1 to 1000 (100 when absent; 400 agent_memory_limit_invalid); after is the last key of the page before (next). Your own rows only: the organization and the person come from the credential, never from the request. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it.
1 to 64 characters: a lowercase letter, then lowercase letters, digits, _ or - (400 agent_memory_collection_invalid)
afterquery · string
The next of the page before
limitquery · integer
Responses
200OKapplication/json
collectionstringrequired
keysarray of AgentMemoryEntryrequired
keystringrequired
versionintegerrequired
What a later write names in If-Match. It never repeats, also after a delete.
min 1
updatedAtstring (date-time)required
nextstring | nullrequired
The after of the next page; null on the last
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
One row of your agent memory: the value as the agent sealed it, and its version (also the ETag). 404 agent_memory_not_found when there is none. Your own rows only: the organization and the person come from the credential, never from the request. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it.
1 to 64 characters: a lowercase letter, then lowercase letters, digits, _ or - (400 agent_memory_collection_invalid)
keypath · stringrequired
1 to 256 characters of A-Z, a-z, 0-9, ., _, ~ and -, and not . or .. (400 agent_memory_key_invalid). Encode any other key, as base64url.
Responses
200OKapplication/json
collectionstringrequired
keystringrequired
valuestringrequired
The agent's sealed text, as it wrote it
versionintegerrequired
What a later write names in If-Match. It never repeats, also after a delete.
min 1
updatedAtstring (date-time)required
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Write one row of your agent memory, if it is as you read it: If-Match: <version> replaces the row at that version, and If-None-Match: * creates it. With neither, a 428 agent_memory_precondition_required. A write that loses a race, or creates a row that exists, is a 409 agent_memory_version_conflict, and nothing changes. The value is the agent's sealed text, 1 byte to 256 KiB (413 agent_memory_value_too_large); Gateway never opens it. You hold at most 1000 rows and 8 MiB in an organization (413 agent_memory_full). Versions never repeat, also after a delete. Audited as agent.memory_written, without the value. Your own rows only: the organization and the person come from the credential, never from the request. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it.
1 to 64 characters: a lowercase letter, then lowercase letters, digits, _ or - (400 agent_memory_collection_invalid)
keypath · stringrequired
1 to 256 characters of A-Z, a-z, 0-9, ., _, ~ and -, and not . or .. (400 agent_memory_key_invalid). Encode any other key, as base64url.
If-Matchheader · string
The version the write read ("12" or 12, the row's ETag). The write happens only while the row is at it.
If-None-Matchheader · "*"
*: create the row, only when none exists.
Idempotency-Keyheader · string
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Request body · application/json
valuestringrequired
The agent's sealed text, at most 256 KiB
min length 1
Responses
200Writtenapplication/json
collectionstringrequired
keystringrequired
versionintegerrequired
What a later write names in If-Match. It never repeats, also after a delete.
min 1
createdbooleanrequired
True when the write made the row (If-None-Match: *)
updatedAtstring (date-time)required
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Delete one row of your agent memory; with If-Match, only at that version (409 agent_memory_version_conflict otherwise). Without it, a missing row is a 404 agent_memory_not_found. Audited as agent.memory_deleted. Your own rows only: the organization and the person come from the credential, never from the request. The person, or their own agent link that holds agents.memory (on the person's opt-in); any other caller answers 403, and no operator grant names it.
1 to 64 characters: a lowercase letter, then lowercase letters, digits, _ or - (400 agent_memory_collection_invalid)
keypath · stringrequired
1 to 256 characters of A-Z, a-z, 0-9, ., _, ~ and -, and not . or .. (400 agent_memory_key_invalid). Encode any other key, as base64url.
If-Matchheader · string
The version the write read ("12" or 12, the row's ETag). The write happens only while the row is at it.
Idempotency-Keyheader · string
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Responses
200OKapplication/json
collectionstringrequired
keystringrequired
versionintegerrequired
The version the row had
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
One page of the agents service's keys in a collection, in byte order, with their versions and no values. limit is 1 to 1000 (100 when absent; 400 agent_memory_limit_invalid); after is the last key of the page before (next). The agents service only, with its platform secret in x-nexus-agents-secret: no person, key, agent link or operator of an organization reaches these rows, and every other route refuses the secret with a 403. Gateway never opens a value, and writes no audit event: the rows belong to no organization.
1 to 64 characters: a lowercase letter, then lowercase letters, digits, _ or - (400 agent_memory_collection_invalid)
afterquery · string
The next of the page before
limitquery · integer
Responses
200OKapplication/json
collectionstringrequired
keysarray of AgentMemoryEntryrequired
keystringrequired
versionintegerrequired
What a later write names in If-Match. It never repeats, also after a delete.
min 1
updatedAtstring (date-time)required
nextstring | nullrequired
The after of the next page; null on the last
400The platform secret came with another credential, or twice (`credential_conflict`); or a bad collection, key, limit or preconditionapplication/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
401No credential, or a wrong platform secret (`missing_credential`, `invalid_credential`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
403Any other credential: a person's token, an agent link, a service account key, a module key or Nexus UI's secret (`agents_secret_refused`, `role_required`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
503The Gateway holds no platform secret (`not_configured`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
The platform secret came with another credential, or twice (`credential_conflict`); or a bad collection, key, limit or precondition
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
429
rate_limit_error
Too many requests from this key in a minute
503
The Gateway holds no platform secret (`not_configured`)
One row of the agents service's own state (its links, journal and approvals): the value as the agent sealed it, and its version (also the ETag). 404 agent_memory_not_found when there is none. The agents service only, with its platform secret in x-nexus-agents-secret: no person, key, agent link or operator of an organization reaches these rows, and every other route refuses the secret with a 403. Gateway never opens a value, and writes no audit event: the rows belong to no organization.
1 to 64 characters: a lowercase letter, then lowercase letters, digits, _ or - (400 agent_memory_collection_invalid)
keypath · stringrequired
1 to 256 characters of A-Z, a-z, 0-9, ., _, ~ and -, and not . or .. (400 agent_memory_key_invalid). Encode any other key, as base64url.
Responses
200OKapplication/json
collectionstringrequired
keystringrequired
valuestringrequired
The agent's sealed text, as it wrote it
versionintegerrequired
What a later write names in If-Match. It never repeats, also after a delete.
min 1
updatedAtstring (date-time)required
400The platform secret came with another credential, or twice (`credential_conflict`); or a bad collection, key, limit or preconditionapplication/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
401No credential, or a wrong platform secret (`missing_credential`, `invalid_credential`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
403Any other credential: a person's token, an agent link, a service account key, a module key or Nexus UI's secret (`agents_secret_refused`, `role_required`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
503The Gateway holds no platform secret (`not_configured`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
The platform secret came with another credential, or twice (`credential_conflict`); or a bad collection, key, limit or precondition
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
429
rate_limit_error
Too many requests from this key in a minute
503
The Gateway holds no platform secret (`not_configured`)
Write one row of the agents service's own state, if it is as the agent read it: If-Match: <version> replaces the row at that version, and If-None-Match: * creates it. With neither, a 428 agent_memory_precondition_required. A write that loses a race, or creates a row that exists, is a 409 agent_memory_version_conflict, and nothing changes. The value is the agent's sealed text, 1 byte to 256 KiB (413 agent_memory_value_too_large). A collection holds at most 100000 rows (413 agent_state_full). Versions never repeat, also after a delete. The agents service only, with its platform secret in x-nexus-agents-secret: no person, key, agent link or operator of an organization reaches these rows, and every other route refuses the secret with a 403. Gateway never opens a value, and writes no audit event: the rows belong to no organization.
1 to 64 characters: a lowercase letter, then lowercase letters, digits, _ or - (400 agent_memory_collection_invalid)
keypath · stringrequired
1 to 256 characters of A-Z, a-z, 0-9, ., _, ~ and -, and not . or .. (400 agent_memory_key_invalid). Encode any other key, as base64url.
If-Matchheader · string
The version the write read ("12" or 12, the row's ETag). The write happens only while the row is at it.
If-None-Matchheader · "*"
*: create the row, only when none exists.
Idempotency-Keyheader · string
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Request body · application/json
valuestringrequired
The agent's sealed text, at most 256 KiB
min length 1
Responses
200Writtenapplication/json
collectionstringrequired
keystringrequired
versionintegerrequired
What a later write names in If-Match. It never repeats, also after a delete.
min 1
createdbooleanrequired
True when the write made the row (If-None-Match: *)
updatedAtstring (date-time)required
400The platform secret came with another credential, or twice (`credential_conflict`); or a bad collection, key, limit or preconditionapplication/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
401No credential, or a wrong platform secret (`missing_credential`, `invalid_credential`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
403Any other credential: a person's token, an agent link, a service account key, a module key or Nexus UI's secret (`agents_secret_refused`, `role_required`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
503The Gateway holds no platform secret (`not_configured`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
The platform secret came with another credential, or twice (`credential_conflict`); or a bad collection, key, limit or precondition
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
429
rate_limit_error
Too many requests from this key in a minute
503
The Gateway holds no platform secret (`not_configured`)
Delete one row of the agents service's own state at the version If-Match: <version> names (409 agent_memory_version_conflict when the row is at another version, or gone). Without If-Match, a 428 agent_memory_precondition_required: several processes share these rows, so a delete names what it read. The agents service only, with its platform secret in x-nexus-agents-secret: no person, key, agent link or operator of an organization reaches these rows, and every other route refuses the secret with a 403. Gateway never opens a value, and writes no audit event: the rows belong to no organization.
1 to 64 characters: a lowercase letter, then lowercase letters, digits, _ or - (400 agent_memory_collection_invalid)
keypath · stringrequired
1 to 256 characters of A-Z, a-z, 0-9, ., _, ~ and -, and not . or .. (400 agent_memory_key_invalid). Encode any other key, as base64url.
If-Matchheader · string
The version the write read ("12" or 12, the row's ETag). The write happens only while the row is at it.
Idempotency-Keyheader · string
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Responses
200OKapplication/json
collectionstringrequired
keystringrequired
versionintegerrequired
The version the row had
400The platform secret came with another credential, or twice (`credential_conflict`); or a bad collection, key, limit or preconditionapplication/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
401No credential, or a wrong platform secret (`missing_credential`, `invalid_credential`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
403Any other credential: a person's token, an agent link, a service account key, a module key or Nexus UI's secret (`agents_secret_refused`, `role_required`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
503The Gateway holds no platform secret (`not_configured`)application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
The platform secret came with another credential, or twice (`credential_conflict`); or a bad collection, key, limit or precondition
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
429
rate_limit_error
Too many requests from this key in a minute
503
The Gateway holds no platform secret (`not_configured`)
One agent profile you see. The person, or their own agent link that holds agents.profiles (on the person's opt-in); no operator grant names it. Another person's personal agent is a 404 agent_profile_not_found. 503 not_configured when Gateway has no database.
The display name: plain text without <, > or @. Not Nexus nor an admin's name (400 agent_profile_name_reserved), except that a personal agent may keep its own name, Nexus
min length 1 · max length 40
avatarstring | null
An emoji, a :shortcode: or an https image URL with no credentials (400 agent_profile_avatar_invalid)
A tone preset; custom leaves the tone to the instructions. null: the agent's own
greetingstring | null
One short line the agent says first in a conversation; control characters stripped (400 agent_profile_greeting_invalid)
max length 200
languagestring | null
A BCP-47 tag the agent answers in by default, such as es or pt-BR (400 agent_profile_language_invalid)
max length 35 · pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$
labelsarray of string
Short labels that sort, route and filter agents; repeats are dropped
at most 8 items
instructionsstring
The owner's guidance, added to the agent's system prompt below its own rules
max length 4000
toolsarray of string | null
Null: every tool the agent's link holds. A list: only these connectors or connector.operation ids; an empty list offers none
at most 64 items
proactivity"always" | "ask_first" | "never"
W4.3's levels: whether the agent may start something the person did not ask for
lengthinteger | null
How much the agent says: 0 brief to 100 detailed. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
formalityinteger | null
How formal the agent is: 0 casual to 100 formal. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
humourinteger | null
How much humour the agent uses: 0 none to 100 some. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
emojiboolean | null
Emoji in the agent's answers. null: off
shortTextsboolean | null
Shorter answers by text and push than in the app. null: on
idstringrequired
owner"person" | "team"required
Person: a personal agent. team: a company agent, on that team's budget and policy
ownerIdstringrequired
The person's user id, or the team's id
teamSlugstring
A company agent's team slug, while the team exists
createdBystringrequired
The user id of the person who created it
createdAtstring (date-time)required
updatedAtstring (date-time)required
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Replace an agent profile's fields; its owner never changes. The name is 1 to 40 characters of plain text, never Nexus nor a name that passes for an admin, except that a personal agent may keep its own name, Nexus (agent_profile_name_invalid, agent_profile_name_reserved). At most 8 labels (agent_profile_label_invalid), instructions of at most 4000 characters (agent_profile_instructions_invalid), and at most 64 tools, each a connector Gateway has or one of its operations (agent_profile_tool_invalid, agent_profile_tool_unknown). The tools narrow what the agent offers and never widen it: Policy still decides each call. Audited as agent.profile_updated, with the labels and never the instructions. Only a person, never an agent link: your own personal agent, and as an owner or admin a company agent (403 agent_profile_admin_required otherwise). No operator grant names it. 503 not_configured when Gateway has no database.
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Request body · application/json
namestring
The display name: plain text without <, > or @. Not Nexus nor an admin's name (400 agent_profile_name_reserved), except that a personal agent may keep its own name, Nexus
min length 1 · max length 40
avatarstring | null
An emoji, a :shortcode: or an https image URL with no credentials (400 agent_profile_avatar_invalid)
A tone preset; custom leaves the tone to the instructions. null: the agent's own
greetingstring | null
One short line the agent says first in a conversation; control characters stripped (400 agent_profile_greeting_invalid)
max length 200
languagestring | null
A BCP-47 tag the agent answers in by default, such as es or pt-BR (400 agent_profile_language_invalid)
max length 35 · pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$
labelsarray of string
Short labels that sort, route and filter agents; repeats are dropped
at most 8 items
instructionsstring
The owner's guidance, added to the agent's system prompt below its own rules
max length 4000
toolsarray of string | null
Null: every tool the agent's link holds. A list: only these connectors or connector.operation ids; an empty list offers none
at most 64 items
proactivity"always" | "ask_first" | "never"
W4.3's levels: whether the agent may start something the person did not ask for
lengthinteger | null
How much the agent says: 0 brief to 100 detailed. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
formalityinteger | null
How formal the agent is: 0 casual to 100 formal. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
humourinteger | null
How much humour the agent uses: 0 none to 100 some. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
emojiboolean | null
Emoji in the agent's answers. null: off
shortTextsboolean | null
Shorter answers by text and push than in the app. null: on
Responses
200OKapplication/json
namestring
The display name: plain text without <, > or @. Not Nexus nor an admin's name (400 agent_profile_name_reserved), except that a personal agent may keep its own name, Nexus
min length 1 · max length 40
avatarstring | null
An emoji, a :shortcode: or an https image URL with no credentials (400 agent_profile_avatar_invalid)
A tone preset; custom leaves the tone to the instructions. null: the agent's own
greetingstring | null
One short line the agent says first in a conversation; control characters stripped (400 agent_profile_greeting_invalid)
max length 200
languagestring | null
A BCP-47 tag the agent answers in by default, such as es or pt-BR (400 agent_profile_language_invalid)
max length 35 · pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$
labelsarray of string
Short labels that sort, route and filter agents; repeats are dropped
at most 8 items
instructionsstring
The owner's guidance, added to the agent's system prompt below its own rules
max length 4000
toolsarray of string | null
Null: every tool the agent's link holds. A list: only these connectors or connector.operation ids; an empty list offers none
at most 64 items
proactivity"always" | "ask_first" | "never"
W4.3's levels: whether the agent may start something the person did not ask for
lengthinteger | null
How much the agent says: 0 brief to 100 detailed. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
formalityinteger | null
How formal the agent is: 0 casual to 100 formal. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
humourinteger | null
How much humour the agent uses: 0 none to 100 some. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
emojiboolean | null
Emoji in the agent's answers. null: off
shortTextsboolean | null
Shorter answers by text and push than in the app. null: on
idstringrequired
owner"person" | "team"required
Person: a personal agent. team: a company agent, on that team's budget and policy
ownerIdstringrequired
The person's user id, or the team's id
teamSlugstring
A company agent's team slug, while the team exists
createdBystringrequired
The user id of the person who created it
createdAtstring (date-time)required
updatedAtstring (date-time)required
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Delete an agent profile. Audited as agent.profile_deleted. Only a person, never an agent link: your own personal agent, and as an owner or admin a company agent (403 agent_profile_admin_required otherwise). No operator grant names it. 503 not_configured when Gateway has no database.
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Responses
204Deleted
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
404
not_found
Nothing matches the path in your organization
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Your agents' profiles, by name: your own personal agent and every company agent in the organization. The person, or their own agent link that holds agents.profiles (on the person's opt-in); no operator grant names it. Another person's personal agent is a 404 agent_profile_not_found. 503 not_configured when Gateway has no database.
The display name: plain text without <, > or @. Not Nexus nor an admin's name (400 agent_profile_name_reserved), except that a personal agent may keep its own name, Nexus
min length 1 · max length 40
avatarstring | null
An emoji, a :shortcode: or an https image URL with no credentials (400 agent_profile_avatar_invalid)
A tone preset; custom leaves the tone to the instructions. null: the agent's own
greetingstring | null
One short line the agent says first in a conversation; control characters stripped (400 agent_profile_greeting_invalid)
max length 200
languagestring | null
A BCP-47 tag the agent answers in by default, such as es or pt-BR (400 agent_profile_language_invalid)
max length 35 · pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$
labelsarray of string
Short labels that sort, route and filter agents; repeats are dropped
at most 8 items
instructionsstring
The owner's guidance, added to the agent's system prompt below its own rules
max length 4000
toolsarray of string | null
Null: every tool the agent's link holds. A list: only these connectors or connector.operation ids; an empty list offers none
at most 64 items
proactivity"always" | "ask_first" | "never"
W4.3's levels: whether the agent may start something the person did not ask for
lengthinteger | null
How much the agent says: 0 brief to 100 detailed. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
formalityinteger | null
How formal the agent is: 0 casual to 100 formal. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
humourinteger | null
How much humour the agent uses: 0 none to 100 some. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
emojiboolean | null
Emoji in the agent's answers. null: off
shortTextsboolean | null
Shorter answers by text and push than in the app. null: on
idstringrequired
owner"person" | "team"required
Person: a personal agent. team: a company agent, on that team's budget and policy
ownerIdstringrequired
The person's user id, or the team's id
teamSlugstring
A company agent's team slug, while the team exists
createdBystringrequired
The user id of the person who created it
createdAtstring (date-time)required
updatedAtstring (date-time)required
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
Create an agent profile: without team, your personal agent; with team (a slug or id), a company agent that answers on that team's budget and policy (404 unknown_team). One profile per owner (409 agent_profile_exists). The name is 1 to 40 characters of plain text, never Nexus nor a name that passes for an admin, except that a personal agent may keep its own name, Nexus (agent_profile_name_invalid, agent_profile_name_reserved). At most 8 labels (agent_profile_label_invalid), instructions of at most 4000 characters (agent_profile_instructions_invalid), and at most 64 tools, each a connector Gateway has or one of its operations (agent_profile_tool_invalid, agent_profile_tool_unknown). The tools narrow what the agent offers and never widen it: Policy still decides each call. Audited as agent.profile_created, with the labels and never the instructions. Only a person, never an agent link: your own personal agent, and as an owner or admin a company agent (403 agent_profile_admin_required otherwise). No operator grant names it. 503 not_configured when Gateway has no database.
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Request body · application/json
namestring
The display name: plain text without <, > or @. Not Nexus nor an admin's name (400 agent_profile_name_reserved), except that a personal agent may keep its own name, Nexus
min length 1 · max length 40
avatarstring | null
An emoji, a :shortcode: or an https image URL with no credentials (400 agent_profile_avatar_invalid)
A tone preset; custom leaves the tone to the instructions. null: the agent's own
greetingstring | null
One short line the agent says first in a conversation; control characters stripped (400 agent_profile_greeting_invalid)
max length 200
languagestring | null
A BCP-47 tag the agent answers in by default, such as es or pt-BR (400 agent_profile_language_invalid)
max length 35 · pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$
labelsarray of string
Short labels that sort, route and filter agents; repeats are dropped
at most 8 items
instructionsstring
The owner's guidance, added to the agent's system prompt below its own rules
max length 4000
toolsarray of string | null
Null: every tool the agent's link holds. A list: only these connectors or connector.operation ids; an empty list offers none
at most 64 items
proactivity"always" | "ask_first" | "never"
W4.3's levels: whether the agent may start something the person did not ask for
lengthinteger | null
How much the agent says: 0 brief to 100 detailed. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
formalityinteger | null
How formal the agent is: 0 casual to 100 formal. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
humourinteger | null
How much humour the agent uses: 0 none to 100 some. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
emojiboolean | null
Emoji in the agent's answers. null: off
shortTextsboolean | null
Shorter answers by text and push than in the app. null: on
teamstring
A team's slug or id: a company agent for that team. Absent: your personal agent
Responses
201Createdapplication/json
namestring
The display name: plain text without <, > or @. Not Nexus nor an admin's name (400 agent_profile_name_reserved), except that a personal agent may keep its own name, Nexus
min length 1 · max length 40
avatarstring | null
An emoji, a :shortcode: or an https image URL with no credentials (400 agent_profile_avatar_invalid)
A tone preset; custom leaves the tone to the instructions. null: the agent's own
greetingstring | null
One short line the agent says first in a conversation; control characters stripped (400 agent_profile_greeting_invalid)
max length 200
languagestring | null
A BCP-47 tag the agent answers in by default, such as es or pt-BR (400 agent_profile_language_invalid)
max length 35 · pattern ^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$
labelsarray of string
Short labels that sort, route and filter agents; repeats are dropped
at most 8 items
instructionsstring
The owner's guidance, added to the agent's system prompt below its own rules
max length 4000
toolsarray of string | null
Null: every tool the agent's link holds. A list: only these connectors or connector.operation ids; an empty list offers none
at most 64 items
proactivity"always" | "ask_first" | "never"
W4.3's levels: whether the agent may start something the person did not ask for
lengthinteger | null
How much the agent says: 0 brief to 100 detailed. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
formalityinteger | null
How formal the agent is: 0 casual to 100 formal. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
humourinteger | null
How much humour the agent uses: 0 none to 100 some. null: its tone's own (400 agent_profile_personality_invalid)
min 0 · max 100
emojiboolean | null
Emoji in the agent's answers. null: off
shortTextsboolean | null
Shorter answers by text and push than in the app. null: on
idstringrequired
owner"person" | "team"required
Person: a personal agent. team: a company agent, on that team's budget and policy
ownerIdstringrequired
The person's user id, or the team's id
teamSlugstring
A company agent's team slug, while the team exists
createdBystringrequired
The user id of the person who created it
createdAtstring (date-time)required
updatedAtstring (date-time)required
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json
errorobject
messagestringrequired
typestringrequired
The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.
codestring
Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.
paramstring
model when the error is a model refusal (a code starting with model_); absent otherwise.
nexusobject
Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.
minimumstring
On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
409
idempotency_in_progress
A request with the same Idempotency-Key is still running
409
idempotency_interrupted
The first request with this Idempotency-Key was cut off and may have run in part
422
idempotency_key_reused
The Idempotency-Key was used with a different request
429
Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).