One way to handle errors against /api/public: read the code, decide whether to send the call again, wait the right time and send the same Idempotency-Key again.
This page needs JavaScript. The same content is available as Markdown: /guides/errors-retries.md. Every document for agents is listed in /llms.txt.