Get generation content

GET/v1/generation/content

Get stored input and output content for a generation.

Use X-Trace-ID from the original model response headers as the generation lookup ID. If X-Trace-ID and X-Request-ID differ, this endpoint uses X-Trace-ID. Do not use the response body id such as chatcmpl_....

Authentication

Authorization Bearer

API key as bearer token in Authorization header.

Query Parameters

idstringrequired

X-Trace-ID from the original model response. If X-Trace-ID and X-Request-ID differ, use X-Trace-ID, not the response body id.

Response

dataobject

Stored generation content.

data.inputobject | null

Original request payload when available.

data.outputobject | null

Sanitized response payload when available. Shape may vary by model; examples include chat choices, image data arrays, or video task fields. For text and vision models, internal upstream usage diagnostics such as upstream_usage and usage_from_upstream are omitted; use data.output.usage when present.

Errors

  • 400: Missing required id query parameter.
  • 401: Missing or invalid Authorization.
  • 404: Generation not found, or it is not accessible with the authenticated API key.

Request

Shell
1curl "https://api.token360.ai/v1/generation/content?id={request_id}" \
2  -H "Authorization: Bearer sk-your-api-key"

Response

JSON
1{
2  "data": {
3    "input": {
4      "max_completion_tokens": 8,
5      "messages": [
6        {
7          "content": "Reply with exactly: ok",
8          "role": "user"
9        }
10      ],
11      "model": "qwen3.6-plus",
12      "temperature": 0
13    },
14    "output": {
15      "choices": [
16        {
17          "finish_reason": "stop",
18          "index": 0,
19          "message": {
20            "content": "ok",
21            "reasoning": "The model reasoning output when available.",
22            "role": "assistant"
23          }
24        }
25      ],
26      "created": 1780973148,
27      "id": "chatcmpl-eb6380452ba9ad685c22db5c",
28      "object": "chat.completion",
29      "usage": {
30        "completion_tokens": 149,
31        "completion_tokens_details": {
32          "reasoning_tokens": 143,
33          "text_tokens": 149
34        },
35        "prompt_tokens": 15,
36        "prompt_tokens_details": {
37          "text_tokens": 15
38        },
39        "total_tokens": 164
40      }
41    }
42  }
43}
Was this page helpful?