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

API reference

Apps

Nexus Apps: an app you deploy from a folder, hosted on Vercel in Nexus's own team (Vercel for Platforms, one Vercel project per app). Nobody needs a Vercel account. Nexus pays Vercel for every app on its team, so an organization holds at most NEXUS_APPS_MAX_PER_TENANT apps (10 by default); a claim link moves an app's project to your own Vercel account, where it stops costing Nexus. Each app shows what Vercel billed for it, from Vercel's daily charges. An app is its deployer's, and the organization's owners and admins reach every app; to anyone else it does not exist. Off unless the Gateway sets NEXUS_APPS_ENABLED=true: then every route answers 404 apps_off, and these routes are left out of GET /v1/openapi.json. On, without VERCEL_TOKEN and VERCEL_TEAM_ID, every route answers 503 apps_unavailable.

View as Markdown

List apps

get/v1/apps

Your apps, or every app of your organization for an owner or admin, by name, each with what Vercel billed for it.

apps.useEvery memberTry it in the API Explorer

Responses

200OKapplication/json

  • appsarray of Apprequired
    • idstringrequired

      app_…

    • namestringrequired

      max length 48 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$

    • userIdstringrequired

      The member who deployed it first.

    • urlstring | nullrequired

      The app's address: its production URL once Vercel assigned it, else its last deployment's own. Null before the first deployment.

    • state"QUEUED" | "INITIALIZING" | "BUILDING" | "READY" | "ERROR" | "CANCELED" | "BLOCKED" | nullrequired

      Vercel's state of the last deployment; null before the first.

    • frameworkstring | nullrequired

      The Vercel framework preset it was deployed with; null for Vercel's own detection.

    • projectNamestringrequired

      The Vercel project's name on Nexus's team (nx-<8 hex>-<name>).

    • deployedAtstring (date-time) | nullrequired

      When the last deployment started.

    • claimRequestedAtstring (date-time) | nullrequired

      When a member last asked for a claim link: the project may since be on their own Vercel account.

    • createdAtstring (date-time)required
    • updatedAtstring (date-time)required
    • costToDatestring | nullrequired

      What Vercel billed Nexus for this app in all, in USD, as a decimal string (root rule 9); null until a cost pull saw a charge for it.

      pattern ^-?[0-9]+\.[0-9]{6}$

    • cost30dstring | nullrequired

      What Vercel billed for it over the last 30 days, in USD, as a decimal string; null until a cost pull saw a charge for it.

      pattern ^-?[0-9]+\.[0-9]{6}$

    • costUpdatedAtstring (date-time) | nullrequired

      When the costs were last read from Vercel's charges, which come a day late; null with no cost.

    • billingErrorstring | nullrequired

      An outstanding payment, paused state, or provider correction awaiting credit. Transient errors never pause hosting.

    • monthlyCapUsdstringrequired

      Monthly hosting cap in USD. Defaults to $10.

    • monthSpendUsdstringrequired

      Current UTC month ListCost plus Nexus rate, in USD.

    • pauseAtstring | nullrequired

      The earliest cap or payment grace deadline. Null while healthy.

    • pausedReasonstring | nullrequired

      Cap, card or debt while hosting is paused.

403The caller is not a member of an organization (`member_required`), or the role may not use apps.

404Nexus Apps is off on this Gateway (`apps_off`).

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

  • errorobject
    • messagestringrequired
    • typestringrequired

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

    • codestring

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

    • paramstring

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

    • nexusobject

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

    • minimumstring

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

503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404Nexus Apps is off on this Gateway (`apps_off`).
429Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap).
429rate_limit_errorToo many requests from this key in a minute
503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

Example

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

Deploy app

post/v1/apps

Deploy a folder as your app named name: a new app (201) or the next deployment of yours (200). Send every file of the folder, its path relative to the folder and its bytes as standard base64: at most 5000 files and 20 MB decoded (the body at most 30 MB). framework is a Vercel framework preset (nextjs, vite); absent, Vercel detects it. Gateway makes the app's Vercel project on Nexus's team the first time, then deploys the files to production; the answer's state is Vercel's (QUEUED, BUILDING, …) and GET /v1/apps/{id} follows it to READY or ERROR. A name is the organization's: another member's app of the same name is a 409.

apps.useEvery memberTry it in the API Explorer

Parameters

  • Idempotency-Keyheader · string

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

Request body · application/json

  • namestringrequired

    The app's name in your organization: lowercase words joined by single dashes.

    max length 48 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$

  • frameworkstring | null

    A Vercel framework preset, such as nextjs or vite; absent or null, Vercel detects it.

    pattern ^[a-z0-9-]{1,40}$

  • filesarray of objectrequired

    at most 5000 items

    • pathstringrequired

      The file's path in the app, relative, with / between folders.

      max length 512

    • datastringrequired

      The file's bytes, standard base64.

Responses

200The next deployment of your appapplication/json

  • idstringrequired

    app_…

  • namestringrequired

    max length 48 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$

  • userIdstringrequired

    The member who deployed it first.

  • urlstring | nullrequired

    The app's address: its production URL once Vercel assigned it, else its last deployment's own. Null before the first deployment.

  • state"QUEUED" | "INITIALIZING" | "BUILDING" | "READY" | "ERROR" | "CANCELED" | "BLOCKED" | nullrequired

    Vercel's state of the last deployment; null before the first.

  • frameworkstring | nullrequired

    The Vercel framework preset it was deployed with; null for Vercel's own detection.

  • projectNamestringrequired

    The Vercel project's name on Nexus's team (nx-<8 hex>-<name>).

  • deployedAtstring (date-time) | nullrequired

    When the last deployment started.

  • claimRequestedAtstring (date-time) | nullrequired

    When a member last asked for a claim link: the project may since be on their own Vercel account.

  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • costToDatestring | nullrequired

    What Vercel billed Nexus for this app in all, in USD, as a decimal string (root rule 9); null until a cost pull saw a charge for it.

    pattern ^-?[0-9]+\.[0-9]{6}$

  • cost30dstring | nullrequired

    What Vercel billed for it over the last 30 days, in USD, as a decimal string; null until a cost pull saw a charge for it.

    pattern ^-?[0-9]+\.[0-9]{6}$

  • costUpdatedAtstring (date-time) | nullrequired

    When the costs were last read from Vercel's charges, which come a day late; null with no cost.

  • billingErrorstring | nullrequired

    An outstanding payment, paused state, or provider correction awaiting credit. Transient errors never pause hosting.

  • monthlyCapUsdstringrequired

    Monthly hosting cap in USD. Defaults to $10.

  • monthSpendUsdstringrequired

    Current UTC month ListCost plus Nexus rate, in USD.

  • pauseAtstring | nullrequired

    The earliest cap or payment grace deadline. Null while healthy.

  • pausedReasonstring | nullrequired

    Cap, card or debt while hosting is paused.

201Created: the app's first deployment is buildingapplication/json

  • idstringrequired

    app_…

  • namestringrequired

    max length 48 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$

  • userIdstringrequired

    The member who deployed it first.

  • urlstring | nullrequired

    The app's address: its production URL once Vercel assigned it, else its last deployment's own. Null before the first deployment.

  • state"QUEUED" | "INITIALIZING" | "BUILDING" | "READY" | "ERROR" | "CANCELED" | "BLOCKED" | nullrequired

    Vercel's state of the last deployment; null before the first.

  • frameworkstring | nullrequired

    The Vercel framework preset it was deployed with; null for Vercel's own detection.

  • projectNamestringrequired

    The Vercel project's name on Nexus's team (nx-<8 hex>-<name>).

  • deployedAtstring (date-time) | nullrequired

    When the last deployment started.

  • claimRequestedAtstring (date-time) | nullrequired

    When a member last asked for a claim link: the project may since be on their own Vercel account.

  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • costToDatestring | nullrequired

    What Vercel billed Nexus for this app in all, in USD, as a decimal string (root rule 9); null until a cost pull saw a charge for it.

    pattern ^-?[0-9]+\.[0-9]{6}$

  • cost30dstring | nullrequired

    What Vercel billed for it over the last 30 days, in USD, as a decimal string; null until a cost pull saw a charge for it.

    pattern ^-?[0-9]+\.[0-9]{6}$

  • costUpdatedAtstring (date-time) | nullrequired

    When the costs were last read from Vercel's charges, which come a day late; null with no cost.

  • billingErrorstring | nullrequired

    An outstanding payment, paused state, or provider correction awaiting credit. Transient errors never pause hosting.

  • monthlyCapUsdstringrequired

    Monthly hosting cap in USD. Defaults to $10.

  • monthSpendUsdstringrequired

    Current UTC month ListCost plus Nexus rate, in USD.

  • pauseAtstring | nullrequired

    The earliest cap or payment grace deadline. Null while healthy.

  • pausedReasonstring | nullrequired

    Cap, card or debt while hosting is paused.

400The body is not a deploy: `name` (`invalid_name`), `framework` (`invalid_framework`) or `files` (`invalid_files`: none, too many, a bad or repeated path, or data that is not base64).

402Add a saved card, resolve unpaid hosting, repay credit debt, or raise the app cap (apps_card_required, apps_payment_pending, apps_debt_pending, app_paused).

403The caller is not a member of an organization (`member_required`), or the role may not use apps.

404Nexus Apps is off on this Gateway (`apps_off`).

409Another member of your organization has an app of this name (`app_name_taken`), or the app's Vercel project left Nexus's team (`app_gone`): it was claimed or deleted at Vercel.

413The files are more than 20 MB decoded (`app_too_large`), or the body more than 30 MB.

422Vercel refused the project or the deployment (`vercel_refused`), with Vercel's own message.

429Your organization holds its most apps (`apps_limit`, `NEXUS_APPS_MAX_PER_TENANT`): delete one first. Also the caller's rate limit.

502Vercel failed or did not answer (`vercel_error`); try again.

503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
400The body is not a deploy: `name` (`invalid_name`), `framework` (`invalid_framework`) or `files` (`invalid_files`: none, too many, a bad or repeated path, or data that is not base64).
401authentication_errorNo key, or a key Gateway does not accept
402budget_exceededAdd a saved card, resolve unpaid hosting, repay credit debt, or raise the app cap (apps_card_required, apps_payment_pending, apps_debt_pending, app_paused).
403role_requiredYour role does not have this permission
404Nexus Apps is off on this Gateway (`apps_off`).
409Another member of your organization has an app of this name (`app_name_taken`), or the app's Vercel project left Nexus's team (`app_gone`): it was claimed or deleted at Vercel.
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 files are more than 20 MB decoded (`app_too_large`), or the body more than 30 MB.
422Vercel refused the project or the deployment (`vercel_refused`), with Vercel's own message.
422idempotency_key_reusedThe Idempotency-Key was used with a different request
429Your organization holds its most apps (`apps_limit`, `NEXUS_APPS_MAX_PER_TENANT`): delete one first. Also the caller's rate limit.
429rate_limit_errorToo many requests from this key in a minute
502Vercel failed or did not answer (`vercel_error`); try again.
503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

Example

curl
curl -X POST "$NEXUS_URL/v1/apps" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Platform",
    "files": [
      {
        "path": "<path>",
        "data": "<data>"
      }
    ]
  }'

Get app

get/v1/apps/{id}

One app, with what Vercel billed for it. While its deployment builds, Gateway reads its state from Vercel again; if Vercel does not answer, the last state stands.

apps.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The app's id (app_…), as POST /v1/apps answered it

Responses

200OKapplication/json

  • idstringrequired

    app_…

  • namestringrequired

    max length 48 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$

  • userIdstringrequired

    The member who deployed it first.

  • urlstring | nullrequired

    The app's address: its production URL once Vercel assigned it, else its last deployment's own. Null before the first deployment.

  • state"QUEUED" | "INITIALIZING" | "BUILDING" | "READY" | "ERROR" | "CANCELED" | "BLOCKED" | nullrequired

    Vercel's state of the last deployment; null before the first.

  • frameworkstring | nullrequired

    The Vercel framework preset it was deployed with; null for Vercel's own detection.

  • projectNamestringrequired

    The Vercel project's name on Nexus's team (nx-<8 hex>-<name>).

  • deployedAtstring (date-time) | nullrequired

    When the last deployment started.

  • claimRequestedAtstring (date-time) | nullrequired

    When a member last asked for a claim link: the project may since be on their own Vercel account.

  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • costToDatestring | nullrequired

    What Vercel billed Nexus for this app in all, in USD, as a decimal string (root rule 9); null until a cost pull saw a charge for it.

    pattern ^-?[0-9]+\.[0-9]{6}$

  • cost30dstring | nullrequired

    What Vercel billed for it over the last 30 days, in USD, as a decimal string; null until a cost pull saw a charge for it.

    pattern ^-?[0-9]+\.[0-9]{6}$

  • costUpdatedAtstring (date-time) | nullrequired

    When the costs were last read from Vercel's charges, which come a day late; null with no cost.

  • billingErrorstring | nullrequired

    An outstanding payment, paused state, or provider correction awaiting credit. Transient errors never pause hosting.

  • monthlyCapUsdstringrequired

    Monthly hosting cap in USD. Defaults to $10.

  • monthSpendUsdstringrequired

    Current UTC month ListCost plus Nexus rate, in USD.

  • pauseAtstring | nullrequired

    The earliest cap or payment grace deadline. Null while healthy.

  • pausedReasonstring | nullrequired

    Cap, card or debt while hosting is paused.

403The caller is not a member of an organization (`member_required`), or the role may not use apps.

404Nexus Apps is off on this Gateway (`apps_off`), or no such app reaches you: another member's and another organization's are as absent as a missing one.

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.

503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

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
404Nexus Apps is off on this Gateway (`apps_off`), or no such app reaches you: another member's and another organization's are as absent as a missing one.
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
503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

Example

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

Delete app

DEL/v1/apps/{id}

Delete the app and its Vercel project, with every deployment. A project Vercel no longer has, or a claimed one, is not an error. Audited as app.deleted.

apps.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The app's id (app_…), as POST /v1/apps answered it

  • Idempotency-Keyheader · string

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

Responses

200OKapplication/json

  • idstringrequired
  • deletedbooleanrequired

403The caller is not a member of an organization (`member_required`), or the role may not use apps.

404Nexus Apps is off on this Gateway (`apps_off`), or no such app reaches you: another member's and another organization's are as absent as a missing one.

422Vercel refused the delete (`vercel_refused`).

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.

502Vercel failed or did not answer (`vercel_error`); try again.

503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

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
404Nexus Apps is off on this Gateway (`apps_off`), or no such app reaches you: another member's and another organization's are as absent as a missing one.
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
422Vercel refused the delete (`vercel_refused`).
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
502Vercel failed or did not answer (`vercel_error`); try again.
503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

Example

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

Claim app

post/v1/apps/{id}/claim

A claim link: whoever opens it signs in to Vercel (or signs up, free) and moves the app's project to their own Vercel account, where it stops costing Nexus. Anyone with the link can claim the app, so share it with nobody else. It works for 24 hours (expiresAt). Gateway records when it was asked for (claimRequestedAt), and audits each request as app.claim_requested.

apps.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The app's id (app_…), as POST /v1/apps answered it

  • Idempotency-Keyheader · string

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

Responses

200OKapplication/json

  • idstringrequired
  • claimUrlstring (uri)required

    Vercel's claim page for the app's project. Anyone with it can claim the app.

  • expiresAtstring (date-time)required

    When the link stops working: 24 hours after it was made.

403The caller is not a member of an organization (`member_required`), or the role may not use apps.

404Nexus Apps is off on this Gateway (`apps_off`), or no such app reaches you: another member's and another organization's are as absent as a missing one.

409The app has no Vercel project yet (`app_not_deployed`), or its project left Nexus's team (`app_gone`).

422Vercel refused the transfer request (`vercel_refused`).

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.

502Vercel failed or did not answer (`vercel_error`); try again.

503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

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
404Nexus Apps is off on this Gateway (`apps_off`), or no such app reaches you: another member's and another organization's are as absent as a missing one.
409The app has no Vercel project yet (`app_not_deployed`), or its project left Nexus's team (`app_gone`).
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
422Vercel refused the transfer request (`vercel_refused`).
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
502Vercel failed or did not answer (`vercel_error`); try again.
503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

Example

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

Set app cap

put/v1/apps/{id}/cap

Set the monthly hosting cap for an app you own or manage. A cap above $10, or above the cap a manager set, needs budgets.manage (owners and admins). Audited as app.cap_changed. The app resumes after its blocking state clears.

apps.useEvery memberTry it in the API Explorer

Parameters

  • idpath · stringrequired

    The app's id (app_…), as POST /v1/apps answered it

Request body · application/json

  • monthlyCapUsdstringrequired

    USD decimal string in whole cents, $0.01 to $1,000,000.

Responses

200OKapplication/json

  • idstringrequired

    app_…

  • namestringrequired

    max length 48 · pattern ^[a-z0-9]+(-[a-z0-9]+)*$

  • userIdstringrequired

    The member who deployed it first.

  • urlstring | nullrequired

    The app's address: its production URL once Vercel assigned it, else its last deployment's own. Null before the first deployment.

  • state"QUEUED" | "INITIALIZING" | "BUILDING" | "READY" | "ERROR" | "CANCELED" | "BLOCKED" | nullrequired

    Vercel's state of the last deployment; null before the first.

  • frameworkstring | nullrequired

    The Vercel framework preset it was deployed with; null for Vercel's own detection.

  • projectNamestringrequired

    The Vercel project's name on Nexus's team (nx-<8 hex>-<name>).

  • deployedAtstring (date-time) | nullrequired

    When the last deployment started.

  • claimRequestedAtstring (date-time) | nullrequired

    When a member last asked for a claim link: the project may since be on their own Vercel account.

  • createdAtstring (date-time)required
  • updatedAtstring (date-time)required
  • costToDatestring | nullrequired

    What Vercel billed Nexus for this app in all, in USD, as a decimal string (root rule 9); null until a cost pull saw a charge for it.

    pattern ^-?[0-9]+\.[0-9]{6}$

  • cost30dstring | nullrequired

    What Vercel billed for it over the last 30 days, in USD, as a decimal string; null until a cost pull saw a charge for it.

    pattern ^-?[0-9]+\.[0-9]{6}$

  • costUpdatedAtstring (date-time) | nullrequired

    When the costs were last read from Vercel's charges, which come a day late; null with no cost.

  • billingErrorstring | nullrequired

    An outstanding payment, paused state, or provider correction awaiting credit. Transient errors never pause hosting.

  • monthlyCapUsdstringrequired

    Monthly hosting cap in USD. Defaults to $10.

  • monthSpendUsdstringrequired

    Current UTC month ListCost plus Nexus rate, in USD.

  • pauseAtstring | nullrequired

    The earliest cap or payment grace deadline. Null while healthy.

  • pausedReasonstring | nullrequired

    Cap, card or debt while hosting is paused.

403The caller is not a member of an organization (`member_required`), the role may not use apps, or the cap needs `budgets.manage` (`role_required`).

404Nexus Apps is off on this Gateway (`apps_off`), or no such app reaches you: another member's and another organization's are as absent as a missing one.

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.

503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

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
404Nexus Apps is off on this Gateway (`apps_off`), or no such app reaches you: another member's and another organization's are as absent as a missing one.
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
503Nexus Apps has no Vercel token and team on this Gateway (`apps_unavailable`).

Example

curl
curl -X PUT "$NEXUS_URL/v1/apps/<id>/cap" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "monthlyCapUsd": "<monthlyCapUsd>"
  }'