{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hud-ai/json-schema/hud-ai-inference-usage-response-schema.json",
  "title": "InferenceUsageResponse",
  "description": "Raw log listing for the request table.\n\nAggregates (totals, group-bys) live on ``GET /v2/usage/inference``.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hud-ai-inference-api-openapi.yml#/components/schemas/InferenceUsageResponse",
  "properties": {
    "logs": {
      "items": {
        "$ref": "#/$defs/InferenceUsageLog"
      },
      "type": "array",
      "title": "Logs"
    },
    "total_count": {
      "type": "integer",
      "title": "Total Count"
    },
    "team_id": {
      "type": "string",
      "format": "uuid",
      "title": "Team Id"
    }
  },
  "type": "object",
  "required": [
    "logs",
    "total_count",
    "team_id"
  ],
  "$defs": {
    "InferenceUsageLog": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "model": {
          "type": "string",
          "title": "Model"
        },
        "qa_analysis": {
          "type": "boolean",
          "title": "Qa Analysis",
          "default": false
        },
        "cost": {
          "type": "number",
          "title": "Cost"
        },
        "type": {
          "type": "string",
          "title": "Type"
        },
        "model_checkpoint_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Checkpoint Id"
        },
        "checkpoint": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Checkpoint"
        },
        "metadata": {
          "additionalProperties": true,
          "type": "object",
          "title": "Metadata"
        },
        "user_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "User Id"
        },
        "user_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "User Name"
        },
        "user_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "User Email"
        },
        "api_key_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Api Key Id"
        },
        "api_key_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Api Key Name"
        },
        "byok": {
          "type": "boolean",
          "title": "Byok",
          "default": false
        },
        "byok_credential_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Byok Credential Id"
        }
      },
      "type": "object",
      "required": [
        "id",
        "created_at",
        "model",
        "cost",
        "type"
      ],
      "title": "InferenceUsageLog",
      "description": "One inference request; QA analysis requests report ``model`` as the HUD QA label."
    }
  }
}