People who develop

Limits and errors of calls to an agent

Every key has precise limits, and past a limit the service answers 429 at once instead of queuing the request. This page lists the limits, what the calls do not do and how to read each error.

3-minute read

The limits

The limits of a key
LimitValue
Calls per minute, per key10; every call with a valid key counts, even a refused one.
Answers at the same time2 per key, 2 across the whole unit for calls from programs.
Tokens per day, per key200,000 unless agreed otherwise, question and answer together; renewed at midnight.
Length of the answermax_tokens at most 4096.
RequestAt most 1 MB and 200 messages; the last message is the user’s.

Past a limit the service answers 429 with the Retry-After header, the seconds to wait. Your program should wait for them and try again.

What is not there

  • The agent’s tools are not run: no calculations, connections or actions.
  • No web search.
  • No files, images or audio: text only. The documents the agent knows are those of its collections shared with “API agenti”.
  • No memory between calls, and the calls do not appear among the chat’s conversations.
  • Other OpenAI fields, such as tools, functions or response_format, are ignored.

The same question may get a slightly different answer from the one the agent gives in the chat.

Errors

The service’s errors have a JSON body with a sentence in the unit’s language in error.message, to show to whoever uses the program, and a code in error.code. Two responses do not have that body: the 404 for a wrong address, in plain text, and the 413 for a request over 1 MB, with an empty body. So your program should look at the HTTP status first, and read the JSON only if there is some.

The error codes
CodeMeaningWhat to do
400The request is not valid.Fix what the message says.
401Key missing, wrong, revoked or expired.Check the key; if it was revoked, ask for a new one.
404The body names another model, or the address is not one of the two calls.Drop model, or check that the base address ends in /v1.
413Request over 1 MB.Send less text.
429Past a limit.Wait for the seconds in Retry-After; if the day’s quota is used up, try again tomorrow.
502, 504The chat did not answer, or did not finish in time.Try again shortly.
503The service is not ready, or the agent is not shared with “API agenti”.Pass the message on to the administrator.

What is recorded

The unit records every call for 90 days: date, key, outcome and number of tokens, never the text of the questions and answers. A refused key that keeps retrying appears once a minute, with the count of attempts. The administrator sees the use of each key on the API keys page (the key).

LLMON at work on documents, in a live demonstration.

In a 30-minute video call we show you the chat, the knowledge bases and the admin dashboard, and answer your company’s questions.

Book a demo

A 30-minute video call: LLMON live on sample documents, with answers to your questions.