{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/serp-agent-com/json-schema/serp-agent-com-credits-overview-schema.json",
  "title": "CreditsOverview",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/serp-agent-com-openapi.json#/components/schemas/CreditsOverview",
  "type": "object",
  "required": [
    "balance_credits",
    "currency",
    "credit_usd_value",
    "unit_prices",
    "packs",
    "purchase"
  ],
  "properties": {
    "balance_credits": {
      "type": "integer",
      "description": "Whole credits available (1 credit = $1 = 100 cents of User balance)."
    },
    "currency": {
      "type": "string",
      "const": "USD"
    },
    "credit_usd_value": {
      "type": "number",
      "const": 1
    },
    "unit_prices": {
      "type": "object",
      "description": "Price in credits per work unit.",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "packs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "usd",
          "credits",
          "bonus_credits",
          "available"
        ],
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "pack_500",
              "pack_2000",
              "pack_10000"
            ]
          },
          "usd": {
            "type": "number"
          },
          "credits": {
            "type": "integer"
          },
          "bonus_credits": {
            "type": "integer",
            "description": "Free credits on top of the dollar price (volume discount)."
          },
          "available": {
            "type": "boolean",
            "description": "False while the operator has not configured the pack's Creem product (purchase would 503)."
          }
        }
      }
    },
    "purchase": {
      "type": "string",
      "const": "POST /v1/credits/purchases"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}