Clatter LabsHelp Center

What is X-Request-Id and why should I log it?

FAQUpdated

X-Request-Id is a unique id the Model API puts on every response, successful or not. Log it with your own records so a single request can be found later.

How to read it#

  • cURL: add -i to see response headers.
  • Python (OpenAI SDK): raw = client.chat.completions.with_raw_response.create(...), then raw.headers.get("x-request-id"); raw.parse() gives the normal response.
  • JavaScript (OpenAI SDK): const { data, response } = await client.chat.completions.create({...}).withResponse(); then response.headers.get("x-request-id").
  • Browsers: the header is exposed for CORS, so front-end code can read it too (but keep keys on your server).

When it helps#

  • Reporting a problem: include the X-Request-Id, the time and the error code.
  • Matching a request to its entry in Console › Logs. The completion id (chatcmpl-…) is also the request's entry in Logs.

Good to know#

Still need help?#

We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.