{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/searlo-tech/json-schema/searlo-tech-credits-balance-schema.json",
  "title": "CreditsBalance",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/searlo-tech-account-api-openapi.yml#/components/schemas/CreditsBalance",
  "type": "object",
  "required": [
    "success",
    "credits"
  ],
  "properties": {
    "success": {
      "type": "boolean"
    },
    "credits": {
      "type": "object",
      "required": [
        "available"
      ],
      "properties": {
        "available": {
          "type": "number",
          "description": "Credits you can spend now: the balance GET /user/profile shows (0 while the account is on hold)."
        },
        "reserved": {
          "type": "number",
          "description": "Present when known: how much of available requests still in flight, or awaiting settlement, already hold."
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "description": "Present when some credits expire: when the next ones do."
        },
        "expiringCredits": {
          "type": "number",
          "description": "Present with expiresAt: how many credits expire then."
        }
      }
    }
  }
}