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/pricerefuses a body carryingfunctionorfunction_namewith a 400validation_failedinstead of quietly running default routing. Sendfunction_id(fromGET /api/functions/catalog), or callPOST /api/price-routerwithfunction_name.- A
function_idnaming a built-in catalog entry that is not a pricing function, such as a Rosetta workflow, answers 422not_a_pricing_functionbefore 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
hintwhen the request carried an API key or a Bearer token, so the caller knows no key can call them. OPTIONSon the public compute demo lists onlyPOST, OPTIONS./docs/rosettaand/docs/ucpredirect 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-REQUIREDandPAYMENT-RESPONSEheaders, and notes that a self-registered sandbox key gets 403sandbox_restrictedfrom Rosetta until a person claims the workspace.