Skip to content
ConceptsCaching, limits and errorsDocs menu

Caching, limits and errors

How long answers are cached, how many requests you can make, and what an error looks like.

Caching

Answers carry Cache-Control, so Vercel's CDN, and your own cache, can serve repeats. Catalogue and text answers keep for a day at the CDN. Stored analyses, notes, word lookups and any include= answer keep for an hour, since they grow as readers open sections.

EndpointCached as
/api/v1/textcatalogue, or live with include
/api/v1/analysislive
/api/v1/contextlive
/api/v1/wordslive
/api/v1/searchcatalogue
/api/v1/library/{lang}/{author}catalogue
/api/v1/library/{lang}/{author}/{work}catalogue
/api/v1/library/{lang}/{author}/{work}/{ref}catalogue, or live with include
/api/v1/passagescatalogue
/api/v1/passages/{lang}/{slug}catalogue, or live with include
/api/v1catalogue
/api/v1/openapi.jsoncatalogue
ClassCache-Control
cataloguepublic, max-age=3600, s-maxage=86400, stale-while-revalidate=604800
livepublic, max-age=300, s-maxage=3600, stale-while-revalidate=86400

Errors are cached for a few minutes, as the examples below show, and a 500 never is. MCP calls are POST, so the CDN doesn't cache them, but the reads behind them are cached.

Rate limits

Please keep to 120 requests a minute from one address, across the API and the MCP server together. Past that, requests get 429 Too Many Requests for the rest of the minute. Because answers are cached, a script that reads a work section by section stays well under it. If you need more, write to us.

Errors

An error is JSON with a stable code and a message that says what to pass instead:

Error
NameDescription
errorobject
2 fields
error fields
codestring

One of bad-request, not-found, server-error.

messagestring
StatuscodeWhen
400bad-requestA parameter is missing or invalid, or the reference isn't a text.
404not-foundThe author, work, section or passage isn't in the library.
429Too many requests from one address. Wait a minute.
500server-errorSomething went wrong on our side. Try again in a minute.

A bad parameter

curl
curl "https://interlinea.aeterna-institute.org/api/v1/search?q=homer&limit=500"
Response400 Bad Request
{
  "error": {
    "code": "bad-request",
    "message": "limit: Too big: expected number to be <=100"
  }
}
Cache-Control: public, max-age=300

Not in the library

curl
curl "https://interlinea.aeterna-institute.org/api/v1/library/latin/nobody"
Response404 Not Found
{
  "error": {
    "code": "not-found",
    "message": "nobody isn't in the library."
  }
}
Cache-Control: public, max-age=300, s-maxage=3600

Over MCP

A tool never answers with a protocol error for a bad reference. It returns a result with isError: true and the same kind of message, so the model can read it and try again. See MCP errors.