aiAI TOOLS.
THE ARTIFICIAL INTELLIGENCE DIRECTORY
Top 100
◎  EN
Costs, errors and data

API errors and usage limits

Distinguish an incorrect key, a usage limit and a temporary error to avoid unnecessary repeats.

Read status and message

An API can return an HTTP status and a detailed message. The status gives a category, but the content often specifies the cause. A request error may come from an absent field or from an inaccessible model. An authentication error requires to check access, not to try again indefinitely with the same data.

Specific agreements vary by supplier. A 429 status may correspond to a flow limit or other condition of use depending on the service. Check the error code and documentation before concluding that it is enough to wait.

Debit and budget are different

A quota may limit requests, tokens or simultaneous work. A budget relates to authorized expenditures. Increasing a budget does not guarantee an increase in debit. Also check if an expense setting is an effective blocking or a simple alert.

Preparing for retakes

For a temporary error, a gradual resumption may be useful if the service documents it. Limit the number of tests and keep the demand identifier. For an operation that creates a result or performs an action, check its condition before starting again in order not to produce a duplicate.

Display a useful message to the visitor and keep the technical details necessary for the team. Do not publish the key or private data in error. Test cases of incorrect access, invalid demand and unavailability before proposing integration with other people.

Questions before you start

Do we have to start all the mistakes again?

No. An invalid application or incorrect access must be corrected before a new test.

Does a higher budget automatically increase the quota?

Expenditure and debit limits are separate; check the supplier's rules.

Why check the state before restarting?

An operation may have started despite an interruption; a resumption can create a duplicate.

Continue learning

Official documentation