Skip to content
1 minute readAPIAgent-ready

Handle API access errors and select pricing functions explicitly

API responses distinguish missing credentials from an unsupported credential type and reject ambiguous function fields.

Use the response code and hint to correct a refused request.

  • Missing credentials return an authentication error. A valid credential sent to a route that requires a different sign-in method can return wrong_auth_modality.
  • On POST /api/compute/price, select a function with function_id. The price-router endpoint also accepts function_name; an unread function field is rejected.
  • Price verification accepts price as an alias when proposed_price is absent.
  • Fetch the specification as JSON from /api/openapi.json; /openapi.json and /openapi.yaml redirect to the published specification.

Request options.include_explanation: true when you need an explanation from the authenticated compute endpoint.