{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/humanhours-dev/json-schema/humanhours-dev-post-v1-track-request-schema.json",
  "title": "PostV1TrackRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/humanhours-dev-openapi-generated.yml#/components/schemas/PostV1TrackRequest",
  "type": "object",
  "properties": {
    "agent_id": {
      "type": "string",
      "description": "your stable id"
    },
    "task_type": {
      "type": "string",
      "description": "see /docs/api/task-types"
    },
    "outcome": {
      "type": "string",
      "description": "\"success\" | \"failure\" | \"needs_review\""
    },
    "agent_duration_seconds": {
      "type": "number",
      "description": "wall-clock seconds the agent took"
    },
    "agent_cost": {
      "type": "number",
      "description": "cost of the agent run, in org currency"
    },
    "model": {
      "type": "string",
      "description": "model id; ideally the OpenRouter id, e.g. \"anthropic/claude-opus-4.8\""
    },
    "tokens_in": {
      "type": "number",
      "description": "input/prompt tokens for this run"
    },
    "tokens_out": {
      "type": "number",
      "description": "output/completion tokens for this run"
    },
    "human_baseline_minutes": {
      "type": "number",
      "description": "overrides task_type default for this event only"
    },
    "metadata": {
      "type": "object",
      "description": "free-form, indexed for /v1/reports"
    },
    "audit_sample": {
      "type": "object"
    },
    "audit_sample.input_excerpt": {
      "type": "string",
      "description": "up to 2000 chars"
    },
    "audit_sample.output_excerpt": {
      "type": "string",
      "description": "up to 2000 chars"
    },
    "audit_sample.model": {
      "type": "string"
    },
    "audit_sample.tokens_in": {
      "type": "number"
    },
    "audit_sample.tokens_out": {
      "type": "number"
    },
    "occurred_at": {
      "type": "string",
      "description": "ISO 8601, defaults to receipt time"
    }
  },
  "required": [
    "agent_id",
    "task_type"
  ]
}