Sign up: create a tenant, its first user and an API key (shown once). The person's personal organization is made too (personal in the answer); personal: true without a name makes only the personal organization and returns its key.
Make only your personal organization (no name needed)
Responses
201Createdapplication/json
tenantobject
idstring
namestring
budgetUsdnumber
kind"company" | "personal"
A company organization, or a person's own personal organization (one per person, one member)
slugstring
A personal organization's slug
userobject
idstring
emailstring
apiKeystring
personalOrgSummary
Your personal organization, made with the company organization
idstringrequired
namestringrequired
slugstring
clerkOrgIdstring
Its sign-in provider organization's id: Nexus UI's URL segment when it has no slug
kind"company" | "personal"required
A company organization, or a person's own personal organization (one per person, one member)
role"owner" | "admin" | "member"
currentboolean
The organization this request is in
imageUrlstring
Its logo, as the tenant's imageUrl (https://img.clerk.com/…); unset when it has none.
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
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 company organization, or a person's own personal organization (one per person, one member)
imageUrlstring
The organization's logo, as Clerk serves it (https://img.clerk.com/…); unset when it has none.
mark"staff" | "test" | "demo"
Set only when it is Nexus's own; unset for a customer's.
userobject
The person calling, when the key is a person's
idstringrequired
emailstring
namestring
mark"staff" | "test" | "demo"
Set only when it is Nexus's own; unset for a customer's.
teamsarray of object
Your teams in this organization
idstring
slugstring
namestring
role"lead" | "member"
lead is reserved for the planned team-lead role and grants nothing extra yet.
teamobject
Your default team
idstring
slugstring
namestring
featuresGatewayFeatures
The products this Gateway has on. Unset reads as all off.
wikibooleanrequired
Nexus Wiki is on. Off, its routes and Ask your code answer 404 wiki_off, and clients hide them.
appsboolean
Nexus Apps (NEXUS_APPS_ENABLED): nexus apps and /v1/apps. An older Gateway leaves it out: off.
agentSessionAuditboolean
Coding agent sessions write agent_session.started and agent_session.ended audit events (NEXUS_AUDIT_AGENT_SESSIONS). An older Gateway leaves it out: off.
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).
What the provider answered when the key was checked on add: a model listing, which costs nothing. Absent for a key stored before the check. An add the provider rejects answers 400 provider_key_rejected and stores nothing. disabled and removed are an admin's: no call opens such a key. The list marks a disabled key unused and leaves a removed one out. rejected on a stored key: its provider refused it on a call with HTTP 401; enableProviderKey checks it again, and a replacement clears it.
checkedAtstring (date-time)
lastUsedOnstring (date)
The UTC day a call last used the key.
versionsarray of ProviderKeyVersion
Each key stored for the provider, oldest first, at most 50; only on getProviderKey.
versionintegerrequired
1 for the first key stored for the provider, then one more for each replacement.
last4stringrequired
addedAtstring (date-time)required
addedBystring
The user who added it; absent for Core's own work and for a key stored before Nexus recorded who added keys.
scopedKeysarray of ProviderKey
The keys the organization's teams and people hold. An owner or admin reads every one; anyone else reads the teams' keys and their own. Absent when there is none. A call takes the caller's own key, then its team's, then each parent team's, then the organization's: the first one that is not disabled.
providerstring
scope"team" | "user"
Who holds the key: a team or a person. Absent for the organization's own.
What the provider answered when the key was checked on add: a model listing, which costs nothing. Absent for a key stored before the check. An add the provider rejects answers 400 provider_key_rejected and stores nothing. disabled and removed are an admin's: no call opens such a key. The list marks a disabled key unused and leaves a removed one out. rejected on a stored key: its provider refused it on a call with HTTP 401; enableProviderKey checks it again, and a replacement clears it.
checkedAtstring (date-time)
lastUsedOnstring (date)
The UTC day a call last used the key.
versionsarray of ProviderKeyVersion
Each key stored for the provider, oldest first, at most 50; only on getProviderKey.
versionintegerrequired
1 for the first key stored for the provider, then one more for each replacement.
last4stringrequired
addedAtstring (date-time)required
addedBystring
The user who added it; absent for Core's own work and for a key stored before Nexus recorded who added keys.
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).
What the provider answered when the key was checked on add: a model listing, which costs nothing. Absent for a key stored before the check. An add the provider rejects answers 400 provider_key_rejected and stores nothing. disabled and removed are an admin's: no call opens such a key. The list marks a disabled key unused and leaves a removed one out. rejected on a stored key: its provider refused it on a call with HTTP 401; enableProviderKey checks it again, and a replacement clears it.
checkedAtstring (date-time)
lastUsedOnstring (date)
The UTC day a call last used the key.
versionsarray of ProviderKeyVersion
Each key stored for the provider, oldest first, at most 50; only on getProviderKey.
versionintegerrequired
1 for the first key stored for the provider, then one more for each replacement.
last4stringrequired
addedAtstring (date-time)required
addedBystring
The user who added it; absent for Core's own work and for a key stored before Nexus recorded who added keys.
400Not valid: a provider not in the list (`provider_retired` for a retired one), a key not 8 to 512 characters once surrounding whitespace is trimmed, or both `team` and `user`. `provider_key_invalid_character`: the trimmed key holds a character outside visible ASCII, such as a space, a line break, a terminal's paste marker or an invisible mark, so it is never sent or stored. A NUL is refused before that as `nul_in_string`. `provider_key_rejected`: the provider refused the key when it was checked, and nothing is stored.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
Not valid: a provider not in the list (`provider_retired` for a retired one), a key not 8 to 512 characters once surrounding whitespace is trimmed, or both `team` and `user`. `provider_key_invalid_character`: the trimmed key holds a character outside visible ASCII, such as a space, a line break, a terminal's paste marker or an invisible mark, so it is never sent or stored. A NUL is refused before that as `nul_in_string`. `provider_key_rejected`: the provider refused the key when it was checked, and nothing is stored.
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 provider key, in any state, with its versions: who added each, when, and its last four characters, never the value. 404 provider_key_not_found when none was ever stored.
What the provider answered when the key was checked on add: a model listing, which costs nothing. Absent for a key stored before the check. An add the provider rejects answers 400 provider_key_rejected and stores nothing. disabled and removed are an admin's: no call opens such a key. The list marks a disabled key unused and leaves a removed one out. rejected on a stored key: its provider refused it on a call with HTTP 401; enableProviderKey checks it again, and a replacement clears it.
checkedAtstring (date-time)
lastUsedOnstring (date)
The UTC day a call last used the key.
versionsarray of ProviderKeyVersion
Each key stored for the provider, oldest first, at most 50; only on getProviderKey.
versionintegerrequired
1 for the first key stored for the provider, then one more for each replacement.
last4stringrequired
addedAtstring (date-time)required
addedBystring
The user who added it; absent for Core's own work and for a key stored before Nexus recorded who added keys.
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
provider_key_not_found
404 `provider_key_not_found` when none was ever stored
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 the stored provider key with key, checked against its provider first, as its next version. A disabled key stays disabled. 404 provider_key_not_found when none is stored, before the key is sent anywhere; 400 provider_key_invalid_character when the trimmed key holds a character outside visible ASCII, and nothing is sent; 400 provider_key_rejected when the provider refuses it, and the stored key stays. With dryRun: true, the key is checked and nothing is stored. Audited as provider_key.replaced.
What the provider answered when the key was checked on add: a model listing, which costs nothing. Absent for a key stored before the check. An add the provider rejects answers 400 provider_key_rejected and stores nothing. disabled and removed are an admin's: no call opens such a key. The list marks a disabled key unused and leaves a removed one out. rejected on a stored key: its provider refused it on a call with HTTP 401; enableProviderKey checks it again, and a replacement clears it.
checkedAtstring (date-time)
lastUsedOnstring (date)
The UTC day a call last used the key.
versionsarray of ProviderKeyVersion
Each key stored for the provider, oldest first, at most 50; only on getProviderKey.
versionintegerrequired
1 for the first key stored for the provider, then one more for each replacement.
last4stringrequired
addedAtstring (date-time)required
addedBystring
The user who added it; absent for Core's own work and for a key stored before Nexus recorded who added keys.
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
provider_key_invalid_character
404 `provider_key_not_found` when none is stored, before the key is sent anywhere; 400 `provider_key_invalid_character` when the trimmed key holds a character outside visible ASCII, and nothing is sent; 400 `provider_key_rejected` when the provider refuses it, and the stored key stays
400
provider_key_rejected
404 `provider_key_not_found` when none is stored, before the key is sent anywhere; 400 `provider_key_invalid_character` when the trimmed key holds a character outside visible ASCII, and nothing is sent; 400 `provider_key_rejected` when the provider refuses it, and the stored key stays
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
provider_key_not_found
404 `provider_key_not_found` when none is stored, before the key is sent anywhere; 400 `provider_key_invalid_character` when the trimmed key holds a character outside visible ASCII, and nothing is sent; 400 `provider_key_rejected` when the provider refuses it, and the stored key stays
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).
Disable the stored provider key: it stays sealed, and no call opens it until it is enabled. Disabling a disabled key answers changed: false. 404 provider_key_not_found when none is stored. With dryRun: true, nothing changes. Audited as provider_key.disabled.
What the provider answered when the key was checked on add: a model listing, which costs nothing. Absent for a key stored before the check. An add the provider rejects answers 400 provider_key_rejected and stores nothing. disabled and removed are an admin's: no call opens such a key. The list marks a disabled key unused and leaves a removed one out. rejected on a stored key: its provider refused it on a call with HTTP 401; enableProviderKey checks it again, and a replacement clears it.
checkedAtstring (date-time)
lastUsedOnstring (date)
The UTC day a call last used the key.
versionsarray of ProviderKeyVersion
Each key stored for the provider, oldest first, at most 50; only on getProviderKey.
versionintegerrequired
1 for the first key stored for the provider, then one more for each replacement.
last4stringrequired
addedAtstring (date-time)required
addedBystring
The user who added it; absent for Core's own work and for a key stored before Nexus recorded who added keys.
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
provider_key_not_found
404 `provider_key_not_found` when none is stored
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).
Enable a disabled provider key, or check a rejected one again, after checking it against its provider: its state is what the provider answers. 400 provider_key_rejected when the provider still refuses it, and it stays as it was. 400 provider_key_invalid_character when the stored key holds a character outside visible ASCII: it is not sent, and only a replacement mends it. Enabling a key that is neither disabled nor rejected answers changed: false. 409 provider_key_changed when the key was replaced while it was checked. With dryRun: true, the key is checked and nothing changes. Audited as provider_key.enabled.
What the provider answered when the key was checked on add: a model listing, which costs nothing. Absent for a key stored before the check. An add the provider rejects answers 400 provider_key_rejected and stores nothing. disabled and removed are an admin's: no call opens such a key. The list marks a disabled key unused and leaves a removed one out. rejected on a stored key: its provider refused it on a call with HTTP 401; enableProviderKey checks it again, and a replacement clears it.
checkedAtstring (date-time)
lastUsedOnstring (date)
The UTC day a call last used the key.
versionsarray of ProviderKeyVersion
Each key stored for the provider, oldest first, at most 50; only on getProviderKey.
versionintegerrequired
1 for the first key stored for the provider, then one more for each replacement.
last4stringrequired
addedAtstring (date-time)required
addedBystring
The user who added it; absent for Core's own work and for a key stored before Nexus recorded who added keys.
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
provider_key_rejected
400 `provider_key_rejected` when the provider still refuses it, and it stays as it was
400
provider_key_invalid_character
400 `provider_key_invalid_character` when the stored key holds a character outside visible ASCII: it is not sent, and only a replacement mends 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
provider_key_changed
409 `provider_key_changed` when the key was replaced while it was checked
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).
Remove the stored provider key: its sealed value is deleted, its state is removed, and its versions stay. 404 provider_key_not_found when none is stored. With dryRun: true, nothing changes. Audited as provider_key.removed.
What the provider answered when the key was checked on add: a model listing, which costs nothing. Absent for a key stored before the check. An add the provider rejects answers 400 provider_key_rejected and stores nothing. disabled and removed are an admin's: no call opens such a key. The list marks a disabled key unused and leaves a removed one out. rejected on a stored key: its provider refused it on a call with HTTP 401; enableProviderKey checks it again, and a replacement clears it.
checkedAtstring (date-time)
lastUsedOnstring (date)
The UTC day a call last used the key.
versionsarray of ProviderKeyVersion
Each key stored for the provider, oldest first, at most 50; only on getProviderKey.
versionintegerrequired
1 for the first key stored for the provider, then one more for each replacement.
last4stringrequired
addedAtstring (date-time)required
addedBystring
The user who added it; absent for Core's own work and for a key stored before Nexus recorded who added keys.
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
provider_key_not_found
404 `provider_key_not_found` when none is stored
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).
OpenAI-compatible chat completion. Policy check, then the call's maximum cost is reserved against the budget, the provider is called, and the reservation settles on reported usage (also on errors). Model nexus/auto lets Gateway choose. model is a catalog id (any spelling), nexus/auto or nexus/default (the effective default within policy); the answer's model and x-nexus-model header say which model ran. An answer the auto router picked also names the router version in x-nexus-router and in nexus.router. A refused model: 403 model_not_allowed (policy, naming the level and rule), 404 model_not_found, 400 model_not_supported (coming soon); never sent upstream or reserved, recorded as a refused call. Who pays: the organization's own key; Nexus's own key for Nexus's own organizations; Nexus credit only for a module run's scoped key (a Nexus feature, such as a Wiki or Review run). Any other caller with no key of its own gets 403 provider_key_required, never Nexus credit. Tools (OpenAI's tools, tool_choice, parallel_tool_calls, an assistant's tool_calls and tool messages) work for Anthropic and OpenAI models alike, translated by Gateway. stream: true answers as server-sent events in OpenAI's chat.completion.chunk shape (the role, then text and tool-call pieces, a chunk with finish_reason, a last chunk with no choices and the usage and nexus cost, then data: [DONE]; a failure after the stream started is a data: {"error": …} event), so agent tools that speak Chat Completions (opencode's @ai-sdk/openai-compatible and the like) use <gateway>/v1 as their provider. A stream is checked, reserved and refused exactly as a call that does not stream, and settles however it ends: on the reported usage, or on what streamed when the provider fails or the caller goes away.
developer is taken as system. Answers are always assistant.
contentstring | array of object | null
The text, or OpenAI's content parts: {type: "text", text} (joined) and, in a person's message, {type: "image_url", image_url: {url}} with a data: URL (Gateway fetches no URLs). An assistant turn that only calls tools may leave it out or send null. Answers carry a string.
tool_callsarray of ToolCall
The tools an assistant turn called (in an answer: when finish_reason is tool_calls).
idstringrequired
type"function"required
functionobjectrequired
namestringrequired
argumentsstringrequired
A JSON object, as a string.
tool_call_idstring
A tool message: the call it answers.
max_tokensinteger
At most the lower of the deployment's cap (NEXUS_MAX_TOKENS) and the model's max_output_tokens; above it is a 400 output_over_limit before anything is reserved, with error.nexus.limit. A call skips a host whose output limit is below it; when no host it may use takes it, the same 400 names the largest limit of those hosts. A call also skips a host that does not read the call's images (400 model_no_image_input when no host does) and a host that does not take its reasoning_effort (400 reasoning_effort_not_offered). A host whose own context window may be too small for the prompt and max_tokens is tried after the hosts that surely hold them. Absent: the model's chat default, within that cap.
min 1
temperaturenumber
streamboolean
Answer as server-sent events (ChatCompletionChunk). Absent or null: no stream. A value that is not a boolean is a 400 (stream must be true or false).
stream_optionsobject
Accepted for compatibility; a stream always ends with its usage chunk.
include_usageboolean
toolsarray of object
Functions the model may call, in OpenAI's shape; translated for Anthropic models.
type"function"required
functionobjectrequired
namestringrequired
descriptionstring
parametersobject
A JSON Schema; {"type": "object"} when left out.
tool_choice"auto" | "none" | "required" | object
auto (the default), none, required, or one function by name (it must be in tools). required or a function on a model that does not take a forced choice is 400 tool_choice_not_offered, before anything is reserved.
parallel_tool_callsboolean
false: at most one tool call per answer.
reasoning_effortstring
One of the model's reasoning.efforts (GET /v1/models). Absent: the provider's default. An effort the model does not offer is a 400 reasoning_effort_not_offered before anything is reserved; error.nexus.offered lists the model's efforts.
response_formatobject
OpenAI's response_format, sent on as written when the model offers its type (text, json_object or json_schema). A type the model does not offer is a 400 response_format_not_offered before anything is reserved; error.nexus.offered lists the model's types.
typestringrequired
Responses
200OK: the answer, or with `stream: true` its server-sent eventsapplication/json
developer is taken as system. Answers are always assistant.
contentstring | array of object | null
The text, or OpenAI's content parts: {type: "text", text} (joined) and, in a person's message, {type: "image_url", image_url: {url}} with a data: URL (Gateway fetches no URLs). An assistant turn that only calls tools may leave it out or send null. Answers carry a string.
tool_callsarray of ToolCall
The tools an assistant turn called (in an answer: when finish_reason is tool_calls).
idstringrequired
type"function"required
functionobjectrequired
namestringrequired
argumentsstringrequired
A JSON object, as a string.
tool_call_idstring
A tool message: the call it answers.
finish_reasonstring
Stop, length, or refusal when the provider declined to answer; its words are in nexus.refusal.
Who paid the provider. own_key: the organization's own key; nexus_key: Nexus's own key, for Nexus's own organizations; nexus_subsidy: a Nexus subsidy; nexus_credit: the organization's prepaid Nexus credits, charged the cost plus Nexus's rate; nexus_invoiced: an organization under contract, billed the cost plus Nexus's rate on its month's invoice. Unset on the mock provider
refusalstring
The provider's words when it declined to answer (a safety refusal); set exactly when finish_reason is "refusal". Billed as the provider billed it.
routerobject
The auto router's pick, on an answer it routed or a chat session held. The answer also carries the header x-nexus-router with the version. Unset on every other answer. The pick's cost estimates stay on the spend record.
Why the version chose its model. Unset on a held pick.
heldbooleanrequired
The chat session held its model, with no router run.
default_modelstring
The model nexus/auto resolves to for the caller with no router.
effortstring
The reasoning effort the call ran at: the request's own reasoning_effort, else the one the router version picked. Unset when the call ran at the model's default.
400The request is not valid; the message names the field. A JSON body that is not an object, or a string in it that holds U+0000 (`nul_in_string`), is a 400 on every route that reads one. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_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.
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.
402The call's maximum cost is more than the budget left (`budget_exceeded`; `subsidy_exhausted` for the Nexus subsidy, or `credit_exhausted` for the organization's prepaid credits), or the organization has an unpaid Nexus invoice past its grace (`payment_past_due`). A `budget_exceeded` refusal carries `notified: true` in its details once Gateway has told the refused person and the organization's owners and admins. The details are a BudgetRefusal: each money figure with its exact decimal twin.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.
errorobject
nexusBudgetRefusal
The details (error.nexus) of a 402 budget_exceeded or subsidy_exhausted. Each money figure comes as its number (deprecated) and its exact decimal twin (requestedUsd, requestedUsdDecimal). A refusal below the person level names only what is left and what was asked, never a limit above the caller. credit_exhausted sends remainingUsd and requestedUsd as decimal strings already, without twins.
The level whose limit refused the call (budget_exceeded)
periodstring
The period the refusal counted in: 2026-10, 2026-W44 or 2026-10-21
resetsAtstring (date-time)
When the period ends (UTC)
source"override" | "default"
Person level only: whether the limit was set for them or is the organization's default per person
limitUsdnumber
Person level only: their monthly limit. Deprecated: read limitUsdDecimal, the exact decimal string (root rule 9).
limitUsdDecimalstring
limitUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to limitUsd.
spentUsdnumber
Person level only: what they spent this month. Deprecated: read spentUsdDecimal, the exact decimal string (root rule 9).
spentUsdDecimalstring
spentUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to spentUsd.
reservedUsdnumber
Person level only: what their calls in flight hold. Deprecated: read reservedUsdDecimal, the exact decimal string (root rule 9).
reservedUsdDecimalstring
reservedUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to reservedUsd.
remainingUsdnumber
Every level, and subsidy_exhausted: what is left, never below 0. Deprecated: read remainingUsdDecimal, the exact decimal string (root rule 9).
remainingUsdDecimalstring
remainingUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to remainingUsd.
requestedUsdnumber
What the call may cost at most, the amount it asked to hold. Deprecated: read requestedUsdDecimal, the exact decimal string (root rule 9).
requestedUsdDecimalstring
requestedUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to requestedUsd.
notifiedboolean
budget_exceeded: true once Gateway has told the refused person and the organization's owners and admins
fundedBystring
subsidy_exhausted: who funds the subsidy (nexus)
nextarray of string
subsidy_exhausted: what the caller can do next (billing, own_key)
403The caller may not do this: for example, the role does not have the permission (`role_required`), or the team named is not the caller's (`not_in_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.
404Nothing matches. A path parameter outside its pattern is a 404 "no such endpoint", before the credential is checked. A team named that does not exist is `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.
408The request body stopped arriving for 30 seconds, or took longer than 10 minutes in all (`request_timeout`; `nexus` holds `gap_seconds` and `total_seconds`).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` cannot run or replay: its first request still runs (`idempotency_in_progress`), was a stream (`idempotency_stream_replay`), or its answer was not kept, being over 2,000,000 bytes (`idempotency_response_not_stored`). 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.
413The request body is over the operation's limit (`request_too_large`): 1,000,000 bytes, unless the operation says otherwise.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: another method, path, query or body (`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.
426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.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.
502The provider failed the call. `upstream_auth`: it refused the provider key the call ran on (its 401), never your Nexus API key. `upstream_forbidden`: it refused this model for that key (its 403); the key may still serve other models. `upstream_billing`: the provider account behind that key is out of credit (its 402), never your Nexus budget. The message says whose key it was: your organization's own, Nexus's, or the Nexus credit's. Any other provider 5xx is a 502 with no code.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 provider's or the Gateway's own; every one may be retried. The provider's: it has no capacity now (its 529, or the 503 OpenAI documents as its overload), `upstream_overloaded`; retry after its `retry-after` when it sent one, or try another model. The Gateway's: it is at its limit of requests in flight (`overloaded`, retry after 1 s); it is stopping and takes no new request (`draining`, retry after 5 s); it stopped before the call's first event (`gateway_stopping`, send the call again: it reaches a running Gateway); or its database is busy (`database_busy`: nothing was committed, retry shortly).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 request is not valid; the message names the field. A JSON body that is not an object, or a string in it that holds U+0000 (`nul_in_string`), is a 400 on every route that reads one. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_key`).
400
model_not_supported
403 `model_not_allowed` (policy, naming the level and rule), 404 `model_not_found`, 400 `model_not_supported` (coming soon); never sent upstream or reserved, recorded as a refused call
401
authentication_error
No key, or a key Gateway does not accept
402
budget_exceeded
The call's maximum cost is more than the budget left (`budget_exceeded`; `subsidy_exhausted` for the Nexus subsidy, or `credit_exhausted` for the organization's prepaid credits), or the organization has an unpaid Nexus invoice past its grace (`payment_past_due`). A `budget_exceeded` refusal carries `notified: true` in its details once Gateway has told the refused person and the organization's owners and admins. The details are a BudgetRefusal: each money figure with its exact decimal twin.
403
role_required
Your role does not have this permission
403
model_not_allowed
403 `model_not_allowed` (policy, naming the level and rule), 404 `model_not_found`, 400 `model_not_supported` (coming soon); never sent upstream or reserved, recorded as a refused call
403
provider_key_required
Any other caller with no key of its own gets 403 `provider_key_required`, never Nexus credit
404
Nothing matches. A path parameter outside its pattern is a 404 "no such endpoint", before the credential is checked. A team named that does not exist is `unknown_team`.
404
model_not_found
403 `model_not_allowed` (policy, naming the level and rule), 404 `model_not_found`, 400 `model_not_supported` (coming soon); never sent upstream or reserved, recorded as a refused call
408
The request body stopped arriving for 30 seconds, or took longer than 10 minutes in all (`request_timeout`; `nexus` holds `gap_seconds` and `total_seconds`).
409
The `Idempotency-Key` cannot run or replay: its first request still runs (`idempotency_in_progress`), was a stream (`idempotency_stream_replay`), or its answer was not kept, being over 2,000,000 bytes (`idempotency_response_not_stored`). 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
413
The request body is over the operation's limit (`request_too_large`): 1,000,000 bytes, unless the operation says otherwise.
422
The `Idempotency-Key` was used for a different request: another method, path, query or body (`idempotency_key_reused`).
422
idempotency_key_reused
The Idempotency-Key was used with a different request
426
The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.
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
502
The provider failed the call. `upstream_auth`: it refused the provider key the call ran on (its 401), never your Nexus API key. `upstream_forbidden`: it refused this model for that key (its 403); the key may still serve other models. `upstream_billing`: the provider account behind that key is out of credit (its 402), never your Nexus budget. The message says whose key it was: your organization's own, Nexus's, or the Nexus credit's. Any other provider 5xx is a 502 with no code.
503
The provider's or the Gateway's own; every one may be retried. The provider's: it has no capacity now (its 529, or the 503 OpenAI documents as its overload), `upstream_overloaded`; retry after its `retry-after` when it sent one, or try another model. The Gateway's: it is at its limit of requests in flight (`overloaded`, retry after 1 s); it is stopping and takes no new request (`draining`, retry after 5 s); it stopped before the call's first event (`gateway_stopping`, send the call again: it reaches a running Gateway); or its database is busy (`database_busy`: nothing was committed, retry shortly).
Budget, spend and reservations, by product and capability, with recent calls. Owners and admins (spend.read_all) get the organization's figures. Everyone else gets their own calls and, in place of the organization's budget, spent and reserved, only what is left for them (remainingUsd): the least room of the organization, the caps on the team their call is charged to (x-nexus-team, else their default team) and their monthly limit, the figure the next 402 gives, with the period and resetsAt of the cap that binds it.
Members: the team (slug) the left-for-you figure is for, as for a call; you must be in it. Default: your default team. Owners and admins get the organization's figures whatever it says.
Responses
200OKapplication/json
budgetUsdnumber
The organization's budget, a cap per budgetPeriod. Owners and admins only: a member gets none of budgetUsd, spentUsd, reservedUsd, budgetPeriod and periodSpentUsd. Deprecated: read budgetUsdDecimal, the exact decimal string (root rule 9).
budgetUsdDecimalstring
budgetUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to budgetUsd.
spentUsdnumber
The organization's spend since it began. Owners and admins only. Deprecated: read spentUsdDecimal, the exact decimal string (root rule 9).
spentUsdDecimalstring
spentUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to spentUsd.
reservedUsdnumber
Held by the organization's calls in flight. Owners and admins only. Deprecated: read reservedUsdDecimal, the exact decimal string (root rule 9).
reservedUsdDecimalstring
reservedUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to reservedUsd.
budgetPeriod"day" | "week" | "month"
Owners and admins only: the budget's period
periodSpentUsdnumber
Owners and admins only: the spend of calls reserved in the budget's current period, what the budget counts. Deprecated: read periodSpentUsdDecimal, the exact decimal string (root rule 9).
periodSpentUsdDecimalstring
periodSpentUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to periodSpentUsd.
remainingUsdnumber
Owners and admins: what the organization's budget has left this period. Everyone else: what is left for them, the least room of the organization, their team's caps and their monthly limit, as the next 402 says it. Deprecated: read remainingUsdDecimal, the exact decimal string (root rule 9).
remainingUsdDecimalstring
remainingUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to remainingUsd.
periodstring
Not owners and admins: the period of the cap that binds remainingUsd (2026-10-17, 2026-W43 or 2026-10). For the organization's budget, its current period
resetsAtstring
When the binding cap's period ends and remainingUsd comes back; for owners and admins, when the budget's period ends
scope"org" | "own"
org: the whole organization's calls (owners and admins); own: only the caller's
byProductarray of object
productstring
capabilitystring
costUsdnumber
Deprecated: read costUsdDecimal, the exact decimal string (root rule 9).
costUsdDecimalstring
costUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to costUsd.
callsinteger
recentarray of object
Recent calls. fundedBy says who paid the provider (own_key, nexus_key for Nexus's own organizations, nexus_subsidy, nexus_credit for the organization's prepaid credits, or nexus_invoiced for a contract's invoice); unset on refusals, typed decisions and calls from before it was recorded. A call a Nexus subsidy paid also has fundingOrg, the organization whose stored key paid it. A call Nexus paid the provider for (nexus_key or nexus_subsidy) also has markupBps, Nexus's rate on it in basis points (500 is 5%), as it was when the call settled; costUsd stays the provider's cost. A call a Nexus subsidy paid also has subsidyMarkupBps, the rate the subsidy was charged at: the subsidy spent costUsd plus that rate. It is unset on older calls, which spent costUsd alone. An Anthropic call also has inferenceGeo (us or global), where the provider said it ran; unset on other providers and on calls from before it was recorded. Each call also names the caller's key, never its secret: keyId (a token id key_…; a module's scoped key id scoped:<product>/<capability>/smk_…, which POST /v1/auth/scoped-keys/revoke takes; an agent's link id agl_…, so a call of the agent differs from the person's own; ui; or a system caller's name) and keyKind (the audit log's actor kind: api_key, cli, ui, module, service, sandbox, operator, agent or system). Both are unset on calls from before they were recorded: an unknown key Each call's costUsd, and its overspendPrevented.limitUsd and overUsd, also come as exact decimal strings: costUsdDecimal, limitUsdDecimal and overUsdDecimal. The numbers are deprecated.
subsidizedUsdnumber
Organizations with a Nexus subsidy: what calls the subsidy paid cost the subsidy, each at its provider cost plus Nexus's rate (in your scope: a member gets what it paid for their own calls). Deprecated: read subsidizedUsdDecimal, the exact decimal string (root rule 9).
subsidizedUsdDecimalstring
subsidizedUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to subsidizedUsd.
subsidyobject
Owners and admins only: the organization's Nexus subsidy (a personal organization's starting credit), funded by Nexus, never the organization's own money. A member's answer has none of it
grantedUsdnumber
Deprecated: read grantedUsdDecimal, the exact decimal string (root rule 9).
grantedUsdDecimalstring
grantedUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to grantedUsd.
spentUsdnumber
What settled calls cost the subsidy: each call's provider cost plus Nexus's rate, as for credits. Deprecated: read spentUsdDecimal, the exact decimal string (root rule 9).
spentUsdDecimalstring
spentUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to spentUsd.
reservedUsdnumber
Deprecated: read reservedUsdDecimal, the exact decimal string (root rule 9).
reservedUsdDecimalstring
reservedUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to reservedUsd.
remainingUsdnumber
Deprecated: read remainingUsdDecimal, the exact decimal string (root rule 9).
remainingUsdDecimalstring
remainingUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to remainingUsd.
expiredUsdnumber
What was left of the free start when it expired, 30 days after its grant (pricing v2.0). Absent before. Deprecated: read expiredUsdDecimal, the exact decimal string (root rule 9).
expiredUsdDecimalstring
expiredUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to expiredUsd.
fundedBy"nexus"
usableForModelCallsboolean
Whether this Gateway pays a Nexus feature's model calls (chat sessions, module runs; never raw model access) of an organization with no key of its own from the subsidy (NEXUS_CREDIT_PROVIDER, and NEXUS_SUBSIDY_ORG's stored keys or a subsidy environment key)
subsidiesPaidobject
The funding organization (NEXUS_SUBSIDY_ORG), owners and admins: what its stored provider keys paid for other organizations' subsidized calls. Never part of its own spend, budget or limits
usdnumber
Deprecated: read usdDecimal, the exact decimal string (root rule 9).
usdDecimalstring
usd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to usd.
callsinteger
organizationsinteger
creditsobject
Owners and admins: the organization's prepaid Nexus credits, its own money, never expiring, once it bought some. A Nexus feature's call spends them after the subsidy, at its provider cost plus markupBps. Decimal dollar strings.
purchasedUsdstringrequired
Bought, over all time.
spentUsdstringrequired
What settled calls cost the credits: each call's provider cost plus markupBps.
reservedUsdstringrequired
Held by calls in progress.
remainingUsdstringrequired
Bought, less spent, held and reversed. Below zero after a refund or a lost dispute took back credit that was already spent: then Nexus pays for no call (the free start, credits or the card after the fact) until a purchase pays it back.
reversedUsdstring
What refunds, lost disputes and operators took back, and what an open dispute holds of its purchase until it closes. A refund that fails gives its credit back. Only while something is taken back.
markupBpsintegerrequired
Nexus's rate in basis points (500 is 5%).
payAfterTheFactboolean
Owners and admins (pricing v2.0): the organization pays after the fact, so calls the free start and the credits cannot pay still run on its card.
nexusPaysobject
Every member: whether Nexus can pay for the organization's next model call, and why not. It reads the payers in the ledger's order: a contract, the free start, other Nexus grants, the credits, then the card when it pays after the fact; an unpaid invoice past its grace stops all of them. It answers for a small call to a model the free start pays for, so a pricier model or a larger call can still be refused. Absent where Nexus pays for no model calls on this Gateway.
Why Nexus cannot pay; null when pays is true. billing_off: nothing was set up to pay (no free start, no credits, and the card does not pay after the fact). card_disputed: a payment on the card was disputed, and only another card pays. past_due comes first, also under a contract. A balance under a cent does not count as paying.
changesAtstring (date-time) | nullrequired
The next time this changes by itself: the free start's deadline while it pays, or the next month while the usage limit is reached; else null
limitUsedPercentinteger | null
While the card pays: how much of this UTC month's usage limit it paid, in whole percent, rounded down. Null while another payer pays, or nobody, and always null for a caller who sees only their own spend: only billing managers see it. Absent from an older Gateway.
min 0 · max 100
403A member who names a team they are not in with `x-nexus-team` (`not_in_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.
404A member names, with `x-nexus-team`, a team that does not exist in the 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
402
period
The least room of the organization, the caps on the team their call is charged to (`x-nexus-team`, else their default team) and their monthly limit, the figure the next 402 gives, with the `period` and `resetsAt` of the cap that binds it
403
role_required
Your role does not have this permission
404
A member names, with `x-nexus-team`, a team that does not exist in the 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).
One page of the organization's model calls, newest first, with the filters below (owners and admins). People and teams by id only. A bad filter or a range over 366 days is a 400. One request reads at most 10,000 calls, so a narrow filter can answer a short page, even an empty one, with a nextCursor that resumes the scan.
settled, failed, refused (Nexus Gateway refused it, and no money moved) or released (its reservation closed without a settle, by a job's cleanup or the ledger's age sweep).
modelstring | nullrequired
The model the call asked for; null for a released call, whose model the ledger did not record.
providerstring | nullrequired
The provider that served it; null for a refused or released call, which no provider served.
productstringrequired
The product it is metered to: core for direct API calls, agents, chat or a module.
capabilitystring | nullrequired
The module's capability, such as wiki.
userIdstring | nullrequired
The person who made the call.
teamIdstring | nullrequired
The team the call was attributed to; null for none (unassigned).
agentSessionIdstring | nullrequired
The coding-agent session the call belongs to.
chatSessionIdstring | nullrequired
The chat session the call belongs to (metadata only, never its content).
inputTokensinteger | nullrequired
Prompt tokens, as the ledger charged them; null for a released call, whose tokens nobody reported.
outputTokensinteger | nullrequired
Completion tokens, as the ledger charged them; null for a released call.
costUsdstringrequired
What the call was charged.
pattern ^-?[0-9]+\.[0-9]{6}$
reservedUsdstring | nullrequired
What Nexus Gateway held for the call before it ran.
pattern ^-?[0-9]+\.[0-9]{6}$
reasonstring | nullrequired
The ledger's note on the call, with any secret redacted: why it was refused, failed or released, or what it charged past its hold.
The person's limit, when a person's limit refused the call. Null for a team's cap and the organization's budget: the ledger does not keep their limit on the call.
pattern ^-?[0-9]+\.[0-9]{6}$
overspendAmountUsdstring | nullrequired
What the refused call asked to hold.
pattern ^-?[0-9]+\.[0-9]{6}$
overspendOverUsdstring | nullrequired
How far over the limit it would have gone.
pattern ^-?[0-9]+\.[0-9]{6}$
overspendPeriodstring | nullrequired
The limit's period (2026-10, 2026-W43 or 2026-10-23).
fundedBystring | nullrequired
nexus_subsidy for a call a Nexus subsidy paid, nexus_credit for one the organization's prepaid credits paid; null for the organization's own.
nextCursorstring | nullrequired
Pass as cursor for the next, older page; null on the last page.
400A filter Nexus cannot read: a date not YYYY-MM-DD, `from` after `to` or a range past 366 days, a `limit` outside 1 to 500 or an unknown `status` (`invalid_request`), a team that does not exist (`unknown_team`), or a cursor issued for another caller or query (`invalid_cursor`)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.
403Only owners and admins list the organization's calls (`role_required`): a member without `spend.read_all`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
A filter Nexus cannot read: a date not YYYY-MM-DD, `from` after `to` or a range past 366 days, a `limit` outside 1 to 500 or an unknown `status` (`invalid_request`), a team that does not exist (`unknown_team`), or a cursor issued for another caller or query (`invalid_cursor`)
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).
One of the organization's model calls, as its row in the files: what was reserved, what was charged and why it was refused (owners and admins). Another organization's call reads as missing: 404 unknown_call.
settled, failed, refused (Nexus Gateway refused it, and no money moved) or released (its reservation closed without a settle, by a job's cleanup or the ledger's age sweep).
modelstring | nullrequired
The model the call asked for; null for a released call, whose model the ledger did not record.
providerstring | nullrequired
The provider that served it; null for a refused or released call, which no provider served.
productstringrequired
The product it is metered to: core for direct API calls, agents, chat or a module.
capabilitystring | nullrequired
The module's capability, such as wiki.
userIdstring | nullrequired
The person who made the call.
teamIdstring | nullrequired
The team the call was attributed to; null for none (unassigned).
agentSessionIdstring | nullrequired
The coding-agent session the call belongs to.
chatSessionIdstring | nullrequired
The chat session the call belongs to (metadata only, never its content).
inputTokensinteger | nullrequired
Prompt tokens, as the ledger charged them; null for a released call, whose tokens nobody reported.
outputTokensinteger | nullrequired
Completion tokens, as the ledger charged them; null for a released call.
costUsdstringrequired
What the call was charged.
pattern ^-?[0-9]+\.[0-9]{6}$
reservedUsdstring | nullrequired
What Nexus Gateway held for the call before it ran.
pattern ^-?[0-9]+\.[0-9]{6}$
reasonstring | nullrequired
The ledger's note on the call, with any secret redacted: why it was refused, failed or released, or what it charged past its hold.
The person's limit, when a person's limit refused the call. Null for a team's cap and the organization's budget: the ledger does not keep their limit on the call.
pattern ^-?[0-9]+\.[0-9]{6}$
overspendAmountUsdstring | nullrequired
What the refused call asked to hold.
pattern ^-?[0-9]+\.[0-9]{6}$
overspendOverUsdstring | nullrequired
How far over the limit it would have gone.
pattern ^-?[0-9]+\.[0-9]{6}$
overspendPeriodstring | nullrequired
The limit's period (2026-10, 2026-W43 or 2026-10-23).
fundedBystring | nullrequired
nexus_subsidy for a call a Nexus subsidy paid, nexus_credit for one the organization's prepaid credits paid; null for the organization's own.
403Only owners and admins read the organization's calls (`role_required`): a member without `spend.read_all`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.
404No call with this id in the caller's organization (`unknown_call`); another organization's call reads as missingapplication/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
not_found
Nothing matches the path in your organization
404
No call with this id in the caller's organization (`unknown_call`); another organization's call reads as missing
404
unknown_call
404 `unknown_call`
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 model call of the organization that matches the filters, newest first, as CSV (owners and admins): the rows listSpendCalls pages through, with its filters. A series of files reads the calls written up to the newest one when its first file started. 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.
The first UTC day, YYYY-MM-DD; default 29 days before to
toquery · string (date)
The last UTC day, YYYY-MM-DD, included; default today. A range covers at most 366 days
teamquery · string
A team slug or id: that team and every team under it; unassigned for calls with no team
personquery · string
A person's user id
modelquery · string
A model, as the rows name it; - for the calls with none (released calls), as Analytics groups them
providerquery · string
A provider, as the rows name it; - for the calls with none (refused and released calls), as Analytics groups them
productquery · string
A product (agents) or a product and capability (intelligence/wiki): Analytics' group key
statusquery · string
A comma-separated set of settled, failed, refused and released; default all four
sessionquery · string
An agent session id or a chat session id: the calls attributed to it
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 `SpendCall`, in its order.text/csv
string
400A filter Nexus cannot read: a date not YYYY-MM-DD, `from` after `to` or a range past 366 days, or an unknown `status` (`invalid_request`), a team that does not exist (`unknown_team`), or a cursor issued for another caller or query (`invalid_cursor`)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.
403Only owners and admins export the organization's calls (`role_required`): a member without `spend.export`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
A filter Nexus cannot read: a date not YYYY-MM-DD, `from` after `to` or a range past 366 days, or an unknown `status` (`invalid_request`), a team that does not exist (`unknown_team`), or a cursor issued for another caller or query (`invalid_cursor`)
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 model call of the organization that matches the filters, newest first, as JSON Lines (owners and admins): the rows listSpendCalls pages through, with its filters. A series of files reads the calls written up to the newest one when its first file started. 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.
The first UTC day, YYYY-MM-DD; default 29 days before to
toquery · string (date)
The last UTC day, YYYY-MM-DD, included; default today. A range covers at most 366 days
teamquery · string
A team slug or id: that team and every team under it; unassigned for calls with no team
personquery · string
A person's user id
modelquery · string
A model, as the rows name it; - for the calls with none (released calls), as Analytics groups them
providerquery · string
A provider, as the rows name it; - for the calls with none (refused and released calls), as Analytics groups them
productquery · string
A product (agents) or a product and capability (intelligence/wiki): Analytics' group key
statusquery · string
A comma-separated set of settled, failed, refused and released; default all four
sessionquery · string
An agent session id or a chat session id: the calls attributed to it
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 `SpendCall` per line, then one line `{"manifest": ExportManifest}`.application/jsonl
string
400A filter Nexus cannot read: a date not YYYY-MM-DD, `from` after `to` or a range past 366 days, or an unknown `status` (`invalid_request`), a team that does not exist (`unknown_team`), or a cursor issued for another caller or query (`invalid_cursor`)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.
403Only owners and admins export the organization's calls (`role_required`): a member without `spend.export`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
A filter Nexus cannot read: a date not YYYY-MM-DD, `from` after `to` or a range past 366 days, or an unknown `status` (`invalid_request`), a team that does not exist (`unknown_team`), or a cursor issued for another caller or query (`invalid_cursor`)
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)
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).
The Factory release this binary is (info.version of this document).
edition"licensed" | "open"required
The build: licensed, or open for the open gateway (no licensed code; those routes answer 501 licensed).
provider"live" | "mock"required
NEXUS_PROVIDER: live calls the providers; mock answers every chat and module model call with canned text.
agentProvider"live" | "mock"required
NEXUS_AGENT_PROVIDER: the same for the agent gateway's pass-through.
catalogFingerprintstring | nullrequired
The SHA-256 of the catalog file this process loaded (NEXUS_CATALOG_FILE), in hex, as sha256sum prints it; null when no file is set. Processes with the same value run the same catalog.
simSeedstring
Local simulations only: the installed NEXUS_SIM_SEED, as a string. Absent everywhere else.
200Send traffic: `ready`, or `degraded` with its reasons.application/json
object | object
503Send no traffic: Gateway is stopping (`draining`), or the database ping failed (`database`) or did not answer in time (`database_timeout`).application/json
object | object
Errors
Status
Code
When
503
Send no traffic: Gateway is stopping (`draining`), or the database ping failed (`database`) or did not answer in time (`database_timeout`).
A platform, <os>-<arch>: lowercase letters and digits, 16 at most each.
Responses
200The build to install. `target` is present only when the request named one.application/json
versionstringrequired
sha256stringrequired
pattern ^[0-9a-f]{64}$
urlstring (uri)required
Where to download it, on this Gateway's public URL.
minimumstringrequired
NEXUS_CLI_MINIMUM: an older CLI gets 426 cli_too_old on /v1.
targetstring
The platform asked for.
404`cli_target_unavailable`: this Gateway publishes no native build for `target`.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.
405Not GET or HEAD.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.
503`cli_bundle_unavailable` (`server_error`): no `target`, and no CLI bundle is built on this Gateway. Also `overloaded` or `draining`, as every route outside the health checks.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
404
`cli_target_unavailable`: this Gateway publishes no native build for `target`.
405
Not GET or HEAD.
503
`cli_bundle_unavailable` (`server_error`): no `target`, and no CLI bundle is built on this Gateway. Also `overloaded` or `draining`, as every route outside the health checks.
Stripe's webhook, signed by Stripe with STRIPE_WEBHOOK_SECRET (the Stripe-Signature header, t=<unix>,v1=<hex>; refused more than five minutes from now). Gateway keeps the verified event's identity once in an inbox and nothing else: a repeated delivery changes nothing, and an event whose livemode differs from the key's is kept as ignored. After it answers, Gateway reads the event's object again from Stripe and updates the organization's card on file (GET /v1/billing). A signed event Gateway cannot keep (a thin event, no id) is a 200 with stored: false, so Stripe does not retry it. An event that stopped (unmatched, or failed on its last try) runs again when Stripe sends it again, with all its tries. 400 for a body that is not JSON; 401 invalid_signature for a bad or old signature; 413 over 1 MB; 503 not_configured until STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET are both set and well formed. The 503's message says only that Stripe is not configured; Gateway logs the reason at start.
The event's type. Null when the signed event has no string type (or the body is not a JSON object); Stripe's own events always have one.
storedbooleanrequired
True when this delivery added a row to process. False for a repeat that changes nothing. False too for a resend of a stopped (dead) or unmatched event: no row is added, but the event runs again from its first try. False for an event whose livemode differs from the key's: it is kept as ignored and never processed.
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.
401The signature is bad or too old (`invalid_signature`)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.
413Over 1 MBapplication/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.
503Stripe is not configured (`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
Not JSON (`invalid_request_error`)
401
invalid_signature
400 for a body that is not JSON; 401 `invalid_signature` for a bad or old signature; 413 over 1 MB; 503 `not_configured` until STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET are both set and well formed
413
Over 1 MB
503
Stripe is not configured (`not_configured`)
503
not_configured
400 for a body that is not JSON; 401 `invalid_signature` for a bad or old signature; 413 over 1 MB; 503 `not_configured` until STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET are both set and well formed
Search what you may read, grouped by type and ranked: your own chat sessions (titles and message text), artifacts shared with or by you, people, teams, models and model policies.
What to search for, 1 to 200 characters. Words match as prefixes (depl finds deploy)
typesquery · string
Comma-separated: chats, artifacts, people, teams, models (default: all you may read). actions and pages are accepted and ignored: the palette answers them itself
limitquery · integer
Results per group, 1 to 20 (default 5)
Responses
200OKapplication/json
querystringrequired
typesarray of stringrequired
The types searched: those asked for that your role may read
[start, end) ranges of text that matched, in UTF-16 code units
urlstringrequired
Nexus UI's page for it, under the organization's slug: /app/<org>/sessions/<id> (a chat message match ends in #m-<message id>)
scorenumberrequired
min 0 · max 1
messageIdstring
Chats: the message that matched
morebooleanrequired
More matched than limit
tookMsnumberrequired
The server's time for the search
400A query parameter is not valid (`invalid_search`): `q` empty or over 200 characters, an unknown type in `types`, or `limit` not 1 to 20.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 `search.use` (`role_required`: a service account, a sandbox, or an agent not granted it), or the caller is not a person, such as a module key (`person_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.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
A query parameter is not valid (`invalid_search`): `q` empty or over 200 characters, an unknown type in `types`, or `limit` not 1 to 20.
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).
Typed decisions: a batch of requests to a decision model (TypeSafe's Jev), each a state and its questions, answered with typed judgments and probabilities, never text. Metered as one model call: one model policy decision on the decisions surface, one reservation of the batch's maximum cost, one settlement on the summed reported input tokens, one spend record. Only decision models serve it, and nexus/auto does not resolve here.
The team (slug) this batch's spend goes to; you must be in it. Default: your default team.
Idempotency-Keyheader · string
Send the same key again to retry safely: the request runs once. See Idempotency keys.
Request body · application/json
modelstringrequired
A decision model: typesafe/jev
requestsarray of objectrequired
at most 100 items
statestring | object | array of anyrequired
What the questions are about: a string, an object or an array
questionsobjectrequired
{ <name>: { type, instructions, criteria } }, passed through: choice (criteria: 1 to 255 options), score (an ordered list of 1 to 10 levels), noul (a yes/no probability; criteria optional)
teamstring
The team (slug), as x-nexus-team
Responses
200OKapplication/json
modelstringrequired
The canonical model that answered
resultsarray of object | objectrequired
One per request, in order
nexusobjectrequired
cost_usdnumberrequired
What the batch cost the organization
input_tokensintegerrequired
The input tokens charged, summed
notesarray of string
What the caller should know about the answer; absent when there is none. When the batch's settlement failed, a note says the charge is not confirmed: cost_usd is then the Gateway's computed charge, not a ledger record.
402The organization has nothing to pay the batch with (`subsidy_exhausted`, the shape a model call returns), the batch's maximum cost is more than the budget left (`budget_exceeded`), or the organization has an unpaid Nexus invoice past its grace (`payment_past_due`). A `budget_exceeded` refusal carries `notified: true` in its details once Gateway has told the refused person and the organization's owners and admins. The details are a BudgetRefusal: each money figure with its exact decimal twin.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.
errorobject
nexusBudgetRefusal
The details (error.nexus) of a 402 budget_exceeded or subsidy_exhausted. Each money figure comes as its number (deprecated) and its exact decimal twin (requestedUsd, requestedUsdDecimal). A refusal below the person level names only what is left and what was asked, never a limit above the caller. credit_exhausted sends remainingUsd and requestedUsd as decimal strings already, without twins.
The level whose limit refused the call (budget_exceeded)
periodstring
The period the refusal counted in: 2026-10, 2026-W44 or 2026-10-21
resetsAtstring (date-time)
When the period ends (UTC)
source"override" | "default"
Person level only: whether the limit was set for them or is the organization's default per person
limitUsdnumber
Person level only: their monthly limit. Deprecated: read limitUsdDecimal, the exact decimal string (root rule 9).
limitUsdDecimalstring
limitUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to limitUsd.
spentUsdnumber
Person level only: what they spent this month. Deprecated: read spentUsdDecimal, the exact decimal string (root rule 9).
spentUsdDecimalstring
spentUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to spentUsd.
reservedUsdnumber
Person level only: what their calls in flight hold. Deprecated: read reservedUsdDecimal, the exact decimal string (root rule 9).
reservedUsdDecimalstring
reservedUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to reservedUsd.
remainingUsdnumber
Every level, and subsidy_exhausted: what is left, never below 0. Deprecated: read remainingUsdDecimal, the exact decimal string (root rule 9).
remainingUsdDecimalstring
remainingUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to remainingUsd.
requestedUsdnumber
What the call may cost at most, the amount it asked to hold. Deprecated: read requestedUsdDecimal, the exact decimal string (root rule 9).
requestedUsdDecimalstring
requestedUsd as an exact decimal string in US dollars with six decimals ("12.245000"), from the micro-dollars. Prefer it to requestedUsd.
notifiedboolean
budget_exceeded: true once Gateway has told the refused person and the organization's owners and admins
fundedBystring
subsidy_exhausted: who funds the subsidy (nexus)
nextarray of string
subsidy_exhausted: what the caller can do next (billing, own_key)
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
402
budget_exceeded
The organization has nothing to pay the batch with (`subsidy_exhausted`, the shape a model call returns), the batch's maximum cost is more than the budget left (`budget_exceeded`), or the organization has an unpaid Nexus invoice past its grace (`payment_past_due`). A `budget_exceeded` refusal carries `notified: true` in its details once Gateway has told the refused person and the organization's owners and admins. The details are a BudgetRefusal: each money figure with its exact decimal twin.
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).
The events this item collapses; it can pass the 20 sources kept
min 1
readAtstring (date-time)
doneAtstring (date-time)
createdAtstring (date-time)required
updatedAtstring (date-time)required
nextCursorstring
Pass as cursor for the next page; absent 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
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 events this item collapses; it can pass the 20 sources kept
min 1
readAtstring (date-time)
doneAtstring (date-time)
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).
429
rate_limit_error
Too many requests from this key in a minute
Example
curl
curl -X POST "$NEXUS_URL/v1/notifications/<id>/read" \ -H "Authorization: Bearer $NEXUS_API_KEY"
The events this item collapses; it can pass the 20 sources kept
min 1
readAtstring (date-time)
doneAtstring (date-time)
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).
429
rate_limit_error
Too many requests from this key in a minute
Example
curl
curl -X POST "$NEXUS_URL/v1/notifications/<id>/done" \ -H "Authorization: Bearer $NEXUS_API_KEY"
A required kind can move between channels but never be muted
defaultsarray of "inbox" | "email" | "push"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).
When your organization first reached each value, computed on read (Growth Capabilities): activation through Gateway (the first agent session), through Nexus Wiki (the first Wiki run on a repository the organization links now; a repository unlinked since no longer counts), and the first settled model call, each with its minutes after sign-up. exact is false when older records were pruned or not listed, so the true first may be earlier. The Wiki row reads the Wiki module; when it is missing (wiki_not_configured) or fails (wiki_unavailable), that row carries error and the answer stays 200. Nothing here writes, and no person is named.
The organization's mark; null for a customer's. A figure that leaves the organization counts a marked one apart
tenantZerobooleanrequired
Whether the organization is marked staff: Nexus's own, where C1 is measured. A figure that leaves it counts it apart
signedUpAtstring (date-time)required
The organization's creation: every minutesAfterSignup counts from it
activatedFirstValuerequired
Activated by either definition: the earlier of gateway and wiki. Exact only when both are; carries the Wiki's error, since an unknown Wiki run may be the earlier
atstring (date-time) | nullrequired
When the organization first reached it; null when it has not, or when error says it could not be read
minutesAfterSignupinteger | nullrequired
Whole minutes from signedUpAt to at; 0 for a value recorded before the sign-up
exactbooleanrequired
False when older records were pruned or not listed, so the true first may be earlier than at
errorstring | nullrequired
wiki_not_configured or wiki_unavailable: why the value could not be read; the rest of the answer stands
gatewayFirstValuerequired
Activated: Gateway. The first agent session through nexus claude or nexus codex
atstring (date-time) | nullrequired
When the organization first reached it; null when it has not, or when error says it could not be read
minutesAfterSignupinteger | nullrequired
Whole minutes from signedUpAt to at; 0 for a value recorded before the sign-up
exactbooleanrequired
False when older records were pruned or not listed, so the true first may be earlier than at
errorstring | nullrequired
wiki_not_configured or wiki_unavailable: why the value could not be read; the rest of the answer stands
wikiFirstValuerequired
Activated: Wiki. The first Nexus Wiki run
atstring (date-time) | nullrequired
When the organization first reached it; null when it has not, or when error says it could not be read
minutesAfterSignupinteger | nullrequired
Whole minutes from signedUpAt to at; 0 for a value recorded before the sign-up
exactbooleanrequired
False when older records were pruned or not listed, so the true first may be earlier than at
errorstring | nullrequired
wiki_not_configured or wiki_unavailable: why the value could not be read; the rest of the answer stands
firstSettledCallFirstValuerequired
The first model call that settled; refused and failed calls do not count
atstring (date-time) | nullrequired
When the organization first reached it; null when it has not, or when error says it could not be read
minutesAfterSignupinteger | nullrequired
Whole minutes from signedUpAt to at; 0 for a value recorded before the sign-up
exactbooleanrequired
False when older records were pruned or not listed, so the true first may be earlier than at
errorstring | nullrequired
wiki_not_configured or wiki_unavailable: why the value could not be read; the rest of the answer stands
403Not an owner or admin (`permission_error`)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).
How far your organization's members got on the path to first value, computed on read (Growth Capabilities): per step (joined, signed in on the CLI, first key, first agent session, first settled call), how many reached it, how many stopped just before it, and how long they waited from each member's previous step reached (shown from five waits, so no one person's wait shows). stall is the step the most members stopped just before. Counts only: no person is named. exact is false when older records were pruned or not read.
Members whose furthest step is the one before it: they stopped there
waitMinutesWaitMinutes | nullrequired
Whole minutes from each member's previous step reached to this one, never below 0; null for joined, and below five waits, so no one person's wait shows
exactbooleanrequired
False when older records were pruned or not read, so a member may have reached it earlier, or at all
The step the most members stopped just before (the earlier one on a tie); null when no one stopped short
403Not an owner or admin (`permission_error`)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).
Your referral code and the people whose sign-up carried it, oldest first, each with when they joined and their email masked. The code is made on the first read: ten random characters of lowercase base 32, with no name in it, and it never changes after. A code made earlier from your name gets a random one on its next read, and the old code still works. It is a person's, whichever organization you call from. The people always page: the first 100 without limit or cursor.
NextCursor from the previous page. A cursor whose person left the list answers 400 invalid_cursor.
Responses
200OKapplication/json
codestringrequired
Your referral code: ten random characters of lowercase base 32, made on the first read. A code made earlier from your name gets one on its next read, and the old code still works.
referredarray of ReferredPersonrequired
joinedAtstring (date-time)required
When their sign-up was recorded.
emailstring | nullrequired
Their email with all but its first character before the @ hidden (a***@example.com). null when they erased their account (erased), or when their sign-in carried no email Nexus could keep.
erasedboolean
Whether the person erased their account. A person with no email who is not erased is still live: a reward needs their email. Absent on older Gateways, which a client reads from a null email.
rewardedboolean | null
Whether this referral earned the caller a reward. Absent or null when unavailable. No payment date is disclosed.
reward"pending" | "rewarded" | "not_rewarded"
This referral's reward. pending: none yet, and one may come; a payment is never disclosed while a reward can still come. rewarded: your personal organization got it. not_rewarded: final, it never will (its reward was voided, you reached the lifetime limit, or you have no personal organization). Absent on older Gateways.
nextCursorstring
The next page's cursor, while more people follow.
invitesLeftinteger
While sign-up is invite-only: how many more people your code admits, as an operator approved. Only the people who joined through your code after the approval use one. Absent while sign-up is open, and for a staff member's code with no approval, which admits anyone.
min 0
invitesAllowedinteger
While sign-up is invite-only: how many people an operator approved your code to admit in all, used or not. 0: not approved. With invitesLeft0 and this above 0, you used every invitation. Absent while sign-up is open, for a staff member's code with no approval, and on older Gateways.
min 0
enabledbooleanrequired
False while the personal referral program is stopped. Existing referrals remain readable.
rewardProgressReferralRewardProgress
Lifetime referral rewards for the person's personal organization, across all pages, including credit already spent or expired, against its limit. Absent for a staff member, whose account has no limit, and on older Gateways.
grantedintegerrequired
How many referral rewards this account has received.
min 0
limitintegerrequired
The maximum number of rewarded referrals per account, currently 10.
min 1
rewardsGrantedinteger
How many referral rewards your personal organization got in all, across all pages, including credit already spent or expired, limit or not. Absent on older Gateways.
min 0
rewardUsdDecimalstring
What one rewarded referral gives your personal organization, in US dollars with six decimals ("1.000000"). "0.000000" while no reward is set. Absent on older Gateways.
rewardsActiveboolean
Whether your referrals earn rewards now: the program is on, a reward and a program cap are set, the cap has room for one more reward, and you are below your lifetime limit (rewardProgress) or are staff, who have none. False: no referral of yours earns credit now. Absent on older Gateways, which a client reads as false.
400A bad `limit` or `cursor` (`invalid_request_error`, `invalid_cursor`)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.
403Not a person: a module, a service account, an agent or an operator (`person_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.
Errors
Status
Code
When
100
limit
The first 100 without `limit` or `cursor`
400
invalid_request_error
A field is missing or not valid; the message names it
400
A bad `limit` or `cursor` (`invalid_request_error`, `invalid_cursor`)
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).
Send the app's own error and crash reports to the observability store. Each report becomes one nexus::client_report line in the Gateway's log, which reaches Cloud Logging with the Gateway's other lines; the Gateway keeps no copy. A report names what failed and where, never content: its fields are a closed set, each one bounded, and its free text (name, message) is logged redacted, with quoted text, URL paths and queries, emails and anything shaped like a key or token taken out. A stack frame is logged only as a code location (at <function> (<file>:<line>:<column>) or <binary> +0x<offset>), with every key or token shape taken out; any other frame is logged as [redacted].
400A report breaks the contract (`invalid_report`)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.
403Not one of the organization's people: a service account, a module or a sandbox (`permission_error`)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
A report breaks the contract (`invalid_report`)
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).
Report one active minute of the caller on an app: the app's window has focus and the person acted in the last minute. The Gateway keeps active minutes per UTC day, organization, person, surface, app, app version and OS, and the last minute per app. Labels come from fixed lists and versions are bounded: no content, path or address is kept.
200Checked; `recorded` says whether a minute countedapplication/json
recordedbooleanrequired
Whether the heartbeat counted a minute: false when collection is off, or when the person's minute on this app was already counted
400A value outside its list or pattern (`invalid_heartbeat`)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.
403Not a person: a service account, a module, an agent link or an operator (`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.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
A value outside its list or pattern (`invalid_heartbeat`)
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).
Report errors the caller's app caught, with no content: the app, its version and OS, a kind from a fixed list, and a component and a code the app names from its own code. Never a message, a stack, a path or a URL: the pattern refuses spaces, '/', ':' and '@', and the app must not put content in a name. The Gateway counts them per UTC day, organization, person, app, version, OS, kind, component and code, and keeps each person's last 50 per organization.
Crash: a panic or native crash; render: a UI error boundary; network: a request from the app failed; sign_in; update: the updater; agent: a local agent did not start or ended badly; storage: local files or the keychain; other
componentstringrequired
The app's own name for where it failed, such as diff_view: never text from the error
pattern ^[a-z0-9_.-]{1,64}$
codestringrequired
The app's own error code, such as panic or callback_timeout: never text from the error
pattern ^[a-z0-9_.-]{1,64}$
fatalboolean
Whether it ended the app or the window; false when absent
occurredAtstring (date-time)
When it happened (RFC 3339); the Gateway's now when absent or out of bounds
Responses
200Checked; `recorded` says how many were storedapplication/json
recordedintegerrequired
How many errors were stored: 0 when collection is off
400A value outside its list or pattern (`invalid_client_error`)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.
403Not a person: a service account, a module, an agent link or an operator (`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.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
A value outside its list or pattern (`invalid_client_error`)
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).
Report artifact frames that failed to load, with no content: the surface, how it failed, the app and browser versions, and the frame's host, the artifact's id and the HTTP status when the app knows them. Never a URL, a path, a share token or free text: each field is a fixed list or a pattern. The Gateway counts each failure in nexus_gateway_artifact_frame_failures_total, which holds no identity, and stores nothing. With NEXUS_COLLECT_FRAME_FAILURES=true it also writes one nexus::artifact_frame_failure log line per failure; off, the default, it logs nothing and accepted is 0.
202Logged; `accepted` says how manyapplication/json
acceptedintegerrequired
How many failures were logged: 0 while NEXUS_COLLECT_FRAME_FAILURES is off
400A value outside its list or pattern (`invalid_frame_failure`)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.
403Not a person: a service account, a module, an agent link or an operator (`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.
Errors
Status
Code
When
400
invalid_request_error
A field is missing or not valid; the message names it
400
A value outside its list or pattern (`invalid_frame_failure`)
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).
Report artifact frames that failed to load from the public share-link viewer: the same body as the signed-in route. No credential; limited per address, one count per request, on the public artifact reads' limit. With logging on, the line carries org "public" and no person.
202Logged; `accepted` says how manyapplication/json
acceptedintegerrequired
How many failures were logged: 0 while NEXUS_COLLECT_FRAME_FAILURES is off
400A value outside its list or pattern (`invalid_frame_failure`)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
A value outside its list or pattern (`invalid_frame_failure`)
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).
Report that this install of the open-source desktop app was used today: a random install ID, the day, the app version and release channel, the OS, its major and minor version, the CPU type, and how the app reached models. No credential: the app sends it at most once a day, only while its person has "Send usage data" on. Never a prompt, code, path, name or account. With NEXUS_COLLECT_DAILY_ACTIVE=true the Gateway keeps one row per UTC day and install ID for 90 days, then only counts with no install ID; off, the default, it keeps nothing and accepted is false. The client's address is never kept with the event.
Major and minor only. Absent when the system names none
pattern ^[0-9]{1,4}(\.[0-9]{1,4})?$
arch"arm64" | "x86_64"required
modesarray of "own_subscription" | "own_key" | "own_model" | "cloud"
How the app reached models that day. cloud: signed in to Nexus Cloud
at most 4 items
Responses
202Checked; `accepted` says whether it was keptapplication/json
acceptedbooleanrequired
Whether the day was kept: false while NEXUS_COLLECT_DAILY_ACTIVE is off
400A value outside its list or pattern, or a day outside the last week (`invalid_daily_active`)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
A value outside its list or pattern, or a day outside the last week (`invalid_daily_active`)
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).
Send feedback, a crash report the person chose to send, or a report on a model's answer (App Review 1.2), to Nexus's team. The Gateway posts one message to the feedback channel in Slack (NEXUS_FEEDBACK_SLACK_WEBHOOK_URL) and keeps no copy. The message names the person (name and email) and the organization, so the team can answer, with the app, its version, the OS and the screen. What the person wrote is shown as plain text, so it cannot mention a channel or a person, hide a link, or pass for the Gateway's own lines; names are code spans, and Slack previews no link. A crash shows its redacted name and message and its top frames, as POST /v1/diagnostics/reports logs them, and is logged as one nexus::client_report line too. A reported answer shows its reason and model, then the answer as plain text, as the app showed it.
What it is. crash carries crash, and only it does; report carries answer, and only it does; triage is a report that nexus triage's agent wrote, sent only by Nexus's own people to the triage channel (NEXUS_TRIAGE_SLACK_WEBHOOK_URL)
messagestring
What the person wrote: 1 to 4000 characters (12000 with triage), or empty with a crash or a report. Slack shows it as plain text
max length 12000
screenstring | null
The screen the person was on, as its route's shape (/acme/sessions/:id): letters, digits and / _ . ~ - :, never a query
min length 1 · max length 120 · pattern ^/[A-Za-z0-9/_.~:-]*$
The crash the app saw at this start, which the person chose to send; logged as a diagnostic report too
answerReportedAnswer | null
With the category report: the model's answer the person reported, as the app showed it
Responses
200Posted to the channelapplication/json
senttruerequired
400Feedback that breaks the contract (`invalid_feedback`)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.
403Not one of the organization's people: a service account, a module or a sandbox (`permission_error`)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.
502Slack did not take the message (`upstream_error`)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.
503No feedback channel on this Gateway (`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
Feedback that breaks the contract (`invalid_feedback`)
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
rate_limit_error
Too many requests from this key in a minute
502
Slack did not take the message (`upstream_error`)
503
No feedback channel on this Gateway (`not_configured`)
On when one of the group's kinds uses the channel before anyone chooses
lockedbooleanrequired
The inbox: always on, no setting changes it
requiredbooleanrequired
The group holds a required kind, which off does not mute
availablebooleanrequired
The channel can reach the person on this Gateway. Always true: push reaches a desktop app, which collects its deliveries, even where Web Push has no keys. Kept for older clients
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).
On when one of the group's kinds uses the channel before anyone chooses
lockedbooleanrequired
The inbox: always on, no setting changes it
requiredbooleanrequired
The group holds a required kind, which off does not mute
availablebooleanrequired
The channel can reach the person on this Gateway. Always true: push reaches a desktop app, which collects its deliveries, even where Web Push has no keys. Kept for older clients
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).
The application server's secp256r1 public key (VAPID), uncompressed, base64url without padding: the browser's applicationServerKey
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.
503Web Push is not configured on this Gateway (`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
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
rate_limit_error
Too many requests from this key in a minute
503
Web Push is not configured on this Gateway (`not_configured`).
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).
The push service's token: for web, the browser's push subscription JSON (endpoint on a known push service, keys.p256dh, keys.auth), checked at registration; an APNs or FCM token otherwise. Sealed, never answered back.
400The request is not valid; the message names the field. A JSON body that is not an object, or a string in it that holds U+0000 (`nul_in_string`), is a 400 on every route that reads one. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_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.
409You hold 20 live devices in this organization (`device_limit`). Remove one first.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 request is not valid; the message names the field. A JSON body that is not an object, or a string in it that holds U+0000 (`nul_in_string`), is a 400 on every route that reads one. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_key`).
401
authentication_error
No key, or a key Gateway does not accept
403
role_required
Your role does not have this permission
409
You hold 20 live devices in this organization (`device_limit`). Remove one first.
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).
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).
The kind's fixed subject, or a month report's summary from its figures only: no text a tenant wrote
bodystring
A month report's second line, from its figures only. Absent for other kinds
pathstringrequired
The path the notice opens. It names no organization; a month report opens Usage on its month
deliveryIdstringrequired
The delivery's id (ndl_…)
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).
429
rate_limit_error
Too many requests from this key in a minute
Example
curl
curl -X POST "$NEXUS_URL/v1/notifications/devices/<id>/collect" \ -H "Authorization: Bearer $NEXUS_API_KEY"
The text to say: 1 to 500 characters, not only spaces.
min length 1 · max length 500
Responses
200The speech, as MP3.audio/mpeg
string (binary)
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 short-lived token for dictation: the app's microphone button streams audio to AssemblyAI's speech to text with it, and Nexus's own key stays on the Gateway.
Seconds from now until the token can no longer open a session.
maxSessionSecondsintegerrequired
The longest one session may run, in seconds.
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).
429
rate_limit_error
Too many requests from this key in a minute
Example
curl
curl -X POST "$NEXUS_URL/v1/chat/voice-token" \ -H "Authorization: Bearer $NEXUS_API_KEY"
Ask the organization's owners about a billing block: a reached usage limit, used-up credits or free start, a failed charge, an unpaid invoice, or the plan.
What stops you: a reached usage limit, used-up credits, a used-up free start, a failed charge, an unpaid invoice, or billing for a question about the plan and its usage
Responses
200OKapplication/json
status"sent" | "already_asked"required
sent: each owner gets an inbox item and an email now. already_asked: you asked about this block today (UTC), so nobody is told again.
400The request is not valid; the message names the field. A JSON body that is not an object, or a string in it that holds U+0000 (`nul_in_string`), is a 400 on every route that reads one. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_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
The request is not valid; the message names the field. A JSON body that is not an object, or a string in it that holds U+0000 (`nul_in_string`), is a 400 on every route that reads one. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_key`).
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).