Start with the response that your app or browser already received. Save its HTTP status, response headers and complete raw body together. The Workbench can inspect a body you paste, but it cannot restore omitted bytes or infer the HTTP status from the body.
1. Copy it from your browser’s Network panel
- Open Developer Tools and select Network before repeating the failing action. This records the request as it happens.
- Select the API request in the request list. In Headers, note the status code and save the response headers. Do not copy request headers that contain credentials.
- Open Response and switch to its raw or plain-text view if the browser offers one. Copy the entire response body, including every
data:event for a stream. The formatted Preview is convenient to read, but the raw body preserves the original text and event boundaries. - Keep the status and response headers beside the body. They are separate from the body and will not appear when you paste JSON into a checker.
Firefox’s Network Monitor documentation describes the status and response headers in the Headers tab and the full response content in the Response tab. Other browsers use similar Network panels, though button names can differ.
Mozilla Firefox Network Monitor: request details, status, headers and response2. Save one cURL response with its headers
Run this in a local terminal using the endpoint, request body and credential for the request you are diagnosing. The output file contains the HTTP status line, response headers and body. Keep it private until you have removed secrets.
curl -sS -i "$API_URL" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
--data-binary @request.json > raw-response.txt-i includes the response headers in cURL’s output; the shell redirect saves that output to raw-response.txt. In the file, find the blank line after the headers: the response body starts after it. Copy only that body into the Workbench and enter the saved status separately. If your endpoint uses a different authentication method, keep its existing local credential setup rather than adding a key to a shared command.
-i, --include3. Read an existing Fetch response as text
If your app already uses fetch(), make a clone immediately after the response arrives and before the app reads it with json(). This prints the HTTP status, browser-visible response headers and exact body text while leaving the original response available to the app.
const response = await fetch(url, options); // your existing request
const rawBody = await response.clone().text();
console.log({
status: response.status,
headers: Object.fromEntries(response.headers.entries()),
body: rawBody,
});fetch() can return a response for an HTTP error status; inspect response.status and read the body instead of assuming a non-2xx response has no useful content. Response.text() reads the body to completion. For a long-lived stream, it may not finish until the stream closes. A cross-origin page can also be prevented by CORS from reading the response or some headers; use the Network panel or cURL in that case. If no HTTP response arrived at all, there is no status or response body to copy.
Check the body before diagnosing it
- After trimming leading whitespace, a non-streaming Chat Completions body commonly starts with
{. - A captured server-sent event stream commonly starts with
data:. Keep blank lines and every event boundary intact. - If it starts with
<, you have an HTML page, not a JSON or SSE API response. Keep the status and headers; they help identify whether a proxy, sign-in page or other web layer answered.
The documented Chat Completions response is a JSON object; streaming returns a sequence of chunk objects. This check identifies the broad response shape only. It does not prove the body is complete, valid, or factually correct.
Chat Completions response referenceTry the captured text in the local inspector
- Open Inspect a response. Choose JSON for a single object or Chat Completions SSE for a stream.
- Paste the whole body, then enter the HTTP status you saved. Do not paste the headers into the body field.
- For a known-good input, download the handwritten usage-only SSE fixture, paste the complete file in SSE mode, and inspect it. It should report the stream as finished with
stop, even though that final usage frame contains nochoicestext.
The fixture is synthetic, not a captured provider response. If it works but your capture does not, compare the complete event boundaries and the exact body you copied. The local checker sends no request and cannot verify whether an endpoint is reachable.
Continue from the result
If the status or body indicates a failure, use the API error response guide to interpret them together. If the body arrived but JSON is invalid or required fields are missing, use the incomplete JSON troubleshooting guide.
Official browser, Fetch, cURL and API references checked 20 October 2026. Do not share an unredacted response capture.
Free API access and limits
Check the site free API access and limits before trying to obtain a site key. Read the current status and request limits before using a site key. It is not a source of official provider keys.
ChinaGenAI is not affiliated with the providers named here. This release contains setup guidance and explicitly labeled fictional examples, not claimed live model benchmarks.