{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/routerplus-com/json-schema/routerplus-com-get-v1-generation-response-schema.json",
  "title": "GetV1GenerationResponse",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/routerplus-com-openapi-generated.yml#/components/schemas/GetV1GenerationResponse",
  "type": "object",
  "properties": {
    "request_id": {
      "type": "string",
      "description": "Echo of the queried id"
    },
    "admission_events": {
      "type": "array",
      "description": "List of limit or balance refusals recorded before any attempt"
    },
    "attempts": {
      "type": "array",
      "description": "Per‑attempt audit objects"
    },
    "attempts[].attempt": {
      "type": "number",
      "description": "Physical dispatch ordinal, starting at 1"
    },
    "attempts[].deployment": {
      "type": "string",
      "description": "Deployment that served this attempt"
    },
    "attempts[].model": {
      "type": "string",
      "description": "Model id used for the attempt"
    },
    "attempts[].outcome": {
      "type": "string",
      "description": "See outcome table"
    },
    "attempts[].usage_provenance": {
      "type": "string",
      "description": "observed, unknown, or estimated"
    },
    "attempts[].tokens": {
      "type": "object",
      "description": "Token counts for the attempt"
    },
    "attempts[].tokens.input": {
      "type": "number",
      "description": "Input tokens (cache‑inclusive)"
    },
    "attempts[].tokens.cached": {
      "type": "number",
      "description": "Cached reads"
    },
    "attempts[].tokens.cache_write": {
      "type": "number",
      "description": "Cache writes"
    },
    "attempts[].tokens.output": {
      "type": "number",
      "description": "Output tokens (or charge in micro‑dollars)"
    },
    "attempts[].tokens.reasoning": {
      "type": "number",
      "description": "Reasoning tokens (subset of output)"
    },
    "attempts[].reserved_max_usd": {
      "type": "number",
      "description": "Worst‑case hold taken before dispatch"
    },
    "attempts[].cost_usd": {
      "type": "number",
      "description": "Settled cost, includes any web‑search fee"
    },
    "attempts[].billing_source": {
      "type": "string",
      "description": "house or byok"
    },
    "attempts[].inference_cost_usd": {
      "type": "number",
      "description": "Cost attributed from pinned rates"
    },
    "attempts[].inference_price_source": {
      "type": "string",
      "description": "platform_list, customer_rate, unknown, or legacy_platform_list"
    },
    "attempts[].price_snapshot_id": {
      "type": "string",
      "description": "Identifier of the pinned rate snapshot"
    },
    "attempts[].fee_policy_version": {
      "type": "string",
      "description": "Economic policy applied to this attempt"
    },
    "attempts[].error_code": {
      "type": "string",
      "description": "Canonical error class on failure"
    },
    "attempts[].error_origin": {
      "type": "string",
      "description": "Where a failure came from"
    },
    "attempts[].admission_context": {
      "type": "object",
      "description": "Limits claimed at dispatch"
    },
    "attempts[].route_context": {
      "type": "object",
      "description": "Route plan behind this attempt"
    },
    "attempts[].dropped_params": {
      "type": "array",
      "description": "Parameter paths dropped for this deployment"
    },
    "attempts[].dispatched_at": {
      "type": "string",
      "description": "Dispatch timestamp"
    },
    "attempts[].server_tool_use": {
      "type": "object",
      "description": "Web‑search and fetch calls the provider ran"
    },
    "attempts[].server_tool_fee_usd": {
      "type": "number",
      "description": "Part of cost_usd that is web‑search fees"
    }
  }
}