AI Help

How do I find the request ID for a failed AI API call?

Capture the provider's request identifier from response headers or the SDK's documented response or error fields.

Steps to follow

  1. Log the local job ID, timestamp, endpoint, status and provider request ID when available.
  2. For failed requests, inspect the SDK exception or raw response headers. A transport failure may occur before any provider ID is received.
  3. Provide the request ID and relevant timing to support while keeping credentials and private payloads out of logs.

Example in practice

Illustrative example. A 500 response with a request ID can be correlated with one application job without logging the customer's full prompt.

Related AI help

Official guidance

OpenAI documentation