{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/katechon-technology/json-schema/katechon-technology-usage-record-detail-schema.json",
  "title": "UsageRecordDetail",
  "description": "详情比列表多三项重载荷，列表里不返回。",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/katechon-technology-openapi.json#/components/schemas/UsageRecordDetail",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "project_name": {
      "type": "string",
      "title": "Project Name"
    },
    "purpose": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Purpose"
    },
    "task_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Id"
    },
    "task_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Type"
    },
    "media_type": {
      "type": "string",
      "title": "Media Type"
    },
    "provider": {
      "type": "string",
      "title": "Provider"
    },
    "model": {
      "type": "string",
      "title": "Model"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "error_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Code"
    },
    "error_params": {
      "title": "Error Params"
    },
    "error_message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Message"
    },
    "segment_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Segment Id"
    },
    "output_path": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Path"
    },
    "started_at": {
      "type": "string",
      "title": "Started At"
    },
    "finished_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Finished At"
    },
    "duration_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Duration Ms"
    },
    "cost_amount": {
      "type": "number",
      "title": "Cost Amount"
    },
    "currency": {
      "type": "string",
      "title": "Currency"
    },
    "cost_basis": {
      "type": "string",
      "title": "Cost Basis"
    },
    "input_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Input Tokens"
    },
    "output_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Tokens"
    },
    "usage_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Usage Tokens"
    },
    "image_input_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Image Input Tokens"
    },
    "image_output_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Image Output Tokens"
    },
    "text_input_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Text Input Tokens"
    },
    "text_output_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Text Output Tokens"
    },
    "resolution": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resolution"
    },
    "duration_seconds": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Duration Seconds"
    },
    "aspect_ratio": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Aspect Ratio"
    },
    "session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Session Id"
    },
    "prompt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Prompt"
    },
    "inputs": {
      "title": "Inputs"
    },
    "last_provider_response": {
      "title": "Last Provider Response"
    }
  },
  "type": "object",
  "required": [
    "id",
    "project_name",
    "media_type",
    "provider",
    "model",
    "status",
    "started_at",
    "cost_amount",
    "currency",
    "cost_basis"
  ]
}