Model
Look up a generation
Look up one generation's cost, usage and latency by its id. The record becomes readable a few seconds after the call; until then the lookup answers 404 — retry shortly.
Call Create chat completion first; replace gen_123 with X-Praxis-Generation-Id from the response headers.
GET
/model/v1/generation● SupportedRequest parameters
idstring必填◐ Partially supportedquery: Generation ID from the X-Praxis-Generation-Id response header of the model request.
Use X-Praxis-Generation-Id from a /model response header; response-body ids and X-Request-Id return 404.
Returns
200
Platform errors (auth, rate limits, validation) and OCR errors use problem+json; other model call errors follow the endpoint's own format (OpenAI or Anthropic) — see error codes
Response
HTTP 200
Generation record
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Generation id that was queried. |
| model | string | Model that served the generation. |
| cost | number | null | Cost charged for the generation in USD; null when not yet priced. |
| usage | object | Token usage of the generation. |
| usage.prompt_tokens | number | Number of prompt tokens. |
| usage.completion_tokens | number | Number of tokens in the completion. |
| usage.total_tokens | number | Prompt plus completion tokens. |
| usage.cached_input_tokens | number | Prompt tokens served from the prompt cache; null when not reported. |
| latency_ms | number | null | Latency of the generation in milliseconds; null when not recorded. |
| created | number | Unix time in seconds at which the generation was recorded. |