Skip to content
2 minute readAPIAgent-ready

Clearer refusals from compute and session-only routes

Compute no longer ignores a function named by name or fails with a server error on a catalog entry that cannot price, session-only routes say why an API key is refused, and the API reference documents the payment headers and Rosetta's sandbox limit.

Several API answers that used to mislead an agent now say what happened and what to do instead.

  • POST /api/compute/price refuses a body carrying function or function_name with a 400 validation_failed instead of quietly running default routing. Send function_id (from GET /api/functions/catalog), or call POST /api/price-router with function_name.
  • A function_id naming a built-in catalog entry that is not a pricing function, such as a Rosetta workflow, answers 422 not_a_pricing_function before anything runs or is metered, instead of a 500. Pay-per-call requests are not charged.
  • Routes that take only a signed-in dashboard session keep their 401, and now add a hint when the request carried an API key or a Bearer token, so the caller knows no key can call them.
  • OPTIONS on the public compute demo lists only POST, OPTIONS.
  • /docs/rosetta and /docs/ucp redirect to the matching section of the API reference.
  • The API reference shows a full example of the 402 payment requirements for compute, documents the version 2 PAYMENT-REQUIRED and PAYMENT-RESPONSE headers, and notes that a self-registered sandbox key gets 403 sandbox_restricted from Rosetta until a person claims the workspace.