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

API reference

Agent gateway

The Anthropic Messages API and the OpenAI Responses API, passed through to the provider. Authenticate with a personal Nexus token (nexus auth login) or API key (Authorization: Bearer or x-api-key); any member may call. Requests and responses, streaming included, are the providers' own; errors use the provider's error shape. Every call is reserved before it is forwarded and settled on the reported usage; a call over budget is refused with 402.

View as Markdown

Anthropic messages

post/v1/anthropic/v1/messages

Anthropic Messages API (Claude Code: ANTHROPIC_BASE_URL=<core>/v1/anthropic). Metered.

agents.useEvery memberTry it in the API Explorer

Parameters

  • x-nexus-teamheader · string

    The team (slug) this call's spend goes to; you must be in it (nexus claude --team). Default: your default team.

  • Idempotency-Keyheader · string

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

Request body · application/json

object

Responses

200The provider's response: JSON, or server-sent events when the request streams.application/json

object

400The request is not valid: for example, it has no `model`, or its body is not UTF-8, not a JSON object, or repeats a field. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_key`).application/json

ProviderError

401No key (`missing_credential`; send `Authorization: Bearer <key>` or `x-api-key`), or a key Gateway does not accept (`invalid_credential`).application/json

ProviderError

402The call's maximum cost is more than the budget left (`budget_exceeded`), or the organization has an unpaid Nexus invoice past its grace (`payment_past_due`). A `budget_exceeded` refusal carries `notified: true` in its details once Gateway has told the refused person and the organization's owners and admins. Its `error.nexus` is a BudgetRefusal: each money figure with its exact decimal twin.application/json

ProviderError

403`model_not_allowed`: the model is refused by a model policy (the message names the level and rule; `error.nexus` carries them), or the organization has no provider key (`provider_key_required`: Nexus credit never pays a pass-through call); or the team in `x-nexus-team` is not the caller's (`not_in_team`). `provider_disabled`: the organization has turned off every provider that serves the model.application/json

ProviderError

404`model_not_found`: not in the model catalog; or the team in `x-nexus-team` does not exist (`unknown_team`).application/json

ProviderError

408The request body stopped arriving for 30 seconds, or took longer than 10 minutes in all (`request_timeout`; `nexus` holds `gap_seconds` and `total_seconds`).application/json

ProviderError

409The `Idempotency-Key` cannot run or replay: its first request still runs (`idempotency_in_progress`), was a stream (`idempotency_stream_replay`), or its answer was not kept, being over 2,000,000 bytes (`idempotency_response_not_stored`). The request does not run again.application/json

ProviderError

413The request body is over 32,000,000 bytes, the agent gateway's limit (`request_too_large`).application/json

ProviderError

422The `Idempotency-Key` was used for a different request: another method, path, query or body (`idempotency_key_reused`).application/json

ProviderError

426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.application/json

ProviderError

429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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

ProviderError

502The provider could not be reached, or the connection to it failed (`api_error`).application/json

ProviderError

503The provider's or the Gateway's own; every one may be retried. The provider's: its own 503 passes through as it wrote it, with its `retry-after` (OpenAI's overload; Anthropic's is a 529, not a 503); `/metrics` and the request log count it as `upstream_overloaded`. Retry after its wait, or try another model. The Gateway's, in the provider's error shape: it is at its limit of requests in flight (`overloaded`, retry after 1 s); it is stopping and takes no new request (`draining`, retry after 5 s); it stopped before the call answered (`gateway_stopping`, send the call again: it reaches a running Gateway); or its database is busy (`database_busy`: nothing was committed, retry shortly).application/json

ProviderError

504The provider passed one of the call's deadlines (`upstream_timeout`; `nexus.phase` names which).application/json

ProviderError

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
400The request is not valid: for example, it has no `model`, or its body is not UTF-8, not a JSON object, or repeats a field. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_key`).
401authentication_errorNo key, or a key Gateway does not accept
402budget_exceededThe call's maximum cost is more than the budget left (`budget_exceeded`), or the organization has an unpaid Nexus invoice past its grace (`payment_past_due`). A `budget_exceeded` refusal carries `notified: true` in its details once Gateway has told the refused person and the organization's owners and admins. Its `error.nexus` is a BudgetRefusal: each money figure with its exact decimal twin.
403role_requiredYour role does not have this permission
403model_not_allowed`model_not_allowed`: the model is refused by a model policy (the message names the level and rule; `error.nexus` carries them), or the organization has no provider key (`provider_key_required`: Nexus credit never pays a pass-through call); or the team in `x-nexus-team` is not the caller's (`not_in_team`). `provider_disabled`: the organization has turned off every provider that serves the model.
404`model_not_found`: not in the model catalog; or the team in `x-nexus-team` does not exist (`unknown_team`).
408The request body stopped arriving for 30 seconds, or took longer than 10 minutes in all (`request_timeout`; `nexus` holds `gap_seconds` and `total_seconds`).
409The `Idempotency-Key` cannot run or replay: its first request still runs (`idempotency_in_progress`), was a stream (`idempotency_stream_replay`), or its answer was not kept, being over 2,000,000 bytes (`idempotency_response_not_stored`). The request does not run again.
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 request body is over 32,000,000 bytes, the agent gateway's limit (`request_too_large`).
422The `Idempotency-Key` was used for a different request: another method, path, query or body (`idempotency_key_reused`).
422idempotency_key_reusedThe Idempotency-Key was used with a different request
426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.
429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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
502The provider could not be reached, or the connection to it failed (`api_error`).
503The provider's or the Gateway's own; every one may be retried. The provider's: its own 503 passes through as it wrote it, with its `retry-after` (OpenAI's overload; Anthropic's is a 529, not a 503); `/metrics` and the request log count it as `upstream_overloaded`. Retry after its wait, or try another model. The Gateway's, in the provider's error shape: it is at its limit of requests in flight (`overloaded`, retry after 1 s); it is stopping and takes no new request (`draining`, retry after 5 s); it stopped before the call answered (`gateway_stopping`, send the call again: it reaches a running Gateway); or its database is busy (`database_busy`: nothing was committed, retry shortly).
504The provider passed one of the call's deadlines (`upstream_timeout`; `nexus.phase` names which).

Example

curl
curl -X POST "$NEXUS_URL/v1/anthropic/v1/messages" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-5-5",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Hello"
      }
    ]
  }'

Anthropic count tokens

post/v1/anthropic/v1/messages/count_tokens

Anthropic token counting. Free (not metered), but checked against the model policies like every call.

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

object

Responses

200The provider's response: JSON, or server-sent events when the request streams.application/json

object

400The request is not valid: for example, it has no `model`, or its body is not UTF-8, not a JSON object, or repeats a field. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_key`).application/json

ProviderError

401No key (`missing_credential`; send `Authorization: Bearer <key>` or `x-api-key`), or a key Gateway does not accept (`invalid_credential`).application/json

ProviderError

402The call's maximum cost is more than the budget left.application/json

ProviderError

403`model_not_allowed`: the model is refused by a model policy (the message names the level and rule; `error.nexus` carries them), or the organization has no provider key (`provider_key_required`: Nexus credit never pays a pass-through call); or the team in `x-nexus-team` is not the caller's (`not_in_team`).application/json

ProviderError

404`model_not_found`: not in the model catalog; or the team in `x-nexus-team` does not exist (`unknown_team`).application/json

ProviderError

408The request body stopped arriving for 30 seconds, or took longer than 10 minutes in all (`request_timeout`; `nexus` holds `gap_seconds` and `total_seconds`).application/json

ProviderError

409The `Idempotency-Key` cannot run or replay: its first request still runs (`idempotency_in_progress`), was a stream (`idempotency_stream_replay`), or its answer was not kept, being over 2,000,000 bytes (`idempotency_response_not_stored`). The request does not run again.application/json

ProviderError

413The request body is over 32,000,000 bytes, the agent gateway's limit (`request_too_large`).application/json

ProviderError

422The `Idempotency-Key` was used for a different request: another method, path, query or body (`idempotency_key_reused`).application/json

ProviderError

426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.application/json

ProviderError

429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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

ProviderError

502The provider could not be reached, or the connection to it failed (`api_error`).application/json

ProviderError

503The provider's or the Gateway's own; every one may be retried. The provider's: its own 503 passes through as it wrote it, with its `retry-after` (OpenAI's overload; Anthropic's is a 529, not a 503); `/metrics` and the request log count it as `upstream_overloaded`. Retry after its wait, or try another model. The Gateway's, in the provider's error shape: it is at its limit of requests in flight (`overloaded`, retry after 1 s); it is stopping and takes no new request (`draining`, retry after 5 s); or its database is busy (`database_busy`, retry shortly). A count is never `gateway_stopping`.application/json

ProviderError

504The provider passed one of the call's deadlines (`upstream_timeout`; `nexus.phase` names which).application/json

ProviderError

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
400The request is not valid: for example, it has no `model`, or its body is not UTF-8, not a JSON object, or repeats a field. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_key`).
401authentication_errorNo key, or a key Gateway does not accept
402budget_exceededThe call's maximum cost is more than the budget left.
403role_requiredYour role does not have this permission
403model_not_allowed`model_not_allowed`: the model is refused by a model policy (the message names the level and rule; `error.nexus` carries them), or the organization has no provider key (`provider_key_required`: Nexus credit never pays a pass-through call); or the team in `x-nexus-team` is not the caller's (`not_in_team`).
404`model_not_found`: not in the model catalog; or the team in `x-nexus-team` does not exist (`unknown_team`).
408The request body stopped arriving for 30 seconds, or took longer than 10 minutes in all (`request_timeout`; `nexus` holds `gap_seconds` and `total_seconds`).
409The `Idempotency-Key` cannot run or replay: its first request still runs (`idempotency_in_progress`), was a stream (`idempotency_stream_replay`), or its answer was not kept, being over 2,000,000 bytes (`idempotency_response_not_stored`). The request does not run again.
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 request body is over 32,000,000 bytes, the agent gateway's limit (`request_too_large`).
422The `Idempotency-Key` was used for a different request: another method, path, query or body (`idempotency_key_reused`).
422idempotency_key_reusedThe Idempotency-Key was used with a different request
426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.
429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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
502The provider could not be reached, or the connection to it failed (`api_error`).
503The provider's or the Gateway's own; every one may be retried. The provider's: its own 503 passes through as it wrote it, with its `retry-after` (OpenAI's overload; Anthropic's is a 529, not a 503); `/metrics` and the request log count it as `upstream_overloaded`. Retry after its wait, or try another model. The Gateway's, in the provider's error shape: it is at its limit of requests in flight (`overloaded`, retry after 1 s); it is stopping and takes no new request (`draining`, retry after 5 s); or its database is busy (`database_busy`, retry shortly). A count is never `gateway_stopping`.
504The provider passed one of the call's deadlines (`upstream_timeout`; `nexus.phase` names which).

Example

curl
curl -X POST "$NEXUS_URL/v1/anthropic/v1/messages/count_tokens" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-5-5",
    "messages": [
      {
        "role": "user",
        "content": "Hello"
      }
    ]
  }'

OpenAI responses

post/v1/openai/v1/responses

OpenAI Responses API (Codex: a model provider with base_url <core>/v1/openai/v1). Metered. A hosted tool Nexus cannot price yet (code_interpreter, file_search), or an image_generation model, quality or size it has no price for, is 400 hosted_tool_not_priced.

agents.useEvery memberTry it in the API Explorer

Parameters

  • x-nexus-teamheader · string

    The team (slug) this call's spend goes to; you must be in it (nexus claude --team). Default: your default team.

  • Idempotency-Keyheader · string

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

Request body · application/json

object

Responses

200The provider's response: JSON, or server-sent events when the request streams.application/json

object

400The request is not valid: for example, it has no `model`, or its body is not UTF-8, not a JSON object, or repeats a field. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_key`).application/json

ProviderError

401No key (`missing_credential`; send `Authorization: Bearer <key>` or `x-api-key`), or a key Gateway does not accept (`invalid_credential`).application/json

ProviderError

402The call's maximum cost is more than the budget left (`budget_exceeded`), or the organization has an unpaid Nexus invoice past its grace (`payment_past_due`). A `budget_exceeded` refusal carries `notified: true` in its details once Gateway has told the refused person and the organization's owners and admins. Its `error.nexus` is a BudgetRefusal: each money figure with its exact decimal twin.application/json

ProviderError

403`model_not_allowed`: the model is refused by a model policy (the message names the level and rule; `error.nexus` carries them), or the organization has no provider key (`provider_key_required`: Nexus credit never pays a pass-through call); or the team in `x-nexus-team` is not the caller's (`not_in_team`). `provider_disabled`: the organization has turned off every provider that serves the model.application/json

ProviderError

404`model_not_found`: not in the model catalog; or the team in `x-nexus-team` does not exist (`unknown_team`).application/json

ProviderError

408The request body stopped arriving for 30 seconds, or took longer than 10 minutes in all (`request_timeout`; `nexus` holds `gap_seconds` and `total_seconds`).application/json

ProviderError

409The `Idempotency-Key` cannot run or replay: its first request still runs (`idempotency_in_progress`), was a stream (`idempotency_stream_replay`), or its answer was not kept, being over 2,000,000 bytes (`idempotency_response_not_stored`). The request does not run again.application/json

ProviderError

413The request body is over 32,000,000 bytes, the agent gateway's limit (`request_too_large`).application/json

ProviderError

422The `Idempotency-Key` was used for a different request: another method, path, query or body (`idempotency_key_reused`).application/json

ProviderError

426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.application/json

ProviderError

429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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

ProviderError

502The provider could not be reached, or the connection to it failed (`api_error`).application/json

ProviderError

503The provider's or the Gateway's own; every one may be retried. The provider's: its own 503 passes through as it wrote it, with its `retry-after` (OpenAI's overload; Anthropic's is a 529, not a 503); `/metrics` and the request log count it as `upstream_overloaded`. Retry after its wait, or try another model. The Gateway's, in the provider's error shape: it is at its limit of requests in flight (`overloaded`, retry after 1 s); it is stopping and takes no new request (`draining`, retry after 5 s); it stopped before the call answered (`gateway_stopping`, send the call again: it reaches a running Gateway); or its database is busy (`database_busy`: nothing was committed, retry shortly).application/json

ProviderError

504The provider passed one of the call's deadlines (`upstream_timeout`; `nexus.phase` names which).application/json

ProviderError

Errors

StatusCodeWhen
400invalid_request_errorA field is missing or not valid; the message names it
400The request is not valid: for example, it has no `model`, or its body is not UTF-8, not a JSON object, or repeats a field. So is an `Idempotency-Key` that is not 1 to 255 printable ASCII characters (`invalid_idempotency_key`).
401authentication_errorNo key, or a key Gateway does not accept
402budget_exceededThe call's maximum cost is more than the budget left (`budget_exceeded`), or the organization has an unpaid Nexus invoice past its grace (`payment_past_due`). A `budget_exceeded` refusal carries `notified: true` in its details once Gateway has told the refused person and the organization's owners and admins. Its `error.nexus` is a BudgetRefusal: each money figure with its exact decimal twin.
403role_requiredYour role does not have this permission
403model_not_allowed`model_not_allowed`: the model is refused by a model policy (the message names the level and rule; `error.nexus` carries them), or the organization has no provider key (`provider_key_required`: Nexus credit never pays a pass-through call); or the team in `x-nexus-team` is not the caller's (`not_in_team`). `provider_disabled`: the organization has turned off every provider that serves the model.
404`model_not_found`: not in the model catalog; or the team in `x-nexus-team` does not exist (`unknown_team`).
408The request body stopped arriving for 30 seconds, or took longer than 10 minutes in all (`request_timeout`; `nexus` holds `gap_seconds` and `total_seconds`).
409The `Idempotency-Key` cannot run or replay: its first request still runs (`idempotency_in_progress`), was a stream (`idempotency_stream_replay`), or its answer was not kept, being over 2,000,000 bytes (`idempotency_response_not_stored`). The request does not run again.
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 request body is over 32,000,000 bytes, the agent gateway's limit (`request_too_large`).
422The `Idempotency-Key` was used for a different request: another method, path, query or body (`idempotency_key_reused`).
422idempotency_key_reusedThe Idempotency-Key was used with a different request
426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.
429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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
502The provider could not be reached, or the connection to it failed (`api_error`).
503The provider's or the Gateway's own; every one may be retried. The provider's: its own 503 passes through as it wrote it, with its `retry-after` (OpenAI's overload; Anthropic's is a 529, not a 503); `/metrics` and the request log count it as `upstream_overloaded`. Retry after its wait, or try another model. The Gateway's, in the provider's error shape: it is at its limit of requests in flight (`overloaded`, retry after 1 s); it is stopping and takes no new request (`draining`, retry after 5 s); it stopped before the call answered (`gateway_stopping`, send the call again: it reaches a running Gateway); or its database is busy (`database_busy`: nothing was committed, retry shortly).
504The provider passed one of the call's deadlines (`upstream_timeout`; `nexus.phase` names which).

Example

curl
curl -X POST "$NEXUS_URL/v1/openai/v1/responses" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.3-codex",
    "input": "Hello"
  }'

Anthropic models

get/v1/anthropic/v1/models

The models you may use on the Anthropic API, by the provider's own ids, in the provider's list shape (for clients that query it).

agents.useEvery memberTry it in the API Explorer

Responses

200OKapplication/json

object

401No key (`missing_credential`; send `Authorization: Bearer <key>` or `x-api-key`), or a key Gateway does not accept (`invalid_credential`).application/json

ProviderError

403The caller may not do this: for example, the role does not have the permission (`role_required`), or the team named is not the caller's (`not_in_team`).application/json

ProviderError

404The team named in `x-nexus-team` does not exist (`unknown_team`).application/json

ProviderError

426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.application/json

ProviderError

429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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

ProviderError

503Gateway takes no new request now: it is at its limit of requests in flight (`overloaded`), or it is stopping (`draining`). Retry after `Retry-After` seconds.application/json

ProviderError

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404The team named in `x-nexus-team` does not exist (`unknown_team`).
426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.
429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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
503Gateway takes no new request now: it is at its limit of requests in flight (`overloaded`), or it is stopping (`draining`). Retry after `Retry-After` seconds.

Example

curl
curl "$NEXUS_URL/v1/anthropic/v1/models" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "anthropic-version: 2023-06-01"

OpenAI models

get/v1/openai/v1/models

The models you may use on the OpenAI API, by the provider's own ids, in the provider's list shape (for clients that query it).

agents.useEvery memberTry it in the API Explorer

Responses

200OKapplication/json

object

401No key (`missing_credential`; send `Authorization: Bearer <key>` or `x-api-key`), or a key Gateway does not accept (`invalid_credential`).application/json

ProviderError

403The caller may not do this: for example, the role does not have the permission (`role_required`), or the team named is not the caller's (`not_in_team`).application/json

ProviderError

404The team named in `x-nexus-team` does not exist (`unknown_team`).application/json

ProviderError

426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.application/json

ProviderError

429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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

ProviderError

503Gateway takes no new request now: it is at its limit of requests in flight (`overloaded`), or it is stopping (`draining`). Retry after `Retry-After` seconds.application/json

ProviderError

Errors

StatusCodeWhen
401authentication_errorNo key, or a key Gateway does not accept
403role_requiredYour role does not have this permission
404The team named in `x-nexus-team` does not exist (`unknown_team`).
426The `nexus` CLI that sent `x-nexus-cli-version` is older than Gateway supports (`cli_too_old`; `minimum` names the oldest it takes). A request without that header is never refused.
429Over the caller's rate limit, in the provider's error shape: retry after `Retry-After` seconds. Also 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
503Gateway takes no new request now: it is at its limit of requests in flight (`overloaded`), or it is stopping (`draining`). Retry after `Retry-After` seconds.

Example

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