Skip to content
NewNexus 2.0 is here, and it’s open source. Read the launch post

API reference

Projects

Projects (behind NEXUS_PROJECTS; off, each route answers 404): an organization's record that groups repositories and people. Owners and admins are admins of every project. Only a project admin changes its repositories and members; anyone in it reads it.

View as Markdown

List projects

get/v1/projects

The live projects you are in, by name, each with its repositories and your role. Owners and admins see every live project. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Responses

200OKapplication/json

  • dataarray of Projectrequired
    • idstringrequired
    • namestringrequired
    • slugstringrequired
    • defaultAgentstring | nullrequired

      A coding agent's catalog id, or null for each person's own default

    • reposarray of ProjectReporequired
      • repoKeystringrequired

        github: and GitHub's numeric repository id: stable across renames

      • fullNamestringrequired

        owner/name when it was added: shown, never matched on

      • addedBystringrequired
      • addedAtstring (date-time)required
    • role"member" | "admin"required

      Your role: your own row's, a team's, or admin as an owner or admin of the organization

    • ownerKind"org" | "person"required

      Who owns the project: the organization, or one person. A personal project is its owner's alone; its owner may move it to the organization, never back.

    • ownerUserIdstring | nullrequired

      The owner of a personal project; null for the organization's.

    • createdBystringrequired
    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required
    • archivedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl "$NEXUS_URL/v1/projects" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Create project

post/v1/projects

Create a project; you are its first admin. The name is 1 to 80 characters of plain text (project_name_invalid). The slug is made from the name when absent, and is 1 to 63 lowercase letters, digits and dashes (project_slug_invalid), unique among live projects (409 project_slug_taken). The default agent is a coding agent Nexus knows (project_agent_unknown). At most 500 live projects per organization (409 project_limit). Audited as project.created. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Request body · application/json

  • namestringrequired

    max length 80

  • slugstring

    pattern ^[a-z0-9][a-z0-9-]{0,62}$

  • defaultAgentstring | null
  • ownerKind"org" | "person"

    org (the default) or person: a personal project only you see and use.

Responses

201Createdapplication/json

  • idstringrequired
  • namestringrequired
  • slugstringrequired
  • defaultAgentstring | nullrequired

    A coding agent's catalog id, or null for each person's own default

  • reposarray of ProjectReporequired
    • repoKeystringrequired

      github: and GitHub's numeric repository id: stable across renames

    • fullNamestringrequired

      owner/name when it was added: shown, never matched on

    • addedBystringrequired
    • addedAtstring (date-time)required
  • role"member" | "admin"required

    Your role: your own row's, a team's, or admin as an owner or admin of the organization

  • ownerKind"org" | "person"required

    Who owns the project: the organization, or one person. A personal project is its owner's alone; its owner may move it to the organization, never back.

  • ownerUserIdstring | nullrequired

    The owner of a personal project; null for the organization's.

  • createdBystringrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • archivedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X POST "$NEXUS_URL/v1/projects" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Platform"
  }'

Get project

get/v1/projects/{id}

One project you are in, archived or not. A project you are not in is a 404 project_not_found, as one that does not exist. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

Responses

200OKapplication/json

  • idstringrequired
  • namestringrequired
  • slugstringrequired
  • defaultAgentstring | nullrequired

    A coding agent's catalog id, or null for each person's own default

  • reposarray of ProjectReporequired
    • repoKeystringrequired

      github: and GitHub's numeric repository id: stable across renames

    • fullNamestringrequired

      owner/name when it was added: shown, never matched on

    • addedBystringrequired
    • addedAtstring (date-time)required
  • role"member" | "admin"required

    Your role: your own row's, a team's, or admin as an owner or admin of the organization

  • ownerKind"org" | "person"required

    Who owns the project: the organization, or one person. A personal project is its owner's alone; its owner may move it to the organization, never back.

  • ownerUserIdstring | nullrequired

    The owner of a personal project; null for the organization's.

  • createdBystringrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • archivedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl "$NEXUS_URL/v1/projects/<id>" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Update project

patch/v1/projects/{id}

Change a project's name, slug or default agent; defaultAgent: null clears it. A project admin only (403 project_admin_required). An archived project takes no change (409 project_archived). Audited as project.updated. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Request body · application/json

  • namestring

    max length 80

  • slugstring

    pattern ^[a-z0-9][a-z0-9-]{0,62}$

  • defaultAgentstring | null

    Null clears it; absent keeps it

Responses

200OKapplication/json

  • idstringrequired
  • namestringrequired
  • slugstringrequired
  • defaultAgentstring | nullrequired

    A coding agent's catalog id, or null for each person's own default

  • reposarray of ProjectReporequired
    • repoKeystringrequired

      github: and GitHub's numeric repository id: stable across renames

    • fullNamestringrequired

      owner/name when it was added: shown, never matched on

    • addedBystringrequired
    • addedAtstring (date-time)required
  • role"member" | "admin"required

    Your role: your own row's, a team's, or admin as an owner or admin of the organization

  • ownerKind"org" | "person"required

    Who owns the project: the organization, or one person. A personal project is its owner's alone; its owner may move it to the organization, never back.

  • ownerUserIdstring | nullrequired

    The owner of a personal project; null for the organization's.

  • createdBystringrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • archivedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X PATCH "$NEXUS_URL/v1/projects/<id>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Platform",
    "slug": "platform",
    "defaultAgent": "<defaultAgent>"
  }'

Archive project

DEL/v1/projects/{id}

Archive a project. Its rows stay, it takes no change after, and its slug is free again. A project admin only. Answers the archived project. Audited as project.archived. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Responses

200OKapplication/json

  • idstringrequired
  • namestringrequired
  • slugstringrequired
  • defaultAgentstring | nullrequired

    A coding agent's catalog id, or null for each person's own default

  • reposarray of ProjectReporequired
    • repoKeystringrequired

      github: and GitHub's numeric repository id: stable across renames

    • fullNamestringrequired

      owner/name when it was added: shown, never matched on

    • addedBystringrequired
    • addedAtstring (date-time)required
  • role"member" | "admin"required

    Your role: your own row's, a team's, or admin as an owner or admin of the organization

  • ownerKind"org" | "person"required

    Who owns the project: the organization, or one person. A personal project is its owner's alone; its owner may move it to the organization, never back.

  • ownerUserIdstring | nullrequired

    The owner of a personal project; null for the organization's.

  • createdBystringrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • archivedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X DELETE "$NEXUS_URL/v1/projects/<id>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Move project to organization

post/v1/projects/{id}/move-to-organization

Move a personal project to the organization, one way: an organization's project never becomes personal. Its owner only; to anyone else it is a 404 project_not_found. The owner becomes its first admin. Its repositories, project secrets and setup stay with it. 409 project_not_personal for an organization's project, 409 project_slug_taken when a live organization project has its slug, 409 project_archived when archived. Answers the project. Audited as project.moved_to_org. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Responses

200OKapplication/json

  • idstringrequired
  • namestringrequired
  • slugstringrequired
  • defaultAgentstring | nullrequired

    A coding agent's catalog id, or null for each person's own default

  • reposarray of ProjectReporequired
    • repoKeystringrequired

      github: and GitHub's numeric repository id: stable across renames

    • fullNamestringrequired

      owner/name when it was added: shown, never matched on

    • addedBystringrequired
    • addedAtstring (date-time)required
  • role"member" | "admin"required

    Your role: your own row's, a team's, or admin as an owner or admin of the organization

  • ownerKind"org" | "person"required

    Who owns the project: the organization, or one person. A personal project is its owner's alone; its owner may move it to the organization, never back.

  • ownerUserIdstring | nullrequired

    The owner of a personal project; null for the organization's.

  • createdBystringrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • archivedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X POST "$NEXUS_URL/v1/projects/<id>/move-to-organization" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Put project repo

put/v1/projects/{id}/repos/{repoKey}

Add one of the organization's linked repositories to a project, by its GitHub id (404 repository_not_linked otherwise). Adding it again changes nothing. A project admin only. At most 50 per project (409 project_repo_limit). Membership grants no repository access. Audited as project.repo_added. Answers the project. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

  • repoKeypath · stringrequired

    github: and GitHub's numeric repository id

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Responses

200OKapplication/json

  • idstringrequired
  • namestringrequired
  • slugstringrequired
  • defaultAgentstring | nullrequired

    A coding agent's catalog id, or null for each person's own default

  • reposarray of ProjectReporequired
    • repoKeystringrequired

      github: and GitHub's numeric repository id: stable across renames

    • fullNamestringrequired

      owner/name when it was added: shown, never matched on

    • addedBystringrequired
    • addedAtstring (date-time)required
  • role"member" | "admin"required

    Your role: your own row's, a team's, or admin as an owner or admin of the organization

  • ownerKind"org" | "person"required

    Who owns the project: the organization, or one person. A personal project is its owner's alone; its owner may move it to the organization, never back.

  • ownerUserIdstring | nullrequired

    The owner of a personal project; null for the organization's.

  • createdBystringrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • archivedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X PUT "$NEXUS_URL/v1/projects/<id>/repos/<repoKey>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Delete project repo

DEL/v1/projects/{id}/repos/{repoKey}

Remove a repository from a project (404 project_repo_not_found when it is not in it). A project admin only. Audited as project.repo_removed. Answers the project. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

  • repoKeypath · stringrequired

    github: and GitHub's numeric repository id

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Responses

200OKapplication/json

  • idstringrequired
  • namestringrequired
  • slugstringrequired
  • defaultAgentstring | nullrequired

    A coding agent's catalog id, or null for each person's own default

  • reposarray of ProjectReporequired
    • repoKeystringrequired

      github: and GitHub's numeric repository id: stable across renames

    • fullNamestringrequired

      owner/name when it was added: shown, never matched on

    • addedBystringrequired
    • addedAtstring (date-time)required
  • role"member" | "admin"required

    Your role: your own row's, a team's, or admin as an owner or admin of the organization

  • ownerKind"org" | "person"required

    Who owns the project: the organization, or one person. A personal project is its owner's alone; its owner may move it to the organization, never back.

  • ownerUserIdstring | nullrequired

    The owner of a personal project; null for the organization's.

  • createdBystringrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • archivedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X DELETE "$NEXUS_URL/v1/projects/<id>/repos/<repoKey>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

List project members

get/v1/projects/{id}/members

A project's member rows: people and teams, each a member or an admin. Anyone in the project reads them. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

Responses

200OKapplication/json

  • dataarray of ProjectMemberrequired
    • subjectKind"user" | "team"required
    • subjectIdstringrequired

      The person's user id, or the team's id

    • teamSlugstring

      The team's slug, for a team that still exists

    • role"member" | "admin"required
    • addedBystringrequired
    • addedAtstring (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

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl "$NEXUS_URL/v1/projects/<id>/members" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Put project member

put/v1/projects/{id}/members/{subjectKind}/{subjectId}

Add a person or a team to a project, or change their role. A person must be an active member of the organization (404 unknown_member); a team, one of its teams (404 unknown_team). A person is in a project through their own row or a row of a team they are in or a team above it. A project admin only. At most 500 rows per project (409 project_member_limit). Audited as project.member_set. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

  • subjectKindpath · stringrequired

    A person (user) or a team

  • subjectIdpath · stringrequired

    The person's user id, or the team's id or slug

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Request body · application/json

  • role"member" | "admin"required

Responses

200OKapplication/json

  • subjectKind"user" | "team"required
  • subjectIdstringrequired

    The person's user id, or the team's id

  • teamSlugstring

    The team's slug, for a team that still exists

  • role"member" | "admin"required
  • addedBystringrequired
  • addedAtstring (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

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X PUT "$NEXUS_URL/v1/projects/<id>/members/<subjectKind>/<subjectId>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "member"
  }'

Delete project member

DEL/v1/projects/{id}/members/{subjectKind}/{subjectId}

Remove a person or a team from a project (404 project_member_not_found when they are not in it). Owners and admins stay admins of every project without a row. A project admin only. Audited as project.member_removed. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

  • subjectKindpath · stringrequired

    A person (user) or a team

  • subjectIdpath · stringrequired

    The person's user id, or the team's id or slug

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Responses

204Removed

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

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X DELETE "$NEXUS_URL/v1/projects/<id>/members/<subjectKind>/<subjectId>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

List org secrets

get/v1/secrets/org

List the organization's secrets: each one's name, who changed it last and when, by name. No route returns a value. An owner or admin of the organization only (403 role_required, before the body is read). Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.org_secrets. 503 not_configured when Gateway has no database.

projects.org_secretsOwner, AdminTry it in the API Explorer

Responses

200OKapplication/json

  • dataarray of SecretNamerequired
    • namestringrequired

      pattern ^[A-Z_][A-Z0-9_]{0,127}$

    • scope"org" | "project" | "person"required
    • updatedBystringrequired

      The user id of who set it last

    • 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

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl "$NEXUS_URL/v1/secrets/org" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Put org secret

put/v1/secrets/org/{secretName}

Set one of the organization's secrets. The value is sealed with the organization's data key and is write-only: the answer is its name, never its value. A value is 1 to 32768 bytes (400 secret_value_invalid). At most 100 per scope (409 secret_limit). Audited as secret.set, without the value. An owner or admin of the organization only (403 role_required, before the body is read). Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.org_secrets. 503 not_configured when Gateway has no database.

projects.org_secretsOwner, AdminTry it in the API Explorer

Parameters

  • secretNamepath · stringrequired

    The secret's name: an environment variable's (NPM_TOKEN)

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Request body · application/json

  • valuestringrequired

    The value, 1 to 32768 bytes. Write-only: no route returns it.

    min length 1

Responses

200OKapplication/json

  • namestringrequired

    pattern ^[A-Z_][A-Z0-9_]{0,127}$

  • scope"org" | "project" | "person"required
  • updatedBystringrequired

    The user id of who set it last

  • 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

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X PUT "$NEXUS_URL/v1/secrets/org/<secretName>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "<value>"
  }'

Delete org secret

DEL/v1/secrets/org/{secretName}

Delete one of the organization's secrets (404 secret_not_found when there is none). Audited as secret.deleted. An owner or admin of the organization only (403 role_required, before the body is read). Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.org_secrets. 503 not_configured when Gateway has no database.

projects.org_secretsOwner, AdminTry it in the API Explorer

Parameters

  • secretNamepath · stringrequired

    The secret's name: an environment variable's (NPM_TOKEN)

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Responses

204Removed

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

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X DELETE "$NEXUS_URL/v1/secrets/org/<secretName>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

List my secrets

get/v1/secrets/me

List your own secrets: each one's name, who changed it last and when, by name. No route returns a value. Only you read and change your own; they reach only your sessions. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Responses

200OKapplication/json

  • dataarray of SecretNamerequired
    • namestringrequired

      pattern ^[A-Z_][A-Z0-9_]{0,127}$

    • scope"org" | "project" | "person"required
    • updatedBystringrequired

      The user id of who set it last

    • 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

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl "$NEXUS_URL/v1/secrets/me" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Put my secret

put/v1/secrets/me/{secretName}

Set one of your own secrets. The value is sealed with the organization's data key and is write-only: the answer is its name, never its value. A value is 1 to 32768 bytes (400 secret_value_invalid). At most 100 per scope (409 secret_limit). Audited as secret.set, without the value. Only you read and change your own; they reach only your sessions. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • secretNamepath · stringrequired

    The secret's name: an environment variable's (NPM_TOKEN)

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Request body · application/json

  • valuestringrequired

    The value, 1 to 32768 bytes. Write-only: no route returns it.

    min length 1

Responses

200OKapplication/json

  • namestringrequired

    pattern ^[A-Z_][A-Z0-9_]{0,127}$

  • scope"org" | "project" | "person"required
  • updatedBystringrequired

    The user id of who set it last

  • 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

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X PUT "$NEXUS_URL/v1/secrets/me/<secretName>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "<value>"
  }'

Delete my secret

DEL/v1/secrets/me/{secretName}

Delete one of your own secrets (404 secret_not_found when there is none). Audited as secret.deleted. Only you read and change your own; they reach only your sessions. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • secretNamepath · stringrequired

    The secret's name: an environment variable's (NPM_TOKEN)

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Responses

204Removed

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

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X DELETE "$NEXUS_URL/v1/secrets/me/<secretName>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

List project secrets

get/v1/projects/{id}/secrets

List the project's secrets: each one's name, who changed it last and when, by name. No route returns a value. Anyone in the project reads the names; a project admin changes them (403 project_admin_required), never while it is archived (409 project_archived). 404 project_not_found when you are not in it. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

Responses

200OKapplication/json

  • dataarray of SecretNamerequired
    • namestringrequired

      pattern ^[A-Z_][A-Z0-9_]{0,127}$

    • scope"org" | "project" | "person"required
    • updatedBystringrequired

      The user id of who set it last

    • 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

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl "$NEXUS_URL/v1/projects/<id>/secrets" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Put project secret

put/v1/projects/{id}/secrets/{secretName}

Set one of the project's secrets. The value is sealed with the organization's data key and is write-only: the answer is its name, never its value. A value is 1 to 32768 bytes (400 secret_value_invalid). At most 100 per scope (409 secret_limit). Audited as secret.set, without the value. Anyone in the project reads the names; a project admin changes them (403 project_admin_required), never while it is archived (409 project_archived). 404 project_not_found when you are not in it. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

  • secretNamepath · stringrequired

    The secret's name: an environment variable's (NPM_TOKEN)

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Request body · application/json

  • valuestringrequired

    The value, 1 to 32768 bytes. Write-only: no route returns it.

    min length 1

Responses

200OKapplication/json

  • namestringrequired

    pattern ^[A-Z_][A-Z0-9_]{0,127}$

  • scope"org" | "project" | "person"required
  • updatedBystringrequired

    The user id of who set it last

  • 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

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X PUT "$NEXUS_URL/v1/projects/<id>/secrets/<secretName>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "<value>"
  }'

Delete project secret

DEL/v1/projects/{id}/secrets/{secretName}

Delete one of the project's secrets (404 secret_not_found when there is none). Audited as secret.deleted. Anyone in the project reads the names; a project admin changes them (403 project_admin_required), never while it is archived (409 project_archived). 404 project_not_found when you are not in it. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

  • secretNamepath · stringrequired

    The secret's name: an environment variable's (NPM_TOKEN)

  • Idempotency-Keyheader · string

    Send the same key again to retry safely: the request runs once. See Idempotency keys.

Responses

204Removed

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

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
409idempotency_in_progressA request with the same Idempotency-Key is still running
409idempotency_interruptedThe first request with this Idempotency-Key was cut off and may have run in part
422idempotency_key_reusedThe Idempotency-Key was used with a different request
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X DELETE "$NEXUS_URL/v1/projects/<id>/secrets/<secretName>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Get project setup

get/v1/projects/{id}/setup

Read the project's setup: the current version's script, or null when the repository's own committed .agents/setup runs, and whether a cloud machine verified it (unknown, verifying, ok or failed, with the version and commit the last finished verification ran on). Anyone in the project reads it. 404 project_not_found when you are not in it. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

Responses

200OKapplication/json

  • projectIdstringrequired
  • currentVersioninteger | nullrequired

    The current version, or null for the repository's own .agents/setup

    min 1

  • scriptstring | nullrequired

    The current version's script

  • status"unknown" | "verifying" | "ok" | "failed"required
  • verifiedVersioninteger | nullrequired

    min 1

  • verifiedCommitstring | nullrequired

    pattern ^[0-9a-f]{7,64}$

  • verifiedAtstring (date-time) | nullrequired
  • reportedByMachinestring | nullrequired

    The cloud machine whose host reported last

  • updatedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl "$NEXUS_URL/v1/projects/<id>/setup" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

List project setup versions

get/v1/projects/{id}/setup/versions

List the project's saved setup versions, newest first, without their scripts. Anyone in the project reads them. 404 project_not_found when you are not in it. Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

Responses

200OKapplication/json

  • dataarray of ProjectSetupVersionrequired
    • versionintegerrequired

      min 1

    • createdBystringrequired

      The user id of who saved it

    • createdAtstring (date-time)required
    • bytesintegerrequired

      min 1

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

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl "$NEXUS_URL/v1/projects/<id>/setup/versions" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Save project setup version

post/v1/projects/{id}/setup/versions

Save the next version of the project's setup script. It wins over the repository's .agents/setup, and the status goes back to unknown. Versions are never changed or deleted. A script is 1 to 65536 bytes (400 setup_script_invalid); at most 500 versions (409 setup_version_limit). Audited as project.setup_saved. A project admin only (403 project_admin_required), never while it is archived (409 project_archived). Behind NEXUS_PROJECTS: off, a 404. No agent link and no operator grant holds projects.use. 503 not_configured when Gateway has no database.

projects.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

Request body · application/json

  • scriptstringrequired

    Up to 65536 bytes

    min length 1

Responses

201Createdapplication/json

  • projectIdstringrequired
  • currentVersioninteger | nullrequired

    The current version, or null for the repository's own .agents/setup

    min 1

  • scriptstring | nullrequired

    The current version's script

  • status"unknown" | "verifying" | "ok" | "failed"required
  • verifiedVersioninteger | nullrequired

    min 1

  • verifiedCommitstring | nullrequired

    pattern ^[0-9a-f]{7,64}$

  • verifiedAtstring (date-time) | nullrequired
  • reportedByMachinestring | nullrequired

    The cloud machine whose host reported last

  • updatedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X POST "$NEXUS_URL/v1/projects/<id>/setup/versions" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "script": "<script>"
  }'

Report project setup status

post/v1/projects/{id}/setup/status

A cloud machine's host reports a verification of the project's current setup, with the machine's own Nexus token (403 not_machine_token for any other). The machine's owner must be in the project (404 project_not_found). The report names the version it ran; 409 setup_version_stale when that is not the current one. ok and failed name the commit (400 setup_commit_invalid). 503 cloud_unavailable without cloud machines. Behind NEXUS_PROJECTS: off, a 404. 503 not_configured when Gateway has no database.

cloud.machines.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The project's id (prj_…)

Request body · application/json

  • machineIdstringrequired

    The reporting cloud machine's id

  • versioninteger | nullrequired

    The version it ran, or null for the repository's own setup

    min 1

  • status"verifying" | "ok" | "failed"required
  • commitstring

    The commit it ran on; required for ok and failed

    pattern ^[0-9a-f]{7,64}$

Responses

200OKapplication/json

  • projectIdstringrequired
  • currentVersioninteger | nullrequired

    The current version, or null for the repository's own .agents/setup

    min 1

  • scriptstring | nullrequired

    The current version's script

  • status"unknown" | "verifying" | "ok" | "failed"required
  • verifiedVersioninteger | nullrequired

    min 1

  • verifiedCommitstring | nullrequired

    pattern ^[0-9a-f]{7,64}$

  • verifiedAtstring (date-time) | nullrequired
  • reportedByMachinestring | nullrequired

    The cloud machine whose host reported last

  • updatedAtstring (date-time) | nullrequired

429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).application/json

  • errorobject
    • messagestringrequired
    • typestringrequired

      The class of the error: invalid_request_error (400, 405, 408, 409, 413, 422, 426), authentication_error (401), billing_error (402), permission_error (403), not_found (404), rate_limit_error (429), or a 5xx type such as server_error.

    • codestring

      Stable: branch on it, not on message. Every 4xx carries one: its site's own code, else the default for its status (400 invalid_request, 401 unauthenticated, 402 payment_required, 403 forbidden, 404 not_found, 405 method_not_allowed, 408 request_timeout, 409 conflict, 422 unprocessable, 429 rate_limited, any other 4xx invalid_request). A 502 carries its site's code, else upstream_error. Any other 5xx carries one only when its site sets it. The agent routes (/v1/anthropic/, /v1/openai/) answer in the provider's shape.

    • paramstring

      model when the error is a model refusal (a code starting with model_); absent otherwise.

    • nexusobject

      Details of the error, when it has any: the policy rule of a model refusal, the seconds of a 408.

    • minimumstring

      On a 426 cli_too_old only: the oldest nexus CLI version Gateway supports.

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404not_foundNothing matches the path in your organization
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).
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X POST "$NEXUS_URL/v1/projects/<id>/setup/status" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "machineId": "<machineId>",
    "version": 1,
    "status": "verifying"
  }'