Skip to content

Schema: token_usage_recorded_payload

Canonical token and estimated-cost accounting payload.

Payload schema for TokenUsageRecorded events.

Generated from src/spec_kitty_events/schemas/token_usage_recorded_payload.schema.json by scripts/schema_pages.py; never hand-edit (C-001).

Family

Part of the Semantics and Analytics Events event family.

Diagram

TokenUsageRecordedPayloadStructure of the JSON Schema TokenUsageRecordedPayload.$defs   $idspec-kitty-events/token_usage_recorded_payload$schemahttps://json-schema.org/draft/2020-12/schemaadditionalProperties☐ falsedescriptionCanonical token and estimated-cost accounting payload.properties   required   titleTokenUsageRecordedPayloadtypeobjectRuntimeActorIdentity   additionalProperties☐ falsedescriptionIdentity of a runtime actor (human, LLM, or service).properties   required   titleRuntimeActorIdentitytypeobjectactor_id   actor_type   display_name   model   provider   tool   descriptionUnique actor identifierminLength1titleActor IdtypestringdescriptionActor categorypattern^(human|llm|service)$titleActor Typetypestringdefault descriptionHuman-readable display nametitleDisplay NametypestringanyOf   default␀descriptionModel identifier (e.g., 'claude-opus-4-6')titleModel      typestringtypenullanyOf   default␀descriptionProvider (e.g., 'anthropic', 'openai')titleProvider      typestringtypenullanyOf   default␀descriptionTool identifiertitleTool      typestringtypenullactor_idactor_typeactor   estimated_cost_usd   input_tokens   mission_id   model   output_tokens   phase_name   provider   run_id   source   step_id   total_tokens   wp_id   anyOf   default␀descriptionRuntime actor identity when available      $ref#/$defs/RuntimeActorIdentitytypenulldescriptionEstimated USD cost for the usage recordminimum0titleEstimated Cost UsdtypenumberdescriptionPrompt/input token countminimum0titleInput TokenstypeintegerdescriptionCanonical mission identifierminLength1titleMission IdtypestringanyOf   default␀descriptionLLM model when availabletitleModel      minLength1typestringtypenulldescriptionCompletion/output token countminimum0titleOutput TokenstypeintegeranyOf   default␀descriptionMission phase name when knowntitlePhase Name      minLength1typestringtypenullanyOf   default␀descriptionLLM provider when availabletitleProvider      minLength1typestringtypenullanyOf   default␀descriptionMission run identifier when availabletitleRun Id      minLength1typestringtypenulldescriptionUsage data source identifierminLength1titleSourcetypestringanyOf   default␀descriptionMission step identifier when availabletitleStep Id      minLength1typestringtypenulldescriptionTotal token countminimum0titleTotal TokenstypeintegeranyOf   default␀descriptionWork-package identifier when availabletitleWp Id      minLength1typestringtypenullmission_idinput_tokensoutput_tokenstotal_tokensestimated_cost_usdsource
Structure of the JSON Schema TokenUsageRecordedPayload.

Properties

  • actor (RuntimeActorIdentity | null): Runtime actor identity when available
  • estimated_cost_usd (number, required): Estimated USD cost for the usage record
  • input_tokens (integer, required): Prompt/input token count
  • mission_id (string, required): Canonical mission identifier
  • model (string | null): LLM model when available
  • output_tokens (integer, required): Completion/output token count
  • phase_name (string | null): Mission phase name when known
  • provider (string | null): LLM provider when available
  • run_id (string | null): Mission run identifier when available
  • source (string, required): Usage data source identifier
  • step_id (string | null): Mission step identifier when available
  • total_tokens (integer, required): Total token count
  • wp_id (string | null): Work-package identifier when available

RuntimeActorIdentity

Identity of a runtime actor (human, LLM, or service).

  • actor_id (string, required): Unique actor identifier
  • actor_type (string, required): Actor category
  • display_name (string): Human-readable display name
  • model (string | null): Model identifier (e.g., 'claude-opus-4-6')
  • provider (string | null): Provider (e.g., 'anthropic', 'openai')
  • tool (string | null): Tool identifier

Source

Schema file: schemas/token_usage_recorded_payload.schema.json