AI errors and security

Diagnose AI failures without losing input, exposing private keys or repeating uncertain paid requests.

By Apirex Team · Updated · Sources checked

On this page
TokenRex

Read the actual error

Status or conditionMeaning and response
400Unsupported settings or invalid input; fix the request for the chosen model.
401Invalid or revoked credential; owner checks the protected connection.
402Insufficient eligible balance or app spending limit; show AI paused, not a fake answer.
403The connection is not authorized for that model or action.
404 model_not_foundWrong or retired identifier; check the live catalog.
HTML 404 on a local addressMay indicate the protected app connection was bypassed; check the real response.
429A configured service limit was reached; respect the returned retry delay.
5xx / service_unavailableTemporary service failure; preserve input and offer Retry.
Timeout after creating mediaCompletion is uncertain; recover the saved job before starting another paid generation.

Design a recoverable failure

Keep the user’s text and uploads, stop indefinite loading and show a calm actionable message. Separate connection failures from missing models and exhausted credits. Do not describe an image, video or answer as completed when no successful output was returned. Check More → AI activity before deciding what happened.

Keep private credentials private

  • Use the secure connection card or secret interface, never chat or browser storage for private keys.
  • Do not commit keys, include them in logs, expose them in screenshots or bundle them into native apps.
  • Scope app access to the project and authorize user actions on the server.
  • Revoke a compromised key and replace the protected credential.
  • Use short-lived authorization for client sessions only when the service supports it.

Data, retention and terms

AI calls may contain user prompts, files and tool results. Provide the appropriate notice and obtain permission before sending sensitive material. Do not assume zero retention, no training or a particular regional processing guarantee from these docs. Check TokenRex’s current terms and the selected model’s data handling before a regulated or confidential workload.

Retries and charges

A failed or uncertain request is not proof of zero cost. Use the recorded usage and status to determine the charge. Retry only when safe, honor service delays and avoid automatically repeating an expensive creation request. App-AI billing is separate from builder routing and builder credits.