Reference

Errors

Stable codes, and what each one means.

Every failure carries a machine-readable code and an explicit HTTP status. Client-facing codes are append-only, one never changes meaning. The body is shaped for the protocol you called. an OpenAI client reads error.message and error.type as it always has. and the code is ours.

json
{ "error": { "message": "Wallet balance is below the minimum required for this request.",
          "type": "insufficient_quota", "code": "insufficient_credit", "param": null } }

Gateway

What a call to <application>.gw.ourseams.com can return.

CodeStatusMeaning
unknown_model400No model by that name is available on this key.
unsupported_parameter400The request used a parameter this endpoint does not support.
protocol_translation_failed400The request could not be translated for the model provider.
no_capable_model400No model behind this router can serve this request.
invalid_api_key401The API key is not valid.
revoked_api_key401This API key has been revoked. Mint a new one.
expired_api_key401This API key has expired. Mint a new one.
insufficient_credit402Wallet balance is below the minimum required for this request.
quota_exhausted402The included quota for this period is used up.
on_demand_limit_reached402The on-demand spend limit for this period has been reached.
subscription_past_due402The subscription is past due. Update the payment method to continue.
spend_limit_exceeded402The spend limit for this request was reached.
key_spend_limit_exceeded402The spend limit for this key was reached.
bundle_spend_limit_exceeded402The spend limit for this bundle was reached.
outcome_limit_exceeded402The budget for this unit of work was reached.
balance_frozen402This wallet is frozen. Ask whoever issued this key to reopen it.
model_not_in_bundle403That model is not included in this key's bundle.
outcome_owner_mismatch403This outcome belongs to another end user.
bundle_archived403The bundle behind this key has been archived.
model_disabled403That model is turned off. Ask whoever issued this key to enable it.
customer_suspended403This account is suspended.
unknown_customer404No customer is served at this host.
unknown_application404No application is served at this host.
usage_unmeasurable500Usage could not be measured, so nothing was billed.
gateway_error500The gateway could not complete the request.
provider_error502The model provider returned an error.
provider_unavailable503The model provider is unavailable.
no_healthy_provider503No healthy provider is available for this model.
request_timeout503The request exceeded its time budget.
ttfb_timeout503The provider did not send a first token in time.
stream_idle_timeout503The stream stalled and was closed.

The three key codes are distinct on purpose: revoked and expired tell the developer to mint a new key, invalid tells them the key was never ours.

usage_unmeasurable is a 500 on purpose. We treat it as an outage rather than bill a guess.

Control plane

What a call to api.ourseams.com can return. These are the codes to branch on when you are provisioning: creating applications, bundles, end users and keys.

CodeStatusMeaning
unsupported_parameter400The request used a parameter this endpoint does not support.
key_code_unavailable400That key code is not available. Choose another.
authorization_pending400This sign-in is waiting for approval.
invalid_device_code400This sign-in request is not valid.
expired_device_code400This sign-in request has expired.
invalid_api_key401The API key is not valid.
revoked_api_key401This API key has been revoked. Mint a new one.
expired_api_key401This API key has expired. Mint a new one.
subscription_past_due402The subscription is past due. Update the payment method to continue.
bundle_archived403The bundle behind this key has been archived.
customer_suspended403This account is suspended.
insufficient_scope403This API key does not carry the scope this request needs.
unknown_customer404No customer is served at this host.
unknown_application404No application is served at this host.
unknown_resource404This account has no such bundle, end user, key or provider account.
not_subscribed404This end user is not on a plan, so there is no spending to show.
gateway_error500The gateway could not complete the request.
not_implemented501This endpoint is not available yet.

Creating something that already exists

There is no conflict code and no bundle_exists code, and no route answers 409. A create that collides returns 400 with the code below, so branch on the code rather than the status.

CallAlready thereCode
PUT /v1/apps/{slug}the slug is taken, reserved, or malformedkey_code_unavailable
PUT /v1/bundles/{slug}refusesunsupported_parameter
PUT /v1/models/{name}replaces the sources; no error—
POST /v1/keysmints another key for that end user; no error—
PUT /v1/team/{email}resends to that address; no error—

POST /v1/keys is not idempotent. Calling it twice for one end user leaves them holding two keys, and keys show <endUserId> then refuses as ambiguous. Keep the id or the keyPrefix mint returns.