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

API reference

Artifacts

Nexus Artifacts: a chat session shared as an immutable snapshot (its messages, sources, the model of each answer, mode, title, author and cost). Inside the organization: the whole organization, chosen teams or chosen people. Outside it, as the organization's settings allow (artifacts.external*: on, with public links, by default): named people by email, who open it signed in with that verified email (a forwarded link opens for nobody else, who can ask for access), or anyone with an unguessable link, never indexed, optionally expiring. Readers outside see the author's name and the organization's name, never the cost, the author's email or team names, and Ask your code's sources only when the organization allows it and the author included them. Sharing again makes a new version; each version survives the chat being edited or deleted, is revocable at once, and is kept for the organization's chat retention from the moment it was shared. Owners and admins see everything shared outside, with open counts, and revoke in bulk. Every artifact and chat downloads as Markdown.

View as Markdown

Share chat session

post/v1/chat/sessions/{id}/share

Share one of your sessions as an artifact: a snapshot for the organization, chosen teams or chosen people, or outside it (named people by email, or anyone with the link) as its settings allow. Sharing again makes a new version. Audited as artifact.shared.

artifacts.shareEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The session's id (chs_…)

  • 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)

  • allowContinueboolean

    default false

  • includeCodeboolean

    Kinds external and public: keep Ask your code's sources (refused, 403 external_code_not_allowed, unless artifacts.external.code is on)

  • 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

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

404No such session among yours (`chat_session_not_found`): someone else's session answers the same.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
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
404No such session among yours (`chat_session_not_found`): someone else's session answers the same.
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/chat/sessions/<id>/share" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "audience": "org"
  }'

Unshare chat session

DEL/v1/chat/sessions/{id}/share

Make one of your sessions private again ("Only you"): every active version of its artifact is revoked at once, and Nexus UI's cached pages go with them. Nothing shared is a no-op. Audited as artifact.revoked per version.

artifacts.shareEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The session's id (chs_…)

  • Idempotency-Keyheader · string

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

Responses

200OKapplication/json

  • sessionIdstringrequired
  • visibility"private"required
  • revokedarray of objectrequired

    The versions revoked now, oldest first; empty when nothing was shared.

    • idstringrequired
    • versionintegerrequired

404No such session among yours (`chat_session_not_found`): someone else's session answers the same.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
404No such session among yours (`chat_session_not_found`): someone else's session answers the same.
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/chat/sessions/<id>/share" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Export chat session

get/v1/chat/sessions/{id}/export.md

One of your sessions as Markdown: YAML front matter, the conversation, sources as links, the cost per answer and in total.

chat.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The session's id (chs_…)

Responses

200Markdown with YAML front mattertext/markdown

string

404No such session among yours (`chat_session_not_found`): someone else's session answers the same.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
404No such session among yours (`chat_session_not_found`): someone else's session answers the same.
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/chat/sessions/<id>/export.md" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

List artifacts

get/v1/artifacts

Artifacts shared with you and by you, newest first; shared_with_me includes what other organizations shared with your verified email. Nexus UI's server may call it for a person with no organization.

artifacts.readEvery memberTry it in the API Explorer

Parameters

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

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

  • scopequery · "all" | "shared_with_me" | "shared_by_me"
  • statusquery · "active" | "revoked" | "all"

    Active, revoked or all (default: all you may read: every active artifact shared with or by you, and your own revoked ones, marked revoked; nobody else sees a revoked artifact)

  • sessionquery · string

    Only the versions shared from this session of yours

  • qquery · string

    Words in the title

  • limitquery · integer
  • cursorquery · string

    NextCursor of the previous page

Responses

200OKapplication/json

  • artifactsarray of Artifactrequired
    • 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

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

Share agent session

post/v1/artifacts/sessions

Share a coding-agent session (a Code session in Nexus for desktop, or a nexus claude session) as an artifact, from a snapshot your app builds: with the same audiences as a chat, as the organization's settings allow. Sharing the same session again makes a new version. Readers cannot continue it. Thinking stays out unless included. Common key and token formats are hidden, and home folders become ~; images are not checked. Audited as artifact.shared.

artifacts.shareEvery 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

  • 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

  • replaceboolean

    Revoke the session's earlier active versions in the same step, so it has exactly this audience

  • followboolean

    Keep updated: later snapshots sent with update replace this share's content in place, so its link stays the same

  • updateboolean

    Write this snapshot over the session's Keep updated share in place: same link, readers and expiry, no new version, no email. The audience fields are ignored; includeThinking must match the share (else 400). 200; no such share is 404 artifact_not_found. Audited as artifact.updated

  • includeThinkingboolean

    Keep the agent's thinking; left out by default

  • sessionobjectrequired

    The snapshot your app built from its own log. The checked timeline is at most 4 MB

    • source"desktop" | "claude-code"required
    • idstringrequired

      Your app's id for the session: the same id shares its next version

      min length 1 · max length 200

    • titlestring

      Cut to 200 characters. Absent: the first prompt's first line

    • agent"claude" | "codex" | "antigravity" | "cursor" | "opencode"

      A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.

    • modelstring

      max length 200

    • costUsdnumber

      min 0

    • startedAtinteger

      min 0

    • eventsarray of SessionEventrequired

      at most 20000 items

      • kind"user" | "text" | "thinking" | "tool" | "toolResult" | "approval" | "approvalResolved" | "usage" | "turnStart" | "turnEnd" | "task" | "notice" | "error"required
      • atinteger

        When it happened, in milliseconds

        min 0

      • idstring

        max length 200

      • textstring
      • parentstring | null

        The sub-agent's tool call that made it; absent or null: the session's own agent

        max length 200

      • namestring

        max length 200

      • inputany

        A tool's input, as the agent sent it

      • outputstring

        A tool's result: at most 64 KiB, the desktop timeline's cap

        max length 65536

      • isErrorboolean
      • truncatedboolean
      • imagesarray of string

        Ids of the request's images

      • requestIdstring

        max length 200

      • toolUseIdstring

        max length 200

      • toolstring

        max length 200

      • descriptionstring
      • decision"allow" | "allowSession" | "deny" | "expired"
      • messagestring
      • modelstring

        max length 200

      • inputTokensinteger

        min 0

      • outputTokensinteger

        min 0

      • cacheReadTokensinteger

        min 0

      • cacheWriteTokensinteger

        min 0

      • costUsdnumber

        min 0

      • turnIdstring

        max length 200

      • statusstring

        TurnEnd: completed, interrupted or error; task: running, completed, failed or stopped

      • durationMsinteger

        min 0

      • errorstring
      • taskIdstring

        max length 200

      • agentTypestring

        max length 200

      • detailstring
  • imagesarray of object

    The images the events name, at most 20 MB in all; PNG, JPEG, GIF or WebP, at most 5 MB each

    at most 32 items

    • idstringrequired

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

    • datastringrequired

      Base64, or a data: URL

    • namestring

Responses

200Updated in place (update)application/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

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

413The timeline is over 4 MB, or the images over their limits (session_too_large, image_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
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
413The timeline is over 4 MB, or the images over their limits (session_too_large, image_too_large)
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/sessions" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "audience": "org",
    "session": {
      "source": "desktop",
      "id": "<id>",
      "events": [
        {
          "kind": "user"
        }
      ]
    }
  }'

Unshare agent session

DEL/v1/artifacts/sessions/{id}

Stop sharing one of your coding sessions: every active version of its artifact is revoked at once, as a chat's unshare. Your own session with nothing active left changes nothing. A key you never shared under is 404 artifact_not_found. Each version is audited as artifact.revoked.

artifacts.shareEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The session's key (cds_…): the sessionId its share answered

  • Idempotency-Keyheader · string

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

Responses

200OKapplication/json

  • sessionIdstringrequired
  • visibility"private"required
  • revokedarray of objectrequired

    The versions revoked now, oldest first; empty when nothing was shared.

    • idstringrequired
    • versionintegerrequired

404You shared no coding session under this key (artifact_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
404You shared no coding session under this key (artifact_not_found)
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/artifacts/sessions/<id>" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Get artifact

get/v1/artifacts/{id}

An artifact shared with you (or by you), with its messages: as members see it, or (outside the organization) the external variant. Outside its audience: 404; a signed-in person with a verified email outside an external artifact's audience: 403 artifact_access_required (they may ask). A named outsider's open is counted.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…)

Responses

200OKapplication/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

  • messagesarray of ChatSessionMessagerequired

    The snapshot, oldest first; citations from repositories you cannot see are left out

    • idstringrequired
    • sessionIdstringrequired
    • role"user" | "assistant"required
    • contentstringrequired

      Markdown (a question with images may have none)

    • status"complete" | "failed" | "refused"required

      Refused: the policy or budget refused the call (error says why); failed: it broke mid-way (content is what arrived)

    • mode"chat" | "ask"

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

    • requestedModelstring
    • modelstring

      The model that ran

    • costUsdnumber
    • usageobject
      • promptTokensinteger
      • completionTokensinteger
    • citationsarray of ChatCitation
      • nintegerrequired

        The number the answer cites it by

      • repostringrequired

        Owner/name

      • pagestringrequired
      • slugstringrequired
      • sectionstring
      • pathstringrequired

        <slug>#<anchor> in the repository's wiki

      • filesarray of string

        Repository files the section names

      • runIdstringrequired

        The Nexus Wiki run that wrote the page

    • errorobject
      • codestring
      • messagestring
      • statusinteger
      • notifiedboolean

        A budget refusal told the organization's owners and admins (licensed build). Absent otherwise.

      • remainingUsdDecimalstring

        A budget refusal's remainingUsdDecimal: what was left of that level's budget, as an exact decimal. Absent when the 402 had none.

      • requestedUsdstring

        A usage-limit refusal's (usage_limit_reached) requestedUsd: the most the call may cost with Nexus's rate, as an exact decimal. Absent for any other refusal, or when the 402 had none.

      • remainingUsdstring

        A usage-limit refusal's (usage_limit_reached) remainingUsd: what this month's usage limit had left, as an exact decimal. Absent for any other refusal, or when the 402 had none.

      • detailsobject

        A 402's details, as the live error's error.nexus had them, cut to an allow-list: short codes, ways forward, notified and decimal dollar amounts. Absent for any other status, when none was kept, and on an answer stored before it.

        • reasonstring

          Why the refusal happened, such as authentication_required or disputed for payment_failed.

        • levelstring

          A budget refusal's level.

        • freeStartstring

          cheaper_models_only when the free start pays for cheaper models only.

        • nextarray of string

          The ways forward, such as billing and own_key; at most 4.

        • notifiedboolean

          The organization's owners and admins were told.

        • owedUsdstring
        • unpaidUsdstring
        • remainingUsdstring
        • remainingUsdDecimalstring
        • requestedUsdstring
        • limitUsdstring
        • chargeUsdstring
        • capUsdstring
    • createdAtstring (date-time)required
    • attachmentsarray of ChatAttachmentRef

      The images attached to a question

      • idstringrequired
      • type"image" | "file"required
      • mediaType"image/png" | "image/jpeg" | "image/gif" | "image/webp" | "text/csv" | "text/tab-separated-values" | "application/json" | "text/plain" | "text/markdown" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"required

        An image's from the bytes, not as it was named; a data file's from its extension, checked against the bytes

      • bytesintegerrequired
      • widthinteger
      • heightinteger
      • namestring
    • pageChatPageBlock

      A page this answer created or revised through write_page

      • pageIdstringrequired
      • versionintegerrequired

        min 1

      • titlestringrequired
      • format"html" | "md" | "jsx" | "sheet" | "board"required
    • skillsarray of ChatSkillBlock

      The skills this answer loaded through load_skill, in the order it loaded them. The file stays in the skills store

      • skillIdstringrequired

        Skl_… For a library skill, the library skill's id, which getSkill and getSkillVersion also take

      • namestringrequired

        The name the version had when it was served

      • versionintegerrequired

        The version served: a personal skill's latest, or a library skill's latest approved version that nobody withdrew

        min 1

      • scope"personal" | "team" | "org"

        Where the skill came from: your own skills, a team's library, or the organization's. Left out on an answer stored before skills had a scope: read it as personal

      • teamIdstring

        The team (team_…), for scope team. Map it to the team's name with listTeams

    • connectorsarray of ChatConnectorBlock

      The connector reads this answer ran through read_connector, in order. What they returned is never kept. In a shared artifact, a reader sees only the reads of connectors they may use

      • connectorstringrequired
      • operationstringrequired
      • inputobjectrequired
      • accountobject

        The connection the read ran with: whose it is and the account's name. Absent while the read streams, and on reads kept before it was recorded

        • scope"org" | "team" | "user"required
        • namestringrequired
    • sourcesarray of ChatWebSource

      The web pages this answer's searches gave the model, one per URL, in the order they were found. Only the session's author reads them; a shared artifact keeps none

      • titlestringrequired
      • urlstringrequired
      • datestring

        The page's date as the engine gave it, cut as the model read it

      • querystringrequired

        The first query in the turn that found this page

    • rewoundboolean

      Retained for the author, but excluded from future model context after a conversation rewind.

  • hiddenSourcesintegerrequired

    Citations left out: from repositories the reader cannot see, or (outside the organization) Ask your code's sources not included

  • versionsarray of ArtifactLink

    Every version of the session's artifact you can read, newest first

    • idstringrequired
    • versionintegerrequired

      min 1

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

    Member: as the organization's members see it; external: no cost, author email or team names, and no code sources unless included

  • sessionSessionSnapshot

    A shared coding-agent session (kind session): its timeline as the sharer's app showed it. Outside the organization: no cost and no usage events

    • formatintegerrequired

      1

    • source"desktop" | "claude-code"required

      Desktop: a Code session in Nexus for desktop; claude-code: a nexus claude session's Claude Code transcript

    • agent"claude" | "codex" | "antigravity" | "cursor" | "opencode"

      A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.

    • modelstring
    • costUsdnumber

      The agent's own estimate. Hidden from readers outside the organization

    • startedAtinteger

      When the session started, in milliseconds

    • thinkingbooleanrequired

      Whether the sharer included the agent's thinking

    • eventsarray of SessionEventrequired
      • kind"user" | "text" | "thinking" | "tool" | "toolResult" | "approval" | "approvalResolved" | "usage" | "turnStart" | "turnEnd" | "task" | "notice" | "error"required
      • atinteger

        When it happened, in milliseconds

        min 0

      • idstring

        max length 200

      • textstring
      • parentstring | null

        The sub-agent's tool call that made it; absent or null: the session's own agent

        max length 200

      • namestring

        max length 200

      • inputany

        A tool's input, as the agent sent it

      • outputstring

        A tool's result: at most 64 KiB, the desktop timeline's cap

        max length 65536

      • isErrorboolean
      • truncatedboolean
      • imagesarray of string

        Ids of the request's images

      • requestIdstring

        max length 200

      • toolUseIdstring

        max length 200

      • toolstring

        max length 200

      • descriptionstring
      • decision"allow" | "allowSession" | "deny" | "expired"
      • messagestring
      • modelstring

        max length 200

      • inputTokensinteger

        min 0

      • outputTokensinteger

        min 0

      • cacheReadTokensinteger

        min 0

      • cacheWriteTokensinteger

        min 0

      • costUsdnumber

        min 0

      • turnIdstring

        max length 200

      • statusstring

        TurnEnd: completed, interrupted or error; task: running, completed, failed or stopped

      • durationMsinteger

        min 0

      • errorstring
      • taskIdstring

        max length 200

      • agentTypestring

        max length 200

      • detailstring
    • imagesarray of objectrequired

      The images the events name; read each with getArtifactAttachment

      • idstringrequired
      • mediaType"image/png" | "image/jpeg" | "image/gif" | "image/webp"required
      • bytesintegerrequired
      • widthinteger
      • heightinteger
      • namestring

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

Revoke artifact

DEL/v1/artifacts/{id}

Revoke an artifact at once: its author, or an owner or admin of its organization. Nexus UI's cached page goes with it (the signed hook). Audited as artifact.revoked.

artifacts.shareEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…)

  • Idempotency-Keyheader · string

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

Responses

200OKapplication/json

  • revokedbooleanrequired
  • idstringrequired
  • versionintegerrequired

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

Export artifact

get/v1/artifacts/{id}.md

An artifact as Markdown: YAML front matter, a link back to it, the conversation, sources as links, the cost per answer and in total.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…)

Responses

200Markdown with YAML front mattertext/markdown

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/artifacts/<id>.md" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Continue artifact

post/v1/artifacts/{id}/continue

Continue an artifact (its id, or a public link's token) in a new private session of your own, in one of your organizations and at its expense (when its author allows, and from outside when artifacts.external.continue is on). Shared inside one of your organizations: in that organization (another org: 403 stays_in_organization). From outside the sharer's organization: in org when given (one of yours, else 404 not_a_member), else in the sharer's organization when you belong to it, else in your personal organization, made then if you have none. Someone Nexus does not know yet: 409 organization_required. Audited as artifact.continued in the organization the copy is made in.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…)

  • Idempotency-Keyheader · string

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

Request body (optional) · application/json

  • titlestring

    max length 120

  • teamstring
  • orgstring

    Where the copy goes: one of your organizations (a slug, an id, or personal). Default: see the summary.

Responses

201Createdapplication/json

  • 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
  • orgOrgSummaryrequired
    • idstringrequired
    • namestringrequired
    • slugstring
    • clerkOrgIdstring

      Its sign-in provider organization's id: Nexus UI's URL segment when it has no slug

    • kind"company" | "personal"required

      A company organization, or a person's own personal organization (one per person, one member)

    • role"owner" | "admin" | "member"
    • currentboolean

      The organization this request is in

    • imageUrlstring

      Its logo, as the tenant's imageUrl (https://img.clerk.com/…); unset when it has none.

  • orgCreatedbooleanrequired

    Whether that organization was made now: your personal organization, which you did not have yet.

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/artifacts/<id>/continue" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "<title>",
    "team": "platform",
    "org": "<org>"
  }'

List external artifacts

get/v1/artifacts/external

Everything the organization shared outside it, newest first, with open counts, readers, requests and reports (owners and admins).

artifacts.manage_externalOwner, AdminTry it in the API Explorer

Parameters

  • audiencequery · "external" | "public"
  • authorquery · string

    An author's email or user id

  • teamquery · string

    A team (slug or id) and the teams under it: the team of the session it was shared from

  • statusquery · "active" | "revoked" | "all"
  • qquery · string

    Words in the title

  • limitquery · integer
  • cursorquery · string

Responses

200OKapplication/json

  • artifactsarray of ExternalArtifactrequired
    • 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

    • opensintegerrequired
    • readersintegerrequired

      Named outsiders with access

    • requestsintegerrequired

      Requests for access waiting for an answer

    • reportsintegerrequired
    • teamstring

      The team of the session it was shared from

  • nextCursorstring
  • totalsobjectrequired
    • activeintegerrequired
    • namedintegerrequired
    • publicintegerrequired

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

Revoke artifacts

post/v1/artifacts/revoke

Revoke several of the organization's artifacts at once (at most 100; owners and admins). Each is audited as artifact.revoked.

artifacts.manage_externalOwner, AdminTry 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

  • idsarray of stringrequired

    at most 100 items

Responses

200OKapplication/json

  • revokedarray of objectrequired
    • idstringrequired
    • versionintegerrequired
  • skippedarray of objectrequired
    • idstringrequired
    • reason"not_found" | "already_revoked"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/artifacts/revoke" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "<id>"
    ]
  }'

Get artifact access

get/v1/artifacts/{id}/access

Who has an artifact shared outside, who asked for access, opens and reports: its author, owners and admins.

artifacts.shareEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…)

Responses

200OKapplication/json

  • idstringrequired
  • audience"org" | "teams" | "people" | "external" | "public"required
  • status"active" | "revoked"required
  • peoplearray of ArtifactAccessPersonrequired
    • emailstringrequired
    • status"granted" | "requested" | "denied" | "removed"required
    • opensintegerrequired
    • lastOpenedAtstring (date-time)
    • requestedAtstring (date-time)
    • grantedAtstring (date-time)
    • messagestring

      What the person asking wrote

  • opensintegerrequired
  • lastOpenedAtstring (date-time)
  • reportsintegerrequired
  • expiresAtstring (date-time)
  • publicUrlstring

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

Change artifact access

post/v1/artifacts/{id}/access

Grant (approve a request, or add someone), deny a request, or remove someone's access to an artifact shared with named people outside: its author, owners and admins. Audited as artifact.access_changed (counts and domains).

artifacts.shareEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…)

  • Idempotency-Keyheader · string

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

Request body · application/json

  • grantarray of string
  • denyarray of string
  • removearray of string

Responses

200OKapplication/json

  • idstringrequired
  • audience"org" | "teams" | "people" | "external" | "public"required
  • status"active" | "revoked"required
  • peoplearray of ArtifactAccessPersonrequired
    • emailstringrequired
    • status"granted" | "requested" | "denied" | "removed"required
    • opensintegerrequired
    • lastOpenedAtstring (date-time)
    • requestedAtstring (date-time)
    • grantedAtstring (date-time)
    • messagestring

      What the person asking wrote

  • opensintegerrequired
  • lastOpenedAtstring (date-time)
  • reportsintegerrequired
  • expiresAtstring (date-time)
  • publicUrlstring

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/artifacts/<id>/access" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "grant": [
      "<grant>"
    ],
    "deny": [
      "<deny>"
    ],
    "remove": [
      "<remove>"
    ]
  }'

Request artifact access

post/v1/artifacts/{id}/access-requests

Ask an artifact's author for access (someone outside its audience, signed in with a verified email). Nexus UI's server may call it for a person with no organization. Audited as artifact.access_requested (the domain).

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…)

  • Idempotency-Keyheader · string

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

Request body (optional) · application/json

  • messagestring

    max length 500

Responses

200Already answeredapplication/json

  • status"granted" | "requested" | "denied"required
  • requestedbooleanrequired

202Requestedapplication/json

  • status"requested"required
  • requestedbooleanrequired

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/artifacts/<id>/access-requests" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "<message>"
  }'

Get artifact attachment

get/v1/artifacts/{id}/attachments/{attachmentId}

An image attached to one of an artifact's questions, with its bytes as base64 (data:<mediaType>;base64,<data> shows it), to everyone who may read the artifact (getArtifact's rules: its audience inside the organization, named people outside it by verified email; its author always). The snapshot keeps its own copy, so it outlives the session. Not one of its images: 404 artifact_attachment_not_found. Reading it is not counted as an open.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…)

  • attachmentIdpath · stringrequired

    The image's id (cha_…), from the message's attachments

Responses

200The imageapplication/json

  • idstringrequired

    The image's id as the artifact's messages list it

  • artifactIdstringrequired
  • messageIdstringrequired
  • mediaType"image/png" | "image/jpeg" | "image/gif" | "image/webp"required
  • bytesintegerrequired
  • widthinteger
  • heightinteger
  • namestring
  • datastringrequired

    Standard base64

  • 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/artifacts/<id>/attachments/<attachmentId>" \
  -H "Authorization: Bearer $NEXUS_API_KEY"

Get public artifact

get/v1/public/artifacts/{token}

A public artifact through its link, as anyone holding it reads it (the external variant). No credential; never indexed (X-Robots-Tag). Revoked, expired or unknown: 404.

publicAnyone, signed in or notTry it in the API Explorer

Parameters

  • tokenpath · stringrequired

    A public link's token (the last part of /a/<token>)

Responses

200OKapplication/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

  • messagesarray of ChatSessionMessagerequired

    The snapshot, oldest first; citations from repositories you cannot see are left out

    • idstringrequired
    • sessionIdstringrequired
    • role"user" | "assistant"required
    • contentstringrequired

      Markdown (a question with images may have none)

    • status"complete" | "failed" | "refused"required

      Refused: the policy or budget refused the call (error says why); failed: it broke mid-way (content is what arrived)

    • mode"chat" | "ask"

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

    • requestedModelstring
    • modelstring

      The model that ran

    • costUsdnumber
    • usageobject
      • promptTokensinteger
      • completionTokensinteger
    • citationsarray of ChatCitation
      • nintegerrequired

        The number the answer cites it by

      • repostringrequired

        Owner/name

      • pagestringrequired
      • slugstringrequired
      • sectionstring
      • pathstringrequired

        <slug>#<anchor> in the repository's wiki

      • filesarray of string

        Repository files the section names

      • runIdstringrequired

        The Nexus Wiki run that wrote the page

    • errorobject
      • codestring
      • messagestring
      • statusinteger
      • notifiedboolean

        A budget refusal told the organization's owners and admins (licensed build). Absent otherwise.

      • remainingUsdDecimalstring

        A budget refusal's remainingUsdDecimal: what was left of that level's budget, as an exact decimal. Absent when the 402 had none.

      • requestedUsdstring

        A usage-limit refusal's (usage_limit_reached) requestedUsd: the most the call may cost with Nexus's rate, as an exact decimal. Absent for any other refusal, or when the 402 had none.

      • remainingUsdstring

        A usage-limit refusal's (usage_limit_reached) remainingUsd: what this month's usage limit had left, as an exact decimal. Absent for any other refusal, or when the 402 had none.

      • detailsobject

        A 402's details, as the live error's error.nexus had them, cut to an allow-list: short codes, ways forward, notified and decimal dollar amounts. Absent for any other status, when none was kept, and on an answer stored before it.

        • reasonstring

          Why the refusal happened, such as authentication_required or disputed for payment_failed.

        • levelstring

          A budget refusal's level.

        • freeStartstring

          cheaper_models_only when the free start pays for cheaper models only.

        • nextarray of string

          The ways forward, such as billing and own_key; at most 4.

        • notifiedboolean

          The organization's owners and admins were told.

        • owedUsdstring
        • unpaidUsdstring
        • remainingUsdstring
        • remainingUsdDecimalstring
        • requestedUsdstring
        • limitUsdstring
        • chargeUsdstring
        • capUsdstring
    • createdAtstring (date-time)required
    • attachmentsarray of ChatAttachmentRef

      The images attached to a question

      • idstringrequired
      • type"image" | "file"required
      • mediaType"image/png" | "image/jpeg" | "image/gif" | "image/webp" | "text/csv" | "text/tab-separated-values" | "application/json" | "text/plain" | "text/markdown" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"required

        An image's from the bytes, not as it was named; a data file's from its extension, checked against the bytes

      • bytesintegerrequired
      • widthinteger
      • heightinteger
      • namestring
    • pageChatPageBlock

      A page this answer created or revised through write_page

      • pageIdstringrequired
      • versionintegerrequired

        min 1

      • titlestringrequired
      • format"html" | "md" | "jsx" | "sheet" | "board"required
    • skillsarray of ChatSkillBlock

      The skills this answer loaded through load_skill, in the order it loaded them. The file stays in the skills store

      • skillIdstringrequired

        Skl_… For a library skill, the library skill's id, which getSkill and getSkillVersion also take

      • namestringrequired

        The name the version had when it was served

      • versionintegerrequired

        The version served: a personal skill's latest, or a library skill's latest approved version that nobody withdrew

        min 1

      • scope"personal" | "team" | "org"

        Where the skill came from: your own skills, a team's library, or the organization's. Left out on an answer stored before skills had a scope: read it as personal

      • teamIdstring

        The team (team_…), for scope team. Map it to the team's name with listTeams

    • connectorsarray of ChatConnectorBlock

      The connector reads this answer ran through read_connector, in order. What they returned is never kept. In a shared artifact, a reader sees only the reads of connectors they may use

      • connectorstringrequired
      • operationstringrequired
      • inputobjectrequired
      • accountobject

        The connection the read ran with: whose it is and the account's name. Absent while the read streams, and on reads kept before it was recorded

        • scope"org" | "team" | "user"required
        • namestringrequired
    • sourcesarray of ChatWebSource

      The web pages this answer's searches gave the model, one per URL, in the order they were found. Only the session's author reads them; a shared artifact keeps none

      • titlestringrequired
      • urlstringrequired
      • datestring

        The page's date as the engine gave it, cut as the model read it

      • querystringrequired

        The first query in the turn that found this page

    • rewoundboolean

      Retained for the author, but excluded from future model context after a conversation rewind.

  • hiddenSourcesintegerrequired

    Citations left out: from repositories the reader cannot see, or (outside the organization) Ask your code's sources not included

  • versionsarray of ArtifactLink

    Every version of the session's artifact you can read, newest first

    • idstringrequired
    • versionintegerrequired

      min 1

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

    Member: as the organization's members see it; external: no cost, author email or team names, and no code sources unless included

  • sessionSessionSnapshot

    A shared coding-agent session (kind session): its timeline as the sharer's app showed it. Outside the organization: no cost and no usage events

    • formatintegerrequired

      1

    • source"desktop" | "claude-code"required

      Desktop: a Code session in Nexus for desktop; claude-code: a nexus claude session's Claude Code transcript

    • agent"claude" | "codex" | "antigravity" | "cursor" | "opencode"

      A coding agent's id. It names the agent in sessions, policies and routes. Its command may differ: antigravity runs as nexus agy.

    • modelstring
    • costUsdnumber

      The agent's own estimate. Hidden from readers outside the organization

    • startedAtinteger

      When the session started, in milliseconds

    • thinkingbooleanrequired

      Whether the sharer included the agent's thinking

    • eventsarray of SessionEventrequired
      • kind"user" | "text" | "thinking" | "tool" | "toolResult" | "approval" | "approvalResolved" | "usage" | "turnStart" | "turnEnd" | "task" | "notice" | "error"required
      • atinteger

        When it happened, in milliseconds

        min 0

      • idstring

        max length 200

      • textstring
      • parentstring | null

        The sub-agent's tool call that made it; absent or null: the session's own agent

        max length 200

      • namestring

        max length 200

      • inputany

        A tool's input, as the agent sent it

      • outputstring

        A tool's result: at most 64 KiB, the desktop timeline's cap

        max length 65536

      • isErrorboolean
      • truncatedboolean
      • imagesarray of string

        Ids of the request's images

      • requestIdstring

        max length 200

      • toolUseIdstring

        max length 200

      • toolstring

        max length 200

      • descriptionstring
      • decision"allow" | "allowSession" | "deny" | "expired"
      • messagestring
      • modelstring

        max length 200

      • inputTokensinteger

        min 0

      • outputTokensinteger

        min 0

      • cacheReadTokensinteger

        min 0

      • cacheWriteTokensinteger

        min 0

      • costUsdnumber

        min 0

      • turnIdstring

        max length 200

      • statusstring

        TurnEnd: completed, interrupted or error; task: running, completed, failed or stopped

      • durationMsinteger

        min 0

      • errorstring
      • taskIdstring

        max length 200

      • agentTypestring

        max length 200

      • detailstring
    • imagesarray of objectrequired

      The images the events name; read each with getArtifactAttachment

      • idstringrequired
      • mediaType"image/png" | "image/jpeg" | "image/gif" | "image/webp"required
      • bytesintegerrequired
      • widthinteger
      • heightinteger
      • namestring

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

Example

curl
curl "$NEXUS_URL/v1/public/artifacts/<token>"

Export public artifact

get/v1/public/artifacts/{token}.md

A public artifact through its link, as Markdown (no cost, no author email). No credential.

publicAnyone, signed in or notTry it in the API Explorer

Parameters

  • tokenpath · stringrequired

    The token followed by .md

Responses

200Markdown with YAML front mattertext/markdown

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

Example

curl
curl "$NEXUS_URL/v1/public/artifacts/<token>.md"

Get public artifact attachment

get/v1/public/artifacts/{token}/attachments/{attachmentId}

An image of a public artifact through its link, with its bytes as base64. No credential; never indexed (X-Robots-Tag). Revoked, expired or unknown link: 404 artifact_not_found; not one of its images: 404 artifact_attachment_not_found.

publicAnyone, signed in or notTry it in the API Explorer

Parameters

  • tokenpath · stringrequired

    A public link's token (the last part of /a/<token>)

  • attachmentIdpath · stringrequired

    The image's id (cha_…), from the message's attachments

Responses

200The imageapplication/json

  • idstringrequired

    The image's id as the artifact's messages list it

  • artifactIdstringrequired
  • messageIdstringrequired
  • mediaType"image/png" | "image/jpeg" | "image/gif" | "image/webp"required
  • bytesintegerrequired
  • widthinteger
  • heightinteger
  • namestring
  • datastringrequired

    Standard base64

  • 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
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).

Example

curl
curl "$NEXUS_URL/v1/public/artifacts/<token>/attachments/<attachmentId>"

Count public artifact open

post/v1/public/artifacts/{token}/opened

Count one open of a public link's page (its beacon: the page itself is cached). A count, never who. No credential; limited per address.

publicAnyone, signed in or notTry it in the API Explorer

Parameters

  • tokenpath · stringrequired

    A public link's token (the last part of /a/<token>)

Responses

204Counted

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

Example

curl
curl -X POST "$NEXUS_URL/v1/public/artifacts/<token>/opened"

Report public artifact

post/v1/public/artifacts/{token}/report

Report a public artifact ("Report" on its page) for Trust and Safety: recorded and audited in its organization as artifact.reported, and members with artifacts.manage_external get a requests.artifact_reported notification. No credential; limited per address.

publicAnyone, signed in or notTry it in the API Explorer

Parameters

  • tokenpath · stringrequired

    A public link's token (the last part of /a/<token>)

Request body · application/json

  • reason"spam" | "phishing" | "malware" | "illegal" | "other"required
  • detailsstring

    max length 1000

Responses

202Reportedapplication/json

  • reportedbooleanrequired
  • 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
400invalid_request_errorA field is missing or not valid; the message names it
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).

Example

curl
curl -X POST "$NEXUS_URL/v1/public/artifacts/<token>/report" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "spam"
  }'

Frame artifact

get/v1/artifacts/{id}/frame

A shared page's frame URL on the sandbox origin, valid five minutes, to anyone who may read the artifact. An unpinned page share's frame shows the page's live state, unsaved edits included; a pinned share's frame shows its version. Frame it with sandbox="allow-scripts" only. 404 artifact_not_found for a shared chat id; 404 artifact_revoked once revoked; 403 pages_off; 503 pages_viewer_unconfigured.

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • siteVersionquery · integer

    Request signed routes for this exact authorized saved Site version.

  • idpath · stringrequired

    The artifact's id (art_…)

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

Stream artifact events

get/v1/artifacts/{id}/events

A shared page's live events, as server-sent events, by the share's id: for readers without the page's own stream (the /a/ viewer, the phone app). Anyone who may frame the share reads it, and it counts no open. A query event (PageQueryEvent) says one of the page's queries has a new result (Nexus Data).

artifacts.readEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The artifact's id (art_…)

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.

404A shared chat id, missing share, or inaccessible share (`artifact_not_found`). Revoked shares may return `artifact_revoked`.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 pinned share: it shows one version, so it has nothing to follow (`page_share_pinned`)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`)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
404A shared chat id, missing share, or inaccessible share (`artifact_not_found`). Revoked shares may return `artifact_revoked`.
409A pinned share: it shows one version, so it has nothing to follow (`page_share_pinned`)
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`)

Example

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

Frame public artifact

get/v1/public/artifacts/{token}/frame

A public page link's frame URL, valid five minutes. An unpinned link's frame shows the page's live state, unsaved edits included; a pinned link's frame shows its version. No credential; rate limited per address. Revoked, expired, unknown, or its organization turned pages or public page links off: 404.

publicAnyone, signed in or notTry it in the API Explorer

Parameters

  • siteVersionquery · integer

    Request signed routes for this exact authorized saved Site version.

  • tokenpath · stringrequired

    A public link's token (the last part of /a/<token>)

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

Example

curl
curl "$NEXUS_URL/v1/public/artifacts/<token>/frame"

Stream public artifact events

get/v1/public/artifacts/{token}/events

A public page link's live events, as server-sent events. No credential. Each stream open counts against the address's public reads, and an address holds at most 32 open on each Gateway copy. A query event (PageQueryEvent) says one of the page's queries has a new result (Nexus Data).

publicAnyone, signed in or notTry it in the API Explorer

Parameters

  • tokenpath · stringrequired

    A public link's token (the last part of /a/<token>)

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.

404No link opens here (`artifact_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 pinned link: it shows one version, so it has nothing to follow (`page_share_pinned`)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 address's public reads a minute, or 32 streams open from it (`page_events_per_address`)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`)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
404not_foundNothing matches the path in your organization
404No link opens here (`artifact_not_found`)
409A pinned link: it shows one version, so it has nothing to follow (`page_share_pinned`)
429Over the address's public reads a minute, or 32 streams open from it (`page_events_per_address`)
503Too many live readers on this Gateway copy (`page_events_full`)

Example

curl
curl "$NEXUS_URL/v1/public/artifacts/<token>/events"