Index Ai Academy
Glossary · Phase 8 · APIs

Request id

Also written: request ids, X-Request-Id

A unique id for one request, put in every log line and the response, so its trail can be found later.

A parcel carries a tracking number so anyone can find it among millions. Give every request a request id for the same reason. Generate one at the edge, or accept one from the caller or load balancer. Then put it in every log line for that request, return it in an X-Request-Id response header, and include it in error bodies. Support can then ask for that id and find the exact trail in seconds. Anthropic's API does this: every response carries a request-id header.

Try it now

This is how you deploy ten times a day and nobody notices.

Learn it properly

Running APIs in production · Versioning, CORS, caching, request ids and health checks. About 40 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write