{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bithuman-ai/json-schema/bithuman-ai-usage-event-schema.json",
  "title": "UsageEvent",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bithuman-ai-openapi.yaml#/components/schemas/UsageEvent",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "activity_type": {
      "type": "string"
    },
    "pricing_code": {
      "type": "string"
    },
    "app": {
      "type": "string"
    },
    "agent_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "credits_change": {
      "type": "number",
      "description": "Signed credit delta; usage events are positive credits consumed."
    },
    "frames_rendered": {
      "type": [
        "integer",
        "null"
      ]
    },
    "room_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "start_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "end_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}