{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pdf2md-dev/json-schema/pdf2md-dev-v2-limits-schema.json",
  "title": "V2Limits",
  "description": "Live actor entitlements (resolved from the subscription, §7.3)",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pdf2md-dev-openapi.json#/components/schemas/V2Limits",
  "type": "object",
  "properties": {
    "tier": {
      "$ref": "#/$defs/V2Tier"
    },
    "max_active_slots": {
      "type": "integer"
    },
    "max_concurrent_conversions": {
      "type": "integer"
    },
    "max_file_size_bytes": {
      "type": "integer",
      "format": "int64"
    },
    "processing_soft_budget_sec": {
      "type": "integer",
      "description": "The tier's visible \"time limit\": the engine runs up to it and returns a partial result + the tier disclaimer (truncated=true), rather than a rejection. Invariant: < processing_timeout_sec. Shown on pricing and in the disclaimer."
    },
    "processing_timeout_sec": {
      "type": "integer",
      "description": "The worker's internal hard-backstop (= soft + ~5 min); not a marketing limit."
    },
    "ready_ttl_sec": {
      "type": "integer"
    },
    "priority_base": {
      "type": "integer",
      "description": "§7.7, step-20 scale (anonymous=100)"
    },
    "pool_eligibility": {
      "type": "string",
      "enum": [
        "free_only",
        "free_and_paid"
      ]
    },
    "monthly_pages_soft_limit": {
      "type": [
        "integer",
        "null"
      ],
      "description": "EP-069: the monthly page allowance. SOFT on subscription tiers (past it the actor drops to the free pool for the rest of the cycle, never refused). HARD on anonymous (150), free (400) and lifetime (600) — those are refused with 409 quota_exceeded. Resolved for THIS actor: an API-key caller does not get the lifetime unlock (EP-070-T6)."
    },
    "monthly_pages_used": {
      "type": "integer",
      "format": "int64",
      "description": "EP-070-T7: pages converted this UTC calendar month. Present here as well as on /api/v2/limits because the extension cannot reach that path (it needs an API key or a session cookie, and a cross-site extension fetch has neither)."
    },
    "webhooks_enabled": {
      "type": "boolean"
    },
    "slots_in_use": {
      "type": "integer",
      "description": "slots occupied right now"
    },
    "rate_limits": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      },
      "description": "per-class: api_requests_per_min, job_creates_per_min, upload_bytes_per_hour, download_requests_per_min, mcp_tool_calls_per_min"
    }
  },
  "$defs": {
    "V2Tier": {
      "type": "string",
      "enum": [
        "anonymous",
        "free",
        "lifetime",
        "builder",
        "pro",
        "business",
        "enterprise"
      ],
      "description": "EP-069: `lifetime` is the one-time unlock, ranked BETWEEN free and builder — it raises the interactive limits and carries 600 pages/month, but grants no API keys, hosted MCP, webhooks or batch, so a subscription is genuinely more and its holder may still buy one.\n"
    }
  }
}