Skip to main content
Handle CometAPI errors by deciding whether the request should be fixed or retried. Retry 429, timeout-class failures, and temporary server failures with backoff; do not retry malformed requests or authentication failures.

Retry only retryable failures

Add backoff

The following Python example retries only retryable failures:
The successful response includes the model output:

Log useful context

The following JSON shape is safe to store after you remove user secrets and large files:

Common errors

Last modified on June 23, 2026