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

API reference

Pages

Pages: standalone HTML, Markdown, React (jsx) or spreadsheet (sheet, JSON data) pages, and whiteboards (board, JSON data that every version must parse as, else 400 page_board_invalid with nexus.problems; a board may be written as a layout, a timeline, columns, a flow, a mind map or a grid, which Gateway lays out on top of the latest version, else 400 page_board_layout_invalid), in versions that never change. Every write makes the next version; a write built on an old version is refused (409 page_version_conflict), and a restore makes a new version from an old one. At most 16 MiB a version. Writes that contain what phishing needs (password fields, forms that submit somewhere, meta refresh, iframes, object and embed, obfuscated eval) are refused with the reason (400 page_content_blocked). Private to their owner for now: sharing and the sandboxed viewer come next.

View as Markdown

List pages

get/v1/pages

Your pages in this organization, most recently written first.

chat.useEvery memberTry it in the API Explorer

Parameters

  • qquery · string

    A case-insensitive match in the title.

  • orderquery · "recent" | "name" | "kind" | "created"

    The order for this list. Keep the same filter and order when sending its cursor.

  • limitquery · integer

    At most this many (default 30)

  • docTextquery · boolean

    Match saved Markdown in owned Docs as well as titles when q is set.

  • cursorquery · string

    nextCursor from the previous page

Responses

200OKapplication/json

  • contentMatchesobject

    Saved Doc excerpts keyed by page ID for matches in this list.

  • pagesarray of PageSummaryrequired
    • idstringrequired

      pag_…

    • titlestringrequired

      The latest version's title

    • format"html" | "md" | "jsx" | "sheet" | "board"required
    • latestVersionintegerrequired
    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required

      When the latest version was written

  • nextCursorstring

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
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/pages" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Create page

post/v1/pages

Create a page from finished HTML, Markdown or a React component: version 1. Audited as page.created.

chat.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

  • routesarray of SiteRouteWrite

    Additional saved HTML or React Site routes. The content field holds the root. On a version write, omission carries the previous routes and an empty list removes them.

    at most 31 items

    • pathstringrequired

      max length 128

    • titlestringrequired

      max length 120

    • contentstringrequired

      Document source in the Site’s format.

  • titlestringrequired

    1 to 120 characters

    min length 1 · max length 120

  • format"html" | "md" | "jsx" | "sheet" | "board"

    default "html"

  • contentstringrequired

    The page's source: HTML, or Markdown. At most 16 MiB of UTF-8.

Responses

201Createdapplication/json

  • pagePageSummaryrequired
    • idstringrequired

      pag_…

    • titlestringrequired

      The latest version's title

    • format"html" | "md" | "jsx" | "sheet" | "board"required
    • latestVersionintegerrequired
    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required

      When the latest version was written

  • versionPageVersionrequired
    • pageIdstringrequired
    • versionintegerrequired
    • titlestringrequired
    • contentSha256stringrequired

      The content's SHA-256, lowercase hex

    • bytesintegerrequired

      The content's size in bytes (UTF-8)

    • createdVia"chat_tool" | "api" | "cli" | "restore" | "remix"required
    • restoredFrominteger

      A restore's source version

    • remixedFromPageRemixedFrom

      A remix's source: the share it was read through and the page version it copies.

      • artifactIdstringrequired
      • pageIdstringrequired
      • versionintegerrequired
    • createdAtstring (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
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/pages" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "<title>",
    "content": "<content>"
  }'

List page trash

get/v1/pages/trash

The caller’s pages in Trash.

chat.useEvery memberTry it in the API Explorer

Responses

200OKapplication/json

  • pagesarray of TrashedPagerequired
    • pagePageSummaryrequired
      • idstringrequired

        pag_…

      • titlestringrequired

        The latest version's title

      • format"html" | "md" | "jsx" | "sheet" | "board"required
      • latestVersionintegerrequired
      • createdAtstring (date-time)required
      • updatedAtstring (date-time)required

        When the latest version was written

    • trashedAtstring (date-time)required
    • purgeAfterstring (date-time)required

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
429rate_limit_errorToo many requests from this key in a minute

Example

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

Change page trash

put/v1/pages/{id}/trash

Move an owned page to Trash or restore it.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

Request body · application/json

  • trashedbooleanrequired

Responses

204OK

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
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X PUT "$NEXUS_URL/v1/pages/<id>/trash" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "trashed": false
  }'

Purge page trash

DEL/v1/pages/{id}/trash

Permanently delete an owned page that is in Trash.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

Responses

204OK

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
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X DELETE "$NEXUS_URL/v1/pages/<id>/trash" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Get page

get/v1/pages/{id}

One of your pages and its versions, newest first. Each version lists its title and size, not its content: read the content with getPageSource.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

Responses

200OKapplication/json

  • idstringrequired

    pag_…

  • titlestringrequired

    The latest version's title

  • format"html" | "md" | "jsx" | "sheet" | "board"required
  • latestVersionintegerrequired
  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required

    When the latest version was written

  • versionsarray of PageVersionrequired

    Newest first

    • pageIdstringrequired
    • versionintegerrequired
    • titlestringrequired
    • contentSha256stringrequired

      The content's SHA-256, lowercase hex

    • bytesintegerrequired

      The content's size in bytes (UTF-8)

    • createdVia"chat_tool" | "api" | "cli" | "restore" | "remix"required
    • restoredFrominteger

      A restore's source version

    • remixedFromPageRemixedFrom

      A remix's source: the share it was read through and the page version it copies.

      • artifactIdstringrequired
      • pageIdstringrequired
      • versionintegerrequired
    • createdAtstring (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/pages/<id>" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Delete page

DEL/v1/pages/{id}

Delete one of your pages, every version and its content, for good. Audited as page.deleted.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • Idempotency-Keyheader · string

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

Responses

200Deletedapplication/json

  • deletedbooleanrequired
  • idstringrequired
  • versionsintegerrequired

    How many versions went with it

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/pages/<id>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Write page version

post/v1/pages/{id}/versions

Write the next version of one of your pages, or of a page shared with you with edit access (a viewer gets 403 page_read_only). With baseVersion, refused with 409 page_version_conflict when that is no longer the latest. Audited as page.version_written.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • Idempotency-Keyheader · string

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

Request body · application/json

  • routesarray of SiteRouteWrite

    Additional saved HTML or React Site routes. The content field holds the root. On a version write, omission carries the previous routes and an empty list removes them.

    at most 31 items

    • pathstringrequired

      max length 128

    • titlestringrequired

      max length 120

    • contentstringrequired

      Document source in the Site’s format.

  • contentstringrequired

    The page's source: HTML, or Markdown. At most 16 MiB of UTF-8.

  • titlestring

    A new title; unset keeps the latest one

    min length 1 · max length 120

  • format"html" | "md" | "jsx" | "sheet" | "board"

    Must be the page's format when set

  • baseVersioninteger

    The version this was built on: refused with 409 page_version_conflict when it is no longer the latest

    min 1

  • agentstring

    An agent writing for you: its name, such as Claude. People with the page open see it on the canvas, next to your name, on the boards this write changes. Unset from an MCP server: Agent

    min length 1 · max length 40

Responses

201Writtenapplication/json

  • pagePageSummaryrequired
    • idstringrequired

      pag_…

    • titlestringrequired

      The latest version's title

    • format"html" | "md" | "jsx" | "sheet" | "board"required
    • latestVersionintegerrequired
    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required

      When the latest version was written

  • versionPageVersionrequired
    • pageIdstringrequired
    • versionintegerrequired
    • titlestringrequired
    • contentSha256stringrequired

      The content's SHA-256, lowercase hex

    • bytesintegerrequired

      The content's size in bytes (UTF-8)

    • createdVia"chat_tool" | "api" | "cli" | "restore" | "remix"required
    • restoredFrominteger

      A restore's source version

    • remixedFromPageRemixedFrom

      A remix's source: the share it was read through and the page version it copies.

      • artifactIdstringrequired
      • pageIdstringrequired
      • versionintegerrequired
    • createdAtstring (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
409page_version_conflictWith `baseVersion`, refused with 409 `page_version_conflict` when that is no longer the latest
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/pages/<id>/versions" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "<content>"
  }'

Restore page

post/v1/pages/{id}/restore

Restore an old version: the next version gets its title and content. Audited as page.restored.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • Idempotency-Keyheader · string

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

Request body · application/json

  • versionintegerrequired

    The version to restore

    min 1

  • baseVersioninteger

    As for writePageVersion

    min 1

Responses

201Restoredapplication/json

  • pagePageSummaryrequired
    • idstringrequired

      pag_…

    • titlestringrequired

      The latest version's title

    • format"html" | "md" | "jsx" | "sheet" | "board"required
    • latestVersionintegerrequired
    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required

      When the latest version was written

  • versionPageVersionrequired
    • pageIdstringrequired
    • versionintegerrequired
    • titlestringrequired
    • contentSha256stringrequired

      The content's SHA-256, lowercase hex

    • bytesintegerrequired

      The content's size in bytes (UTF-8)

    • createdVia"chat_tool" | "api" | "cli" | "restore" | "remix"required
    • restoredFrominteger

      A restore's source version

    • remixedFromPageRemixedFrom

      A remix's source: the share it was read through and the page version it copies.

      • artifactIdstringrequired
      • pageIdstringrequired
      • versionintegerrequired
    • createdAtstring (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 POST "$NEXUS_URL/v1/pages/<id>/restore" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "version": 1
  }'

Get page version

get/v1/pages/{id}/versions/{version}

One version of one of your pages, or of a page shared with you with edit access.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • versionpath · stringrequired

    A version number, or latest

Responses

200OKapplication/json

  • pageIdstringrequired
  • versionintegerrequired
  • titlestringrequired
  • contentSha256stringrequired

    The content's SHA-256, lowercase hex

  • bytesintegerrequired

    The content's size in bytes (UTF-8)

  • createdVia"chat_tool" | "api" | "cli" | "restore" | "remix"required
  • restoredFrominteger

    A restore's source version

  • remixedFromPageRemixedFrom

    A remix's source: the share it was read through and the page version it copies.

    • artifactIdstringrequired
    • pageIdstringrequired
    • versionintegerrequired
  • createdAtstring (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/pages/<id>/versions/<version>" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Get site routes

get/v1/pages/{id}/versions/{version}/site-routes

List a saved Site version’s routes

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • versionpath · stringrequired

    A version number, or latest

Responses

200OKapplication/json

  • pageIdstringrequired
  • versionintegerrequired

    min 1

  • routesarray of SiteRouterequired

    at most 32 items

    • pathstringrequired

      max length 128

    • titlestringrequired

      max length 120

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/pages/<id>/versions/<version>/site-routes" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Get page source

get/v1/pages/{id}/versions/{version}/source

A version's source as written, as plain text: the HTML, Markdown or JSX to edit and write back with writePageVersion. Use version latest for the newest. It is never rendered on the API's origin.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • versionpath · stringrequired

    A version number, or latest

Responses

200The source, `text/plain`; the `x-nexus-page-version` header names the versiontext/plain

string

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

  • errorobject
    • messagestringrequired
    • typestringrequired

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

    • codestring

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

    • paramstring

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

    • nexusobject

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

    • minimumstring

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

Errors

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/pages/<id>/versions/<version>/source" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Stream page events

get/v1/pages/{id}/events

A page's live events, as server-sent events: a version event when a version is written, a preview event when an editor posts unsaved text, and its shared draft's updates, to whoever may open the page. A query event (PageQueryEvent) says one of the page's queries has a new result (Nexus Data).

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

Responses

200The event streamtext/event-stream

  • pageIdstringrequired
  • versionintegerrequired
  • titlestringrequired
  • format"html" | "md" | "jsx" | "sheet" | "board"required
  • contentSha256string

    SHA-256 of the content, lowercase hex: a shared draft tells its own saves from other writes by it. Gateway sends it; a client treats an event without it as a write from elsewhere.

404Not a page you may open, or a pinned share (`page_not_found`)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.

503Too many live readers on this Gateway copy (`page_events_full`): poll insteadapplication/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
404Not a page you may open, or a pinned share (`page_not_found`)
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
503Too many live readers on this Gateway copy (`page_events_full`): poll instead

Example

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

Get page doc

get/v1/pages/{id}/doc

The page's shared draft: the Yjs updates its editors posted, oldest first, for an editor that joins late. Its owner and the editors of an edit share.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

Responses

200The draftapplication/json

  • seedinteger

    The version the draft was started from. Unset: no draft.

  • lastinteger

    The newest update's id.

  • updatesarray of stringrequired

    The Yjs updates, oldest first, base64url.

403A reader who may only view the page (`page_read_only`)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.

404Not a page you may edit (`page_not_found`)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

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
404Not a page you may edit (`page_not_found`)
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/pages/<id>/doc" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Post page doc

post/v1/pages/{id}/doc

Post to the page's shared draft: a Yjs update, a compacted snapshot, an editor's awareness (cursor and name), or their presence.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

Request body · application/json

  • seedinteger

    The version the draft was started from: required with update.

    min 1

  • updatestring

    A Yjs update, or with snapshot the whole draft (Y.encodeStateAsUpdate), base64url.

    pattern ^[A-Za-z0-9_-]+$

  • snapshotboolean

    update is a snapshot that replaces the updates up to upTo.

  • upTointeger

    A snapshot's last update: the last of the read it applied. Unset: the snapshot replaces nothing.

    min 1

  • awarenessstring

    An awareness update (y-protocols), base64url: relayed, never stored.

    pattern ^[A-Za-z0-9_-]+$

  • presenceobject

    A reader's presence, a JSON object of at most 4 KiB, relayed as posted: Nexus UI sends client, at (its pointer, or null) and leave. Never stored.

Responses

200Stored (its id) or relayedapplication/json

  • idinteger

    The stored update's id; unset for an awareness or presence post.

400A malformed body, or a `seed` that is not one of the page's versionsapplication/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.

403A reader who may only view the page posted an update or a snapshot (`page_read_only`)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.

404Not a page you may edit, or for presence, open at its latest version (`page_not_found`)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 draft started over from a newer version (`page_doc_stale`, `details.seed`): read it againapplication/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 its size limit (`page_doc_too_large`)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

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
400A malformed body, or a `seed` that is not one of the page's versions
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
404Not a page you may edit, or for presence, open at its latest version (`page_not_found`)
409The draft started over from a newer version (`page_doc_stale`, `details.seed`): read it again
413Over its size limit (`page_doc_too_large`)
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/pages/<id>/doc" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "seed": 1,
    "update": "<update>",
    "snapshot": false,
    "upTo": 1,
    "awareness": "<awareness>",
    "presence": {}
  }'

Put page preview

put/v1/pages/{id}/preview

Post the shared draft's text as the page's live preview, so every reader sees an edit before it is saved.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

Request body · application/json

  • baseVersionintegerrequired

    The version the text is built on: the page's latest.

    min 1

  • contentstringrequired

    The draft's whole text, at most 16 MiB, checked as a version's content.

Responses

200Stored and announcedapplication/json

  • pageIdstringrequired
  • versionintegerrequired

    The version the text is built on.

  • contentSha256stringrequired

    SHA-256 of the text, lowercase hex.

400A malformed body, content a page may not hold (`page_content_blocked`), a `sheet` that breaks its schema (`page_sheet_invalid`, with the first problem at `error.nexus.path`), or a board that does not parse (`page_board_invalid`)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.

403A reader who may only view the page (`page_read_only`)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.

404Not a page you may edit (`page_not_found`)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.

409A version was written since `baseVersion` (`page_preview_stale`, `details.latestVersion`): post the draft built on itapplication/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 a page's 16 MiB (`page_too_large`)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

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
400A malformed body, content a page may not hold (`page_content_blocked`), a `sheet` that breaks its schema (`page_sheet_invalid`, with the first problem at `error.nexus.path`), or a board that does not parse (`page_board_invalid`)
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
404Not a page you may edit (`page_not_found`)
409A version was written since `baseVersion` (`page_preview_stale`, `details.latestVersion`): post the draft built on it
413Over a page's 16 MiB (`page_too_large`)
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/pages/<id>/preview" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "baseVersion": 1,
    "content": "<content>"
  }'

Share page

post/v1/pages/{id}/share

Share one of your pages as an artifact, with the same audiences as a chat: the organization, chosen teams or people, or outside it (named people by email, or anyone with the link) as its settings allow. Pin a version, or follow the latest. Sharing again makes a new version of the artifact. Audited as artifact.shared.

artifacts.shareEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • Idempotency-Keyheader · string

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

Request body · application/json

  • audience"org" | "teams" | "people" | "external" | "public"required
  • teamsarray of string

    Team slugs or ids (audience teams)

  • peoplearray of string

    Kind people: members' emails or ids; kind external: the emails of people outside the organization (checked against artifacts.external.domains)

  • expiresInstring | number

    Kind public: 30d, 12h or a number of days (within artifacts.external.expiry)

  • expiresAtstring (date-time)

    Kind public: when the link stops opening

  • version"latest" | integer

    The version readers see: latest (follows new versions) or a number (pinned)

    default "latest"

  • role"view" | "edit"

    Edit lets the readers join the page's shared draft and write its versions. Only for audiences org, teams and people, on the latest version. Deleting, sharing and restoring stay the owner's.

    default "view"

Responses

201Sharedapplication/json

  • idstringrequired

    Art_…; one per version

  • versionintegerrequired

    1 for a session's first share, then 2, 3…

    min 1

  • sessionIdstringrequired

    The session it was shared from (which may have changed or been deleted since)

  • titlestringrequired
  • mode"chat" | "ask"required

    chat with any model you may use; ask (Ask your code) answers from your organization's Nexus Wiki, citing its pages

  • modelstringrequired

    The session's model when shared: nexus/auto or a pinned model

  • modelsarray of stringrequired

    The models that answered, in order of first use

  • authorArtifactAuthorrequired

    Readers outside the organization get the name only

    • emailstring
    • namestring
  • audienceArtifactAudiencerequired

    Who may read an artifact, besides its author: inside the organization, the whole organization, chosen teams (their members and the members of the teams under them) or chosen people; outside it, named people by email (external) or anyone with the link (public). Readers outside the organization see the kind only.

    • kind"org" | "teams" | "people" | "external" | "public"required
    • teamsarray of stringrequired

      Team slugs (kind teams)

    • peoplearray of stringrequired

      Members' emails (kind people); the outsiders with access (kind external). Empty for readers outside the organization.

  • allowContinuebooleanrequired

    Readers may continue it in a new private chat of their own

  • status"active" | "revoked"required

    Only its author sees a revoked artifact

  • minebooleanrequired

    You shared it

  • latestboolean

    No newer active version you can read

  • messageCountintegerrequired
  • costUsdnumber

    What the shared answers cost; absent for readers outside the organization

  • urlstringrequired

    The link to hand out: a public link (kind public), the fast viewer (kind external, and for every reader outside), else the artifact in Nexus UI; absolute when the Gateway knows Nexus UI's URL, else a path

  • pathstringrequired

    /app/<org>/artifacts/<id>

  • markdownUrlstringrequired

    GET /v1/artifacts/{id}.md

  • createdAtstring (date-time)required

    When it was shared

  • sessionCreatedAtstring (date-time)
  • revokedAtstring (date-time)
  • viewerUrlstring

    The fast viewer outside the app shell: <origin>/a/<id> (read through a public link: that link)

  • publicUrlstring

    Kind public, for its author and the organization's owners and admins (and whoever holds it): <origin>/a/<token>

  • expiresAtstring (date-time)

    Kind public: when the link stops opening

  • externalboolean

    Shared outside the organization (kind external or public)

  • includeCodeboolean

    Outside the organization: whether Ask your code's sources are in the snapshot

  • organizationstring

    The organization's name, shown to every reader

  • kind"page" | "session"

    Page for a shared page (no messages; open it with GET /v1/artifacts/{id}/frame); session for a shared coding-agent session (its messages derived from its timeline, session on ArtifactDetail); absent for a chat

  • pageIdstring

    A shared page: the page

  • pageFormat"html" | "md" | "jsx" | "sheet" | "board"
  • pageVersioninteger

    A shared page: the version it pins; absent: the latest

  • pageRole"view" | "edit"

    A shared page: edit when its readers in the organization may edit the page; absent for a chat

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 POST "$NEXUS_URL/v1/pages/<id>/share" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "audience": "org"
  }'

List page comments

get/v1/pages/{id}/comments

The comments on a page, oldest first, with whether you own it. Whoever may open the page: its owner, or anyone who may open one of its active shares (a comment is a read: the shares have no comment role). A public link alone is not enough. Anyone else: 404 page_not_found. A reader of a pinned share sees the threads on the versions it shows.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

Responses

200OKapplication/json

  • commentsarray of PageCommentrequired

    Oldest first

    • idstringrequired

      pcm_…

    • pageIdstringrequired
    • threadIdstring

      The thread's first comment; absent on that first comment

    • authorstring

      The author's name or email. Absent for a reader outside the page's organization, except on their own comments

    • minebooleanrequired

      Whether you wrote it

    • bodystringrequired
    • quotestring

      The passage the thread is about

    • prefixstring

      Up to 200 characters just before the passage, to find it again in a later version

    • suffixstring

      Up to 200 characters just after the passage

    • pinPagePin

      The point on a design's board the thread is pinned to

      • boardstringrequired

        The board's data-id, else its data-artboard name

        min length 1 · max length 200

      • xnumberrequired

        From the board's left edge, in its pixels

        min 0 · max 100000

      • ynumberrequired

        From the board's top edge, in its pixels

        min 0 · max 100000

      • atinteger

        The part's data-nx-at: its place in the source of the comment's version

        min 0 · max 2147483647

      • tagstring

        The part's tag, lower case

        pattern ^[a-z][a-z0-9:-]{0,40}$

      • layerstring

        The part's data-layer name

        min length 1 · max length 200

      • pathstring

        The part's place under the board, as child indices: finds it again in a later version

        pattern ^\d{1,5}(\.\d{1,5}){0,63}$

      • pxnumber

        The point inside the part, as a fraction of its width; with py

        min 0 · max 1

      • pynumber

        The point inside the part, as a fraction of its height; with px

        min 0 · max 1

    • versionintegerrequired

      The version it was made on

    • resolvedAtstring (date-time)

      When the thread was resolved; absent while it is open

    • chatSessionIdstring

      The chat Ask Nexus opened, on the reply it posted

    • createdAtstring (date-time)required
  • ownerbooleanrequired

    Whether you own the page: you may delete any comment, resolve any thread, and ask Nexus

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/pages/<id>/comments" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Create page comment

post/v1/pages/{id}/comments

Comment on a page: a new thread on a passage (quote, with the text before and after it, on a version) or on a point of a design's board (pin), or a reply (threadId). Whoever may open the page: its owner, or anyone who may open one of its active shares (a comment is a read: the shares have no comment role). A public link alone is not enough. Anyone else: 404 page_not_found. 403 pages_off when the organization turned pages off; 400 page_comment_limit at 1000 comments.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • Idempotency-Keyheader · string

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

Request body · application/json

  • bodystringrequired

    min length 1 · max length 4000

  • threadIdstring

    Reply in this thread (a reply's id joins its thread). A reply has no quote, prefix, suffix or pin

  • quotestring

    The passage a new thread is about; unset comments on the whole page

    max length 2000

  • prefixstring

    The text just before the quote

    max length 200

  • suffixstring

    The text just after the quote

    max length 200

  • pinPagePin

    A new thread's point on a design's board, instead of a quote. A reply has none

    • boardstringrequired

      The board's data-id, else its data-artboard name

      min length 1 · max length 200

    • xnumberrequired

      From the board's left edge, in its pixels

      min 0 · max 100000

    • ynumberrequired

      From the board's top edge, in its pixels

      min 0 · max 100000

    • atinteger

      The part's data-nx-at: its place in the source of the comment's version

      min 0 · max 2147483647

    • tagstring

      The part's tag, lower case

      pattern ^[a-z][a-z0-9:-]{0,40}$

    • layerstring

      The part's data-layer name

      min length 1 · max length 200

    • pathstring

      The part's place under the board, as child indices: finds it again in a later version

      pattern ^\d{1,5}(\.\d{1,5}){0,63}$

    • pxnumber

      The point inside the part, as a fraction of its width; with py

      min 0 · max 1

    • pynumber

      The point inside the part, as a fraction of its height; with px

      min 0 · max 1

  • versioninteger

    The version the passage is on; unset: the newest you can open

    min 1

Responses

201Createdapplication/json

  • idstringrequired

    pcm_…

  • pageIdstringrequired
  • threadIdstring

    The thread's first comment; absent on that first comment

  • authorstring

    The author's name or email. Absent for a reader outside the page's organization, except on their own comments

  • minebooleanrequired

    Whether you wrote it

  • bodystringrequired
  • quotestring

    The passage the thread is about

  • prefixstring

    Up to 200 characters just before the passage, to find it again in a later version

  • suffixstring

    Up to 200 characters just after the passage

  • pinPagePin

    The point on a design's board the thread is pinned to

    • boardstringrequired

      The board's data-id, else its data-artboard name

      min length 1 · max length 200

    • xnumberrequired

      From the board's left edge, in its pixels

      min 0 · max 100000

    • ynumberrequired

      From the board's top edge, in its pixels

      min 0 · max 100000

    • atinteger

      The part's data-nx-at: its place in the source of the comment's version

      min 0 · max 2147483647

    • tagstring

      The part's tag, lower case

      pattern ^[a-z][a-z0-9:-]{0,40}$

    • layerstring

      The part's data-layer name

      min length 1 · max length 200

    • pathstring

      The part's place under the board, as child indices: finds it again in a later version

      pattern ^\d{1,5}(\.\d{1,5}){0,63}$

    • pxnumber

      The point inside the part, as a fraction of its width; with py

      min 0 · max 1

    • pynumber

      The point inside the part, as a fraction of its height; with px

      min 0 · max 1

  • versionintegerrequired

    The version it was made on

  • resolvedAtstring (date-time)

    When the thread was resolved; absent while it is open

  • chatSessionIdstring

    The chat Ask Nexus opened, on the reply it posted

  • createdAtstring (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 POST "$NEXUS_URL/v1/pages/<id>/comments" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "<body>"
  }'

Resolve page comment

patch/v1/pages/{id}/comments/{commentId}

Resolve a thread, or open it again: its first comment, by its author or the page's owner (else 403 page_comment_forbidden).

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • commentIdpath · stringrequired

    The comment's id (pcm_…)

  • Idempotency-Keyheader · string

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

Request body · application/json

  • resolvedbooleanrequired

Responses

200OKapplication/json

  • idstringrequired

    pcm_…

  • pageIdstringrequired
  • threadIdstring

    The thread's first comment; absent on that first comment

  • authorstring

    The author's name or email. Absent for a reader outside the page's organization, except on their own comments

  • minebooleanrequired

    Whether you wrote it

  • bodystringrequired
  • quotestring

    The passage the thread is about

  • prefixstring

    Up to 200 characters just before the passage, to find it again in a later version

  • suffixstring

    Up to 200 characters just after the passage

  • pinPagePin

    The point on a design's board the thread is pinned to

    • boardstringrequired

      The board's data-id, else its data-artboard name

      min length 1 · max length 200

    • xnumberrequired

      From the board's left edge, in its pixels

      min 0 · max 100000

    • ynumberrequired

      From the board's top edge, in its pixels

      min 0 · max 100000

    • atinteger

      The part's data-nx-at: its place in the source of the comment's version

      min 0 · max 2147483647

    • tagstring

      The part's tag, lower case

      pattern ^[a-z][a-z0-9:-]{0,40}$

    • layerstring

      The part's data-layer name

      min length 1 · max length 200

    • pathstring

      The part's place under the board, as child indices: finds it again in a later version

      pattern ^\d{1,5}(\.\d{1,5}){0,63}$

    • pxnumber

      The point inside the part, as a fraction of its width; with py

      min 0 · max 1

    • pynumber

      The point inside the part, as a fraction of its height; with px

      min 0 · max 1

  • versionintegerrequired

    The version it was made on

  • resolvedAtstring (date-time)

    When the thread was resolved; absent while it is open

  • chatSessionIdstring

    The chat Ask Nexus opened, on the reply it posted

  • createdAtstring (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 PATCH "$NEXUS_URL/v1/pages/<id>/comments/<commentId>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "resolved": false
  }'

Delete page comment

DEL/v1/pages/{id}/comments/{commentId}

Delete a comment, by its author or the page's owner (else 403 page_comment_forbidden). A thread's replies go with it. Deleting the page deletes all its comments.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • commentIdpath · stringrequired

    The comment's id (pcm_…)

  • Idempotency-Keyheader · string

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

Responses

200Deletedapplication/json

  • deletedbooleanrequired
  • idstringrequired

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/pages/<id>/comments/<commentId>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Ask nexus on page comment

post/v1/pages/{id}/comments/{commentId}/ask

Ask Nexus to make the change a thread asks for (the page's owner only, else 403 page_owner_only): opens a new chat of yours that holds the page's latest version, posts a reply in the thread that names the chat, and answers the instruction to send there as your first message. That turn is an ordinary chat turn, billed to you, and its write_page writes the page's next version. Audited as chat.session_created.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • commentIdpath · stringrequired

    The comment's id (pcm_…)

  • Idempotency-Keyheader · string

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

Responses

201Createdapplication/json

  • commentPageCommentrequired

    A comment on a page. A thread's first comment quotes a passage or pins a point on a design's board; a reply names its thread.

    • idstringrequired

      pcm_…

    • pageIdstringrequired
    • threadIdstring

      The thread's first comment; absent on that first comment

    • authorstring

      The author's name or email. Absent for a reader outside the page's organization, except on their own comments

    • minebooleanrequired

      Whether you wrote it

    • bodystringrequired
    • quotestring

      The passage the thread is about

    • prefixstring

      Up to 200 characters just before the passage, to find it again in a later version

    • suffixstring

      Up to 200 characters just after the passage

    • pinPagePin

      The point on a design's board the thread is pinned to

      • boardstringrequired

        The board's data-id, else its data-artboard name

        min length 1 · max length 200

      • xnumberrequired

        From the board's left edge, in its pixels

        min 0 · max 100000

      • ynumberrequired

        From the board's top edge, in its pixels

        min 0 · max 100000

      • atinteger

        The part's data-nx-at: its place in the source of the comment's version

        min 0 · max 2147483647

      • tagstring

        The part's tag, lower case

        pattern ^[a-z][a-z0-9:-]{0,40}$

      • layerstring

        The part's data-layer name

        min length 1 · max length 200

      • pathstring

        The part's place under the board, as child indices: finds it again in a later version

        pattern ^\d{1,5}(\.\d{1,5}){0,63}$

      • pxnumber

        The point inside the part, as a fraction of its width; with py

        min 0 · max 1

      • pynumber

        The point inside the part, as a fraction of its height; with px

        min 0 · max 1

    • versionintegerrequired

      The version it was made on

    • resolvedAtstring (date-time)

      When the thread was resolved; absent while it is open

    • chatSessionIdstring

      The chat Ask Nexus opened, on the reply it posted

    • createdAtstring (date-time)required
  • sessionChatSessionrequired

    A chat session, private to its author unless shared as an artifact.

    • idstringrequired
    • titlestringrequired

      The first question until you rename it

    • mode"chat" | "ask"required

      chat with any model you may use; ask (Ask your code) answers from your organization's Nexus Wiki, citing its pages

    • modelstringrequired

      The model asked for: nexus/auto by default

    • lastModelstring

      The model that ran last

    • teamstring

      The team its spend is attributed to

    • archivedbooleanrequired
    • webSearchboolean

      Whether the model may search the web in this session (default false)

    • messageCountintegerrequired
    • costUsdnumberrequired

      The sum of its model calls and of the web searches that returned results, settled in the ledger; a search that fails after the provider billed it is in the ledger, not in this sum

    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required
    • visibility"private" | "shared"

      Private (the default) or shared: at least one active artifact

    • sharingChatSessionSharing

      How a shared session is shared: its newest active artifact

      • artifactIdstringrequired
      • versionintegerrequired
      • audienceArtifactAudiencerequired

        Who may read an artifact, besides its author: inside the organization, the whole organization, chosen teams (their members and the members of the teams under them) or chosen people; outside it, named people by email (external) or anyone with the link (public). Readers outside the organization see the kind only.

        • kind"org" | "teams" | "people" | "external" | "public"required
        • teamsarray of stringrequired

          Team slugs (kind teams)

        • peoplearray of stringrequired

          Members' emails (kind people); the outsiders with access (kind external). Empty for readers outside the organization.

      • allowContinuebooleanrequired
      • urlstringrequired

        The link to hand out: a public link (kind public), the fast viewer (kind external), else the artifact in Nexus UI; absolute when the Gateway knows Nexus UI's URL (NEXUS_UI_URL), else a path

      • pathstringrequired

        /app/<org>/artifacts/<id>

      • viewerUrlstring

        The fast viewer: <origin>/a/<id>

      • publicUrlstring

        Kind public: <origin>/a/<token>

      • expiresAtstring (date-time)

        Kind public: when the link stops opening

    • artifactsarray of ArtifactLink

      Every version shared from this session, newest first (revoked ones included)

      • idstringrequired
      • versionintegerrequired

        min 1

      • status"active" | "revoked"required
      • audience"org" | "teams" | "people" | "external" | "public"required
      • createdAtstring (date-time)required
      • revokedAtstring (date-time)
    • authorArtifactAuthor

      You (listed and read sessions)

      • emailstring
      • namestring
    • forkedFromobject

      The artifact this session continues (POST /v1/artifacts/{id}/continue)

      • artifactIdstringrequired
      • versionintegerrequired
      • titlestring
  • instructionstringrequired

    Send it as the chat's next message: the comment, with the passage it is about

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/pages/<id>/comments/<commentId>/ask" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Ask nexus on page comments

post/v1/pages/{id}/comments/ask

Ask Nexus to make the changes several threads ask for, in one chat (the page's owner only, else 403 page_owner_only): the threads threadIds names (a reply names its thread), else every open thread, oldest first. Opens a new chat of yours that holds the page's latest version, posts a reply in each thread that names the chat, and answers one instruction with every comment and its passage or pin. 400 page_comment_none_open when there is none, page_comment_ask_limit above 50 threads, page_comment_ask_too_long when the instruction would pass a chat message's 32000 characters; 404 page_comment_not_found for an id not on the page. That turn is an ordinary chat turn, billed to you. Audited as chat.session_created.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • Idempotency-Keyheader · string

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

Request body (optional) · application/json

  • threadIdsarray of string

    The threads to send (a reply's id names its thread); unset: every open thread

    at most 50 items

Responses

201Createdapplication/json

  • commentsarray of PageCommentrequired

    The reply in each thread, in the threads' order

    • idstringrequired

      pcm_…

    • pageIdstringrequired
    • threadIdstring

      The thread's first comment; absent on that first comment

    • authorstring

      The author's name or email. Absent for a reader outside the page's organization, except on their own comments

    • minebooleanrequired

      Whether you wrote it

    • bodystringrequired
    • quotestring

      The passage the thread is about

    • prefixstring

      Up to 200 characters just before the passage, to find it again in a later version

    • suffixstring

      Up to 200 characters just after the passage

    • pinPagePin

      The point on a design's board the thread is pinned to

      • boardstringrequired

        The board's data-id, else its data-artboard name

        min length 1 · max length 200

      • xnumberrequired

        From the board's left edge, in its pixels

        min 0 · max 100000

      • ynumberrequired

        From the board's top edge, in its pixels

        min 0 · max 100000

      • atinteger

        The part's data-nx-at: its place in the source of the comment's version

        min 0 · max 2147483647

      • tagstring

        The part's tag, lower case

        pattern ^[a-z][a-z0-9:-]{0,40}$

      • layerstring

        The part's data-layer name

        min length 1 · max length 200

      • pathstring

        The part's place under the board, as child indices: finds it again in a later version

        pattern ^\d{1,5}(\.\d{1,5}){0,63}$

      • pxnumber

        The point inside the part, as a fraction of its width; with py

        min 0 · max 1

      • pynumber

        The point inside the part, as a fraction of its height; with px

        min 0 · max 1

    • versionintegerrequired

      The version it was made on

    • resolvedAtstring (date-time)

      When the thread was resolved; absent while it is open

    • chatSessionIdstring

      The chat Ask Nexus opened, on the reply it posted

    • createdAtstring (date-time)required
  • sessionChatSessionrequired

    A chat session, private to its author unless shared as an artifact.

    • idstringrequired
    • titlestringrequired

      The first question until you rename it

    • mode"chat" | "ask"required

      chat with any model you may use; ask (Ask your code) answers from your organization's Nexus Wiki, citing its pages

    • modelstringrequired

      The model asked for: nexus/auto by default

    • lastModelstring

      The model that ran last

    • teamstring

      The team its spend is attributed to

    • archivedbooleanrequired
    • webSearchboolean

      Whether the model may search the web in this session (default false)

    • messageCountintegerrequired
    • costUsdnumberrequired

      The sum of its model calls and of the web searches that returned results, settled in the ledger; a search that fails after the provider billed it is in the ledger, not in this sum

    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required
    • visibility"private" | "shared"

      Private (the default) or shared: at least one active artifact

    • sharingChatSessionSharing

      How a shared session is shared: its newest active artifact

      • artifactIdstringrequired
      • versionintegerrequired
      • audienceArtifactAudiencerequired

        Who may read an artifact, besides its author: inside the organization, the whole organization, chosen teams (their members and the members of the teams under them) or chosen people; outside it, named people by email (external) or anyone with the link (public). Readers outside the organization see the kind only.

        • kind"org" | "teams" | "people" | "external" | "public"required
        • teamsarray of stringrequired

          Team slugs (kind teams)

        • peoplearray of stringrequired

          Members' emails (kind people); the outsiders with access (kind external). Empty for readers outside the organization.

      • allowContinuebooleanrequired
      • urlstringrequired

        The link to hand out: a public link (kind public), the fast viewer (kind external), else the artifact in Nexus UI; absolute when the Gateway knows Nexus UI's URL (NEXUS_UI_URL), else a path

      • pathstringrequired

        /app/<org>/artifacts/<id>

      • viewerUrlstring

        The fast viewer: <origin>/a/<id>

      • publicUrlstring

        Kind public: <origin>/a/<token>

      • expiresAtstring (date-time)

        Kind public: when the link stops opening

    • artifactsarray of ArtifactLink

      Every version shared from this session, newest first (revoked ones included)

      • idstringrequired
      • versionintegerrequired

        min 1

      • status"active" | "revoked"required
      • audience"org" | "teams" | "people" | "external" | "public"required
      • createdAtstring (date-time)required
      • revokedAtstring (date-time)
    • authorArtifactAuthor

      You (listed and read sessions)

      • emailstring
      • namestring
    • forkedFromobject

      The artifact this session continues (POST /v1/artifacts/{id}/continue)

      • artifactIdstringrequired
      • versionintegerrequired
      • titlestring
  • instructionstringrequired

    Send it as the chat's next message: every comment, numbered, with its passage or pin

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 POST "$NEXUS_URL/v1/pages/<id>/comments/ask" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "threadIds": [
      "<threadId>"
    ]
  }'

Ask nexus on page board

post/v1/pages/{id}/boards/ask

Ask Nexus about one board of a design (the page's owner only, else 403 page_owner_only): regenerate it, make 3 variants of it under it (each data-status="proposed" with data-variant-of and a one-line data-note), or keep a variant in place of its original. Opens a new chat of yours that holds the page's latest version and answers the instruction to send there as its first message, so that turn writes the next version and the one before stays in the versions. 400 when ask or board is malformed (read after the page's access check); 404 page_board_not_found when the latest version has no board with that data-id. That turn is an ordinary chat turn, billed to you. Audited as chat.session_created.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • Idempotency-Keyheader · string

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

Request body · application/json

  • ask"regenerate" | "variants" | "keep"required

    Regenerate: write that board again. variants: add 3 proposed variants under it. keep: keep this variant in place of its original

  • boardstringrequired

    The board's data-id (for keep, the variant's)

    pattern ^[A-Za-z0-9_.:-]{1,64}$

Responses

201Createdapplication/json

  • sessionChatSessionrequired

    A chat session, private to its author unless shared as an artifact.

    • idstringrequired
    • titlestringrequired

      The first question until you rename it

    • mode"chat" | "ask"required

      chat with any model you may use; ask (Ask your code) answers from your organization's Nexus Wiki, citing its pages

    • modelstringrequired

      The model asked for: nexus/auto by default

    • lastModelstring

      The model that ran last

    • teamstring

      The team its spend is attributed to

    • archivedbooleanrequired
    • webSearchboolean

      Whether the model may search the web in this session (default false)

    • messageCountintegerrequired
    • costUsdnumberrequired

      The sum of its model calls and of the web searches that returned results, settled in the ledger; a search that fails after the provider billed it is in the ledger, not in this sum

    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required
    • visibility"private" | "shared"

      Private (the default) or shared: at least one active artifact

    • sharingChatSessionSharing

      How a shared session is shared: its newest active artifact

      • artifactIdstringrequired
      • versionintegerrequired
      • audienceArtifactAudiencerequired

        Who may read an artifact, besides its author: inside the organization, the whole organization, chosen teams (their members and the members of the teams under them) or chosen people; outside it, named people by email (external) or anyone with the link (public). Readers outside the organization see the kind only.

        • kind"org" | "teams" | "people" | "external" | "public"required
        • teamsarray of stringrequired

          Team slugs (kind teams)

        • peoplearray of stringrequired

          Members' emails (kind people); the outsiders with access (kind external). Empty for readers outside the organization.

      • allowContinuebooleanrequired
      • urlstringrequired

        The link to hand out: a public link (kind public), the fast viewer (kind external), else the artifact in Nexus UI; absolute when the Gateway knows Nexus UI's URL (NEXUS_UI_URL), else a path

      • pathstringrequired

        /app/<org>/artifacts/<id>

      • viewerUrlstring

        The fast viewer: <origin>/a/<id>

      • publicUrlstring

        Kind public: <origin>/a/<token>

      • expiresAtstring (date-time)

        Kind public: when the link stops opening

    • artifactsarray of ArtifactLink

      Every version shared from this session, newest first (revoked ones included)

      • idstringrequired
      • versionintegerrequired

        min 1

      • status"active" | "revoked"required
      • audience"org" | "teams" | "people" | "external" | "public"required
      • createdAtstring (date-time)required
      • revokedAtstring (date-time)
    • authorArtifactAuthor

      You (listed and read sessions)

      • emailstring
      • namestring
    • forkedFromobject

      The artifact this session continues (POST /v1/artifacts/{id}/continue)

      • artifactIdstringrequired
      • versionintegerrequired
      • titlestring
  • instructionstringrequired

    Send it as the chat's next message: what to do with the board, by its data-id

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 POST "$NEXUS_URL/v1/pages/<id>/boards/ask" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "ask": "regenerate",
    "board": "<board>"
  }'

Frame page version

get/v1/pages/{id}/versions/{version}/frame

Your own preview of a version, or of the page's live state (live: its unsaved preview, else its latest version): a signed URL on the sandbox origin, valid five minutes. 503 pages_viewer_unconfigured when this Gateway has no sandbox origin.

chat.useEvery memberTry it in the API Explorer

Parameters

  • siteVersionquery · integer

    Request signed routes for this exact authorized saved Site version.

  • idpath · stringrequired

    The page's id (pag_…)

  • versionpath · stringrequired

    A version number, latest, or live

Responses

200OKapplication/json

  • siteRoutesarray of SiteFrameRoute

    The root and signed additional routes of the authorized saved Site version.

    • pathstringrequired
    • titlestringrequired
    • urlstringrequired
  • urlstring (uri)required

    The signed URL on the sandbox origin; frame it with sandbox="allow-scripts" only

  • expiresAtstring (date-time)required

    When the URL stops opening; mint another to reload

  • pageIdstringrequired
  • versionintegerrequired
  • format"html" | "md" | "jsx" | "sheet" | "board"required
  • titlestringrequired

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 "$NEXUS_URL/v1/pages/<id>/versions/<version>/frame" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Get page poster

get/v1/pages/{id}/versions/{version}/poster

A small WebP picture of a page version (640 by 400), for the Artifacts library's cards. Only html, jsx and md pages have one; any other format is 404 poster_unavailable. The page checker renders it on the first request, and Gateway stores it; later requests serve the stored bytes. Without a checker, 503 poster_not_configured; a busy checker is 503 poster_busy; a checker that cannot render the page is 404 poster_unavailable; any other failure is 502 poster_failed. To whoever may open the version: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. A person only.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • versionpath · stringrequired

    A version number, or latest: the newest version the caller may open

Responses

200The poster (image/webp, 640 by 400). Like every credentialed answer, it is cache-control: no-store.image/webp

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

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/pages/<id>/versions/<version>/poster" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

List page storage

get/v1/pages/{id}/storage/{scope}

A page's storage: the keys of one scope, in order. To whoever may open the page: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. A person only: a public link's reader with no Nexus identity is refused.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • scopepath · stringrequired

    personal: the caller's own copy, which no other reader sees. shared: one copy for everyone who may open the page

  • prefixquery · string

    Only the keys that start with it

  • limitquery · integer

    At most this many (default 1000)

  • cursorquery · string

    nextCursor from the previous list

Responses

200OKapplication/json

  • scope"personal" | "shared"required
  • prefixstringrequired
  • keysarray of stringrequired
  • nextCursorstring

    Pass as cursor for the next keys; absent on the last list

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 "$NEXUS_URL/v1/pages/<id>/storage/<scope>" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Get page storage value

get/v1/pages/{id}/storage/{scope}/{key}

One value of a page's storage. 404 page_storage_key_not_found when the key has none. To whoever may open the page: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. A person only: a public link's reader with no Nexus identity is refused.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • scopepath · stringrequired

    personal: the caller's own copy, which no other reader sees. shared: one copy for everyone who may open the page

  • keypath · stringrequired

    1 to 200 characters, with no whitespace, control character, slash, backslash or quote, and not . or .. (400 page_storage_key_invalid)

Responses

200OKapplication/json

  • keystringrequired
  • scope"personal" | "shared"required
  • valuestringrequired
  • 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/pages/<id>/storage/<scope>/<key>" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Set page storage value

put/v1/pages/{id}/storage/{scope}/{key}

Write one value of a page's storage, replacing the key's. Text only: 400 page_storage_value_invalid for anything else; 413 page_storage_value_too_large over 5 MiB; 413 page_storage_full when the caller would reach over 20 MiB of keys and values on the page: the shared scope and their own personal one. Other readers' personal values do not count. Not audited. To whoever may open the page: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. A person only: a public link's reader with no Nexus identity is refused.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • scopepath · stringrequired

    personal: the caller's own copy, which no other reader sees. shared: one copy for everyone who may open the page

  • keypath · stringrequired

    1 to 200 characters, with no whitespace, control character, slash, backslash or quote, and not . or .. (400 page_storage_key_invalid)

  • Idempotency-Keyheader · string

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

Request body · application/json

  • valuestringrequired

    UTF-8 text of at most 5 MiB, without NUL; store JSON as text

    max length 5242880

Responses

200Writtenapplication/json

  • keystringrequired
  • scope"personal" | "shared"required
  • bytesintegerrequired

    The key's and the value's size in UTF-8 bytes, as the page's 20 MiB counts them

  • 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/pages/<id>/storage/<scope>/<key>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "<value>"
  }'

Delete page storage value

DEL/v1/pages/{id}/storage/{scope}/{key}

Delete one value of a page's storage. A missing key is no error (deleted: false). Deleting the page deletes all of its storage. To whoever may open the page: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. A person only: a public link's reader with no Nexus identity is refused.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • scopepath · stringrequired

    personal: the caller's own copy, which no other reader sees. shared: one copy for everyone who may open the page

  • keypath · stringrequired

    1 to 200 characters, with no whitespace, control character, slash, backslash or quote, and not . or .. (400 page_storage_key_invalid)

  • Idempotency-Keyheader · string

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

Responses

200OKapplication/json

  • keystringrequired
  • scope"personal" | "shared"required
  • deletedbooleanrequired

    Whether there was a value

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/pages/<id>/storage/<scope>/<key>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

List page files

get/v1/pages/{id}/files

A page version's data files, by name, without their bytes: read-only copies of the files its source names, attached in the chat that wrote it. To whoever may open the page: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. A person only: a public link's reader with no Nexus identity is refused.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • versionquery · string

    The version whose files to read: one the caller may open. Default: the newest they may open (a pinned share's version). Another is 404 page_not_found.

Responses

200OKapplication/json

  • filesarray of PageFilerequired
    • namestringrequired
    • mediaType"text/csv" | "text/tab-separated-values" | "application/json" | "text/plain" | "text/markdown" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"required
    • bytesintegerrequired
    • versionintegerrequired

      The page version it belongs to

    • createdAtstring (date-time)required
    • datastring

      Standard base64. Only when one file is read (getPageFile)

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 "$NEXUS_URL/v1/pages/<id>/files" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Get page file

get/v1/pages/{id}/files/{name}

One of a page version's data files with its bytes, for the page's window.fs.readFile. 404 page_file_not_found when it has none by that name. To whoever may open the page: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. A person only: a public link's reader with no Nexus identity is refused.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • namepath · stringrequired

    The file's name

  • versionquery · string

    The version whose files to read: one the caller may open. Default: the newest they may open (a pinned share's version). Another is 404 page_not_found.

Responses

200OKapplication/json

  • namestringrequired
  • mediaType"text/csv" | "text/tab-separated-values" | "application/json" | "text/plain" | "text/markdown" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"required
  • bytesintegerrequired
  • versionintegerrequired

    The page version it belongs to

  • createdAtstring (date-time)required
  • datastring

    Standard base64. Only when one file is read (getPageFile)

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 "$NEXUS_URL/v1/pages/<id>/files/Platform" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

List page queries

get/v1/pages/{id}/queries

A page's queries (Nexus Data), by name. Its owner reads every field, pending ones included. A reader who is not the owner reads only the approved ones' names, parameters and refresh intervals, never a statement or a connection. To whoever may open the page: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. 403 page_queries_off while the organization's artifacts.pages.queries is off (the default). A person only.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

Responses

200OKapplication/json

  • queriesarray of PageQueryrequired
    • namestringrequired
    • paramsarray of PageQueryParamrequired
      • namestringrequired

        pattern ^[A-Za-z][A-Za-z0-9_]{0,62}$

      • type"text" | "integer" | "number" | "boolean" | "date"required

        date is YYYY-MM-DD

      • defaultany

        What a run that names no value binds, of the parameter's type; with none, a run must name one

    • refreshSecondsintegerrequired

      How long a result is reused before a run reads it again

      min 60 · max 86400

    • status"approved" | "pending"

      The owner's only. pending: chat proposed it and the owner has not approved it

    • connector"postgres" | "snowflake"

      The owner's only

    • accountstring

      The owner's only: the connection's account, as GET /v1/connections lists it

    • statementstring

      The owner's only

    • statementSha256string

      The owner's only

    • reasonstring

      The owner's only: why it was proposed

    • proposedBystring

      The owner's only

    • approvedBystring

      The owner's only

    • approvedAtstring (date-time)

      The owner's only

    • createdAtstring (date-time)

      The owner's only

    • updatedAtstring (date-time)

      The owner's only

    • lastReadAtstring (date-time)

      When its most recent result was read: every reader sees it

    • lastRowCountinteger

      The owner's only: that result's rows

    • lastErrorPageQueryError

      The owner's only: why its last refresh failed

      • codestringrequired
      • messagestringrequired

        Fixed per code: never the database's own message

  • ownerbooleanrequired

    Whether the caller owns the page and reads every field

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/pages/<id>/queries" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Save page query

put/v1/pages/{id}/queries/{name}

Save and approve one of your page's queries (Nexus Data): a new one, or a change to one, a pending one included. One SELECT or WITH statement on a connection of postgres or snowflake that you may use, as a call of yours would pick it (403 connection_required, connector_disabled or not_granted otherwise). 503 page_query_unconfigured when this Gateway does not offer the connector. Parameters are declared with a type and bound as $1, $2… when it runs, never spliced into the text; a Snowflake query declares none. 400 page_query_statement_invalid for anything but one SELECT or WITH of at most 100,000 bytes, page_query_connector_unsupported, page_query_params_invalid, page_query_refresh_invalid, page_query_limit past 20 per page. Only the page's owner: 403 page_query_owner_only for a reader, 404 page_not_found for anyone else; 403 page_queries_off while artifacts.pages.queries is off. Audited as page_query.saved, with the statement's SHA-256, never its text. 201 when new, 200 when changed.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • namepath · stringrequired

    The query's name: what the page's code passes to window.nexus.query

  • Idempotency-Keyheader · string

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

Request body · application/json

  • connector"postgres" | "snowflake"required
  • accountstringrequired

    The connection: its account, name or host, as a connector call's account names it

  • statementstringrequired

    One SELECT or WITH statement, with $1-style parameters

    max length 100000

  • paramsarray of PageQueryParam

    at most 10 items

    • namestringrequired

      pattern ^[A-Za-z][A-Za-z0-9_]{0,62}$

    • type"text" | "integer" | "number" | "boolean" | "date"required

      date is YYYY-MM-DD

    • defaultany

      What a run that names no value binds, of the parameter's type; with none, a run must name one

  • refreshSecondsinteger

    min 60 · max 86400 · default 300

  • reasonstring

    max length 500

Responses

200Changedapplication/json

  • queryPageQueryrequired

    One of a page's queries (Nexus Data). A reader who is not the page's owner gets name, params and refreshSeconds only

    • namestringrequired
    • paramsarray of PageQueryParamrequired
      • namestringrequired

        pattern ^[A-Za-z][A-Za-z0-9_]{0,62}$

      • type"text" | "integer" | "number" | "boolean" | "date"required

        date is YYYY-MM-DD

      • defaultany

        What a run that names no value binds, of the parameter's type; with none, a run must name one

    • refreshSecondsintegerrequired

      How long a result is reused before a run reads it again

      min 60 · max 86400

    • status"approved" | "pending"

      The owner's only. pending: chat proposed it and the owner has not approved it

    • connector"postgres" | "snowflake"

      The owner's only

    • accountstring

      The owner's only: the connection's account, as GET /v1/connections lists it

    • statementstring

      The owner's only

    • statementSha256string

      The owner's only

    • reasonstring

      The owner's only: why it was proposed

    • proposedBystring

      The owner's only

    • approvedBystring

      The owner's only

    • approvedAtstring (date-time)

      The owner's only

    • createdAtstring (date-time)

      The owner's only

    • updatedAtstring (date-time)

      The owner's only

    • lastReadAtstring (date-time)

      When its most recent result was read: every reader sees it

    • lastRowCountinteger

      The owner's only: that result's rows

    • lastErrorPageQueryError

      The owner's only: why its last refresh failed

      • codestringrequired
      • messagestringrequired

        Fixed per code: never the database's own message

  • createdbooleanrequired

201Createdapplication/json

  • queryPageQueryrequired

    One of a page's queries (Nexus Data). A reader who is not the page's owner gets name, params and refreshSeconds only

    • namestringrequired
    • paramsarray of PageQueryParamrequired
      • namestringrequired

        pattern ^[A-Za-z][A-Za-z0-9_]{0,62}$

      • type"text" | "integer" | "number" | "boolean" | "date"required

        date is YYYY-MM-DD

      • defaultany

        What a run that names no value binds, of the parameter's type; with none, a run must name one

    • refreshSecondsintegerrequired

      How long a result is reused before a run reads it again

      min 60 · max 86400

    • status"approved" | "pending"

      The owner's only. pending: chat proposed it and the owner has not approved it

    • connector"postgres" | "snowflake"

      The owner's only

    • accountstring

      The owner's only: the connection's account, as GET /v1/connections lists it

    • statementstring

      The owner's only

    • statementSha256string

      The owner's only

    • reasonstring

      The owner's only: why it was proposed

    • proposedBystring

      The owner's only

    • approvedBystring

      The owner's only

    • approvedAtstring (date-time)

      The owner's only

    • createdAtstring (date-time)

      The owner's only

    • updatedAtstring (date-time)

      The owner's only

    • lastReadAtstring (date-time)

      When its most recent result was read: every reader sees it

    • lastRowCountinteger

      The owner's only: that result's rows

    • lastErrorPageQueryError

      The owner's only: why its last refresh failed

      • codestringrequired
      • messagestringrequired

        Fixed per code: never the database's own message

  • createdbooleanrequired

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/pages/<id>/queries/Platform" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "connector": "postgres",
    "account": "<account>",
    "statement": "<statement>"
  }'

Delete page query

DEL/v1/pages/{id}/queries/{name}

Remove one of your page's queries, approved or pending. The page's code gets 404 page_query_not_found for it from then on. Only the page's owner: 403 page_query_owner_only for a reader, 404 page_not_found for anyone else; 403 page_queries_off while artifacts.pages.queries is off. Audited as page_query.deleted.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • namepath · stringrequired

    The query's name: what the page's code passes to window.nexus.query

  • Idempotency-Keyheader · string

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

Responses

200OKapplication/json

  • namestringrequired
  • deletedtruerequired

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/pages/<id>/queries/Platform" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Run page query

post/v1/pages/{id}/queries/{name}/run

A page query's result (Nexus Data): the snapshot every reader of the page shares for these parameter values. A run inside the query's refresh interval answers it; past it, Gateway reads it again as the query's approver, one refresh at a time, and announces the new result on the page's events (query). The body names parameter values, and refresh for the owner's Refresh now: 400 page_query_run_invalid for any other field, page_query_params_invalid for an undeclared name, a missing value or a value of another type. 409 page_query_pending until the owner approves it, 404 page_query_not_found once removed. When the approver left the organization or their access to the connection ended, every snapshot of the query is deleted and the run is refused with the connector call's code (connection_required, connector_disabled, not_granted) or 409 page_query_approver_gone. 503 page_query_unconfigured when this Gateway does not offer the connector. A refresh that fails answers the last rows with error, or 502 page_query_failed with none; its message never quotes the database. 429 past 240 runs a minute per person or 2,400 per page. To whoever may open the page: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. 403 page_queries_off while artifacts.pages.queries is off. A person only.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • namepath · stringrequired

    The query's name: what the page's code passes to window.nexus.query

Request body (optional) · application/json

  • paramsobject

    The query's parameter values by name; a missing one takes its default

  • refreshboolean

    Read it again now, whatever its interval: the page's owner only (403 page_query_owner_only for a reader)

Responses

200OKapplication/json

  • namestringrequired
  • paramsKeystringrequired

    The SHA-256 of the bound values: which parameter set this is

  • columnsarray of PageQueryColumnrequired
    • namestringrequired
    • typestringrequired

      The database's type name

  • rowsarray of array of anyrequired

    Each row as an array, in the columns' order. Columns named like secrets come back as "[hidden]"

  • truncatedbooleanrequired
  • readAtstring (date-time)required
  • refreshSecondsintegerrequired
  • errorPageQueryError

    Set when the last refresh failed: these rows are older than the interval

    • codestringrequired
    • messagestringrequired

      Fixed per code: never the database's own message

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/pages/<id>/queries/Platform/run" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "params": {},
    "refresh": false
  }'

Export page

get/v1/pages/{id}/export

A page version as a file: PNG (one board, at 1x or 2x), SVG (one board, as shapes and text: its box shadows and filters are dropped, and it names its fonts without embedding them), PDF (one page per board, at its size), PPTX (one slide per board), standalone HTML (the page with the canvas, its scripts and fonts inlined) or zip (the PNGs, the HTML and the source). A Nexus Design page's boards are its top-level data-artboard elements. A Nexus Slides deck's boards are its top-level section[data-slide] elements, each at its own size, and its PPTX carries each slide's data-notes as speaker notes by default. Hidden slides are excluded. Any other html or jsx page is one board. Markdown exports as a printable PDF. It renders in the page checker's Chrome; without one, 503 export_not_configured. A board that did not render is named in x-nexus-export-failed (percent-encoded JSON, [{ board, error }]) and the others still export. To whoever may open the version: its owner, or a reader of one of its active shares; anyone else gets 404 page_not_found. A person only.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • formatquery · "png" | "svg" | "pdf" | "pptx" | "html" | "zip"required

    The file's format

  • boardquery · string

    One board or slide, by its data-id, its name or its number from 1. Required for a PNG or SVG of a design or a deck with several (400 board_required); one that matches none is 404 board_not_found.

  • scalequery · "1" | "2"

    The pixel ratio the boards render at. Default: 2 for pdf and pptx, 1 otherwise.

  • notesquery · boolean

    Include speaker notes in deck exports. Defaults to true in PowerPoint and false in PDF.

  • versionquery · string

    The version to export: one the caller may open. Default: the newest they may open.

Responses

200The file, as an attachment; x-nexus-export-failed names the boards that did not renderimage/png

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

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 "$NEXUS_URL/v1/pages/<id>/export?format=png" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Remix artifact

post/v1/artifacts/{id}/remix

Remix a shared page (its artifact's id, or a public link's token): copy the version it shows into a new page of your own, in the organization you call with, and open a new chat on the copy, so the chat's next write_page writes its version 2. The original page and its shares do not change. Needs your organization's pages on (403 pages_off). A page shared in one of your organizations is remixed there (403 stays_in_organization). From outside the sharer's organization, its artifacts.external.continue must be on (403 external_remix_off). A shared chat id returns 404 artifact_not_found. A shared chat's public token returns 400 not_a_page. Audited as page.created (via remix) and chat.session_created.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…), or a public link's token

  • Idempotency-Keyheader · string

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

Responses

201Createdapplication/json

  • pagePageSummaryrequired
    • idstringrequired

      pag_…

    • titlestringrequired

      The latest version's title

    • format"html" | "md" | "jsx" | "sheet" | "board"required
    • latestVersionintegerrequired
    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required

      When the latest version was written

  • versionPageVersionrequired
    • pageIdstringrequired
    • versionintegerrequired
    • titlestringrequired
    • contentSha256stringrequired

      The content's SHA-256, lowercase hex

    • bytesintegerrequired

      The content's size in bytes (UTF-8)

    • createdVia"chat_tool" | "api" | "cli" | "restore" | "remix"required
    • restoredFrominteger

      A restore's source version

    • remixedFromPageRemixedFrom

      A remix's source: the share it was read through and the page version it copies.

      • artifactIdstringrequired
      • pageIdstringrequired
      • versionintegerrequired
    • createdAtstring (date-time)required
  • sessionChatSessionrequired

    A chat session, private to its author unless shared as an artifact.

    • idstringrequired
    • titlestringrequired

      The first question until you rename it

    • mode"chat" | "ask"required

      chat with any model you may use; ask (Ask your code) answers from your organization's Nexus Wiki, citing its pages

    • modelstringrequired

      The model asked for: nexus/auto by default

    • lastModelstring

      The model that ran last

    • teamstring

      The team its spend is attributed to

    • archivedbooleanrequired
    • webSearchboolean

      Whether the model may search the web in this session (default false)

    • messageCountintegerrequired
    • costUsdnumberrequired

      The sum of its model calls and of the web searches that returned results, settled in the ledger; a search that fails after the provider billed it is in the ledger, not in this sum

    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required
    • visibility"private" | "shared"

      Private (the default) or shared: at least one active artifact

    • sharingChatSessionSharing

      How a shared session is shared: its newest active artifact

      • artifactIdstringrequired
      • versionintegerrequired
      • audienceArtifactAudiencerequired

        Who may read an artifact, besides its author: inside the organization, the whole organization, chosen teams (their members and the members of the teams under them) or chosen people; outside it, named people by email (external) or anyone with the link (public). Readers outside the organization see the kind only.

        • kind"org" | "teams" | "people" | "external" | "public"required
        • teamsarray of stringrequired

          Team slugs (kind teams)

        • peoplearray of stringrequired

          Members' emails (kind people); the outsiders with access (kind external). Empty for readers outside the organization.

      • allowContinuebooleanrequired
      • urlstringrequired

        The link to hand out: a public link (kind public), the fast viewer (kind external), else the artifact in Nexus UI; absolute when the Gateway knows Nexus UI's URL (NEXUS_UI_URL), else a path

      • pathstringrequired

        /app/<org>/artifacts/<id>

      • viewerUrlstring

        The fast viewer: <origin>/a/<id>

      • publicUrlstring

        Kind public: <origin>/a/<token>

      • expiresAtstring (date-time)

        Kind public: when the link stops opening

    • artifactsarray of ArtifactLink

      Every version shared from this session, newest first (revoked ones included)

      • idstringrequired
      • versionintegerrequired

        min 1

      • status"active" | "revoked"required
      • audience"org" | "teams" | "people" | "external" | "public"required
      • createdAtstring (date-time)required
      • revokedAtstring (date-time)
    • authorArtifactAuthor

      You (listed and read sessions)

      • emailstring
      • namestring
    • forkedFromobject

      The artifact this session continues (POST /v1/artifacts/{id}/continue)

      • artifactIdstringrequired
      • versionintegerrequired
      • titlestring

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/artifacts/<id>/remix" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Get page frame content

get/v1/page-frames/{pageId}/{version}

The bytes a signed frame URL names (a version, or live: the page's preview, else its latest version), for the sandbox host (which checks the same signature and serves them with the page's CSP). No credential but the signature: 403 page_frame_invalid when it is wrong or expired. Plain text here: Gateway's origin never runs a page.

publicAnyone, signed in or notTry it in the API Explorer

Parameters

  • sitePathquery · string

    The canonical path covered by a saved Site route signature.

  • pageIdpath · stringrequired

    The page's id (pag_…)

  • versionpath · stringrequired

    The version number, or live

  • expquery · integerrequired

    When the URL stops opening (unix seconds)

  • sigquery · stringrequired

    HMAC-SHA256 of the page, version and exp, hex

Responses

200The source, `text/plain`; `x-nexus-page-format` (html, md, jsx or sheet) and `x-nexus-page-version` name it; `x-nexus-design-system` names the design system it links, when it links onetext/plain

string

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
404not_foundNothing matches the path in your organization

Example

curl
curl "$NEXUS_URL/v1/page-frames/<pageId>/<version>?exp=1&sig=%3Csig%3E"

Check page

post/v1/pages/{id}/check

Check a design: load a version of an html or jsx page you may open in the page checker, with the CSS of the design system it links (else the organization's default), and list the colours, font sizes and spacing that are not on its tokens, and text below WCAG AA contrast. It never changes the page. Each finding names its board, its layer and a selector, and its box from the board's corner. 400 page_check_unsupported for Markdown, 503 page_check_not_configured without a page checker, 502 page_check_failed when it does not answer.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The page's id (pag_…)

  • Idempotency-Keyheader · string

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

Request body (optional) · application/json

  • versioninteger

    The version to check (default: the latest)

    min 1

Responses

200What Check foundapplication/json

  • pageIdstringrequired
  • versionintegerrequired
  • designSystemDesignSystemrequired

    A design system for Nexus Design, as the organization lists it.

    • idstringrequired

      ds_…; the built-in is ds_nexus_brand

    • namestringrequired

      @nexus/brand, or the organization's own name (acme, @acme/web)

    • builtInbooleanrequired

      Compiled into Gateway: it cannot be changed or deleted

    • isDefaultbooleanrequired

      The organization's default: new designs use it

    • sourcestringrequired

      Where it came from, in words

    • variableCountintegerrequired
    • componentCountintegerrequired
    • updatedAtstring (date-time)

      Unset for the built-in

  • linkedbooleanrequired

    Whether the page links it; else it is the organization's default

  • findingsarray of PageCheckFindingrequired

    at most 200 items

    • kind"color" | "font-size" | "spacing" | "contrast" | "overflow" | "clipped-text" | "outside-board" | "misaligned-rows"required
    • boardstring

      The board's data-artboard name

    • boardIdstring

      The board's data-id

    • layerstring

      The nearest data-layer name

    • selectorstringrequired

      A CSS selector for the element, from its board

    • boxPageCheckBoxrequired

      CSS pixels from the board's top-left corner (the page's, outside a board).

      • xnumberrequired
      • ynumberrequired
      • wnumberrequired
      • hnumberrequired
    • propertystringrequired
    • valuestringrequired

      The computed value

    • expectedstring

      The nearest token, or the contrast needed

    • rationumber

      A contrast finding's ratio

    • messagestringrequired
  • countsPageCheckCountsrequired

    Findings by kind, before the list is cut.

    • colorintegerrequired
    • fontSizeintegerrequired
    • spacingintegerrequired
    • contrastintegerrequired
    • overflowinteger
    • clippedTextinteger
    • outsideBoardinteger
    • misalignedRowsinteger
  • truncatedbooleanrequired
  • elementsintegerrequired

    How many elements were checked

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
429rate_limit_errorToo many requests from this key in a minute

Example

curl
curl -X POST "$NEXUS_URL/v1/pages/<id>/check" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "version": 1
  }'

Get page frame design system

get/v1/page-frames/{pageId}/{version}/design-system

The CSS custom properties of the design system a framed page links, for the sandbox host to inject before the page's own styles, under the same signature as the page's bytes. The page's frame answer names the link in x-nexus-design-system. 204 when the page links none, or one its organization does not have.

publicAnyone, signed in or notTry it in the API Explorer

Parameters

  • sitePathquery · string

    The canonical path covered by a saved Site route signature.

  • pageIdpath · stringrequired

    The page's id (pag_…)

  • versionpath · stringrequired

    The version number, or live

  • expquery · integerrequired

    When the URL stops opening (unix seconds)

  • sigquery · stringrequired

    HMAC-SHA256 of the page, version and exp, hex

Responses

200`text/css`: only `selector { --name: value; }` blockstext/css

string

204The page links no design system

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
404not_foundNothing matches the path in your organization

Example

curl
curl "$NEXUS_URL/v1/page-frames/<pageId>/<version>/design-system?exp=1&sig=%3Csig%3E"