{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiopod-ai/json-schema/audiopod-ai-credit-usage-log-schema.json",
  "title": "CreditUsageLog",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiopod-ai-credits-api-openapi.yml#/components/schemas/CreditUsageLog",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "user_credits_id": {
      "type": "string",
      "format": "uuid4",
      "title": "User Credits Id"
    },
    "credits_used": {
      "type": "integer",
      "title": "Credits Used"
    },
    "service_type": {
      "type": "string",
      "title": "Service Type",
      "description": "Type of service that used the credits"
    },
    "audio_duration": {
      "type": "integer",
      "minimum": -1.0,
      "title": "Audio Duration"
    },
    "credit_source": {
      "type": "string",
      "title": "Credit Source",
      "description": "Source of credits used",
      "default": "subscription"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "usage_metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Usage Metadata"
    }
  },
  "type": "object",
  "required": [
    "id",
    "user_credits_id",
    "credits_used",
    "service_type",
    "audio_duration",
    "created_at"
  ]
}