TheaimartAIxDOCS
HomeGet API key

Troubleshooting inference requests

Classify the failure before retrying. Invalid inputs, credentials and funding need correction; network timeouts and partial streams can leave the completion outcome uncertain.

Authentication and funding

For 401, verify the key and origin. For 403, inspect model and modality scope. For 402, inspect credits and spending policies. Keep secrets and raw provider error bodies out of logs.

Invalid models and parameters

For 400, compare the model ID with the catalog and request fields with chat reference. Check modality, required fields, numeric bounds and advanced-feature support.

Rate limits and network failures

For 429, reduce pressure and use a bounded backoff policy. For timeouts, preserve an uncertain outcome instead of assuming cancellation. Read error recovery and limits.

Streaming interruption

Buffer SSE frame boundaries, handle malformed events, distinguish data: [DONE] from a disconnect and preserve partial output. Never silently repeat a paid generation. See streaming.

Verification and next steps

These instructions describe inspected repository contracts and safe integration boundaries. They do not prove live account access or external provider behavior. Continue with developer answers, API overview and verification limits.

Last updated October 21, 2026

Was this page helpful?