What is X-Request-Id and why should I log it?
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
-ito see response headers. - Python (OpenAI SDK):
raw = client.chat.completions.with_raw_response.create(...), thenraw.headers.get("x-request-id");raw.parse()gives the normal response. - JavaScript (OpenAI SDK):
const { data, response } = await client.chat.completions.create({...}).withResponse();thenresponse.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#
- If calls fail unexpectedly, check status.clatterlabs.com before debugging further.
- Retry only
429and 5xx errors, with backoff; honourRetry-Afterwhen it's sent. Which errors to retry - Your key's account is responsible for your end users' text under the Abuse policy. What it means for apps
Still need help?#
- General support: support@clatterlabs.com or team@clatterlabs.xyz
- Infrastructure questions, or permanent deletion of your data (your whole account or one service): infrastructure@clatterlabs.xyz
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.xyzFor deleting your whole account or the data of one service.