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● Supported

Official docs ↗

Request parameters

  • idstring必填◐ Partially supported

    query: 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

NameTypeDescription
idstringGeneration id that was queried.
modelstringModel that served the generation.
costnumber | nullCost charged for the generation in USD; null when not yet priced.
usageobjectToken usage of the generation.
usage.prompt_tokensnumberNumber of prompt tokens.
usage.completion_tokensnumberNumber of tokens in the completion.
usage.total_tokensnumberPrompt plus completion tokens.
usage.cached_input_tokensnumberPrompt tokens served from the prompt cache; null when not reported.
latency_msnumber | nullLatency of the generation in milliseconds; null when not recorded.
creatednumberUnix time in seconds at which the generation was recorded.