{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/detectif-ai/json-schema/detectif-ai-credits-object-schema.json",
  "title": "CreditsObject",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/detectif-ai-api-openapi.json#/components/schemas/CreditsObject",
  "properties": {
    "request_id": {
      "type": "string",
      "title": "Request Id"
    },
    "object": {
      "type": "string",
      "const": "credits",
      "title": "Object"
    },
    "plan": {
      "type": "string",
      "enum": [
        "free",
        "unlimited"
      ],
      "title": "Plan",
      "description": "Your plan."
    },
    "unlimited": {
      "type": "boolean",
      "title": "Unlimited",
      "description": "true on the unlimited plan: checks use no credits and `available` is null."
    },
    "available": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Available",
      "description": "Credits you can use; null on the unlimited plan."
    },
    "reserved": {
      "type": "integer",
      "title": "Reserved",
      "description": "Credits held by checks that are still running."
    },
    "price_per_operation": {
      "type": "integer",
      "title": "Credits per check",
      "description": "Credits one completed check uses (0 on the unlimited plan)."
    }
  },
  "type": "object",
  "required": [
    "request_id",
    "object",
    "plan",
    "unlimited",
    "available",
    "reserved",
    "price_per_operation"
  ]
}