, Keys

Agent API failures now carry a stable error code

Over HTTP, every failure of the agent API answers a snake_case code to branch on beside a message to read, and claiming a key that already asked personas counts as getting started.

  • For developers: POST /api/2cents, POST /api/simulations, POST /api/feedback and POST /api/reports now answer { "error": "<code>", "message": "…" }. error used to be the sentence; it is now a stable code such as no_credits, persona_not_found or daily_limit, and the sentence moved to message. A body that doesn't match the schema answers 400 Validation failed with its issues. A question, name, report reason or feedback text the service refuses is now 422 (was 400), and an unknown persona is 404. See the agent API and /openapi.json (version 1.2.0).
  • For developers: in the signed-in API, POST /api/my/keys and POST /api/my/claim answer 400 Validation failed for a malformed body (was invalid_key and invalid_claim). See the API reference.
  • Claiming an earlier key that already asked personas counts as getting started, so the getting-started emails don't come. See Your key and your 2¢.