{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/isgenai/json-schema/isgenai-check-response-schema.json",
  "title": "CheckResponse",
  "description": "Fields may be added. Inspect public_result, evidence, adapter_runs and limitations together; an HTTP 200 does not guarantee an available detector or resolved origin. Image diagnostics are optional and do not change the origin verdict.",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/isgenai-openapi.json#/components/schemas/CheckResponse",
  "type": "object",
  "properties": {
    "schema": {
      "type": "string",
      "enum": [
        "isgenai.check.v1"
      ]
    },
    "id": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "input": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "file",
            "url",
            "article",
            "text",
            "code"
          ]
        },
        "privacy": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "url": {
          "type": "string"
        },
        "final_url": {
          "type": "string",
          "format": "uri"
        },
        "file_name": {
          "type": "string"
        },
        "source_context": {
          "type": "string"
        }
      },
      "required": [
        "kind",
        "privacy"
      ]
    },
    "content": {
      "$ref": "#/$defs/Content"
    },
    "image_diagnostics": {
      "$ref": "#/$defs/ImageDiagnostics"
    },
    "article": {
      "type": "object",
      "properties": {
        "canonical_url": {
          "type": "string",
          "format": "uri"
        },
        "title": {
          "type": "string"
        },
        "publisher": {
          "type": "string"
        },
        "published_at": {
          "type": "string"
        },
        "selected_image_url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "case": {
      "$ref": "#/$defs/Case"
    },
    "verdict": {
      "$ref": "#/$defs/Verdict"
    },
    "public_result": {
      "$ref": "#/$defs/PublicResult"
    },
    "evidence": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Evidence"
      }
    },
    "disclosures": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Disclosure"
      }
    },
    "adapter_runs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AdapterRun"
      }
    },
    "variants": {
      "$ref": "#/$defs/Variants"
    },
    "receipt": {
      "$ref": "#/$defs/Receipt"
    },
    "cache": {
      "type": "object",
      "properties": {
        "hit": {
          "type": "boolean"
        },
        "matched_check_id": {
          "type": "string"
        }
      },
      "required": [
        "hit"
      ]
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "feedback": {
      "type": "object",
      "description": "Optional same-origin browser feedback ticket. Ordinary API calls work without this ticket or cookies.",
      "properties": {
        "ticket": {
          "type": "string"
        }
      },
      "required": [
        "ticket"
      ]
    }
  },
  "required": [
    "schema",
    "id",
    "created_at",
    "input",
    "case",
    "verdict",
    "evidence",
    "disclosures",
    "adapter_runs",
    "variants",
    "cache",
    "limitations"
  ],
  "$defs": {
    "AdapterRun": {
      "type": "object",
      "description": "Check status before using optional adapter-specific details. Fields inside details vary by provider; no fixed classifier score is guaranteed.",
      "properties": {
        "id": {
          "type": "string"
        },
        "check_id": {
          "type": "string"
        },
        "adapter": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "available",
            "not_configured",
            "access_required",
            "unavailable",
            "unsupported_media",
            "rate_limited",
            "error"
          ]
        },
        "started_at": {
          "type": "string",
          "format": "date-time"
        },
        "completed_at": {
          "type": "string",
          "format": "date-time"
        },
        "duration_ms": {
          "type": "number"
        },
        "outcome": {
          "type": "string"
        },
        "error_code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "required": [
        "id",
        "check_id",
        "adapter",
        "status",
        "started_at",
        "completed_at",
        "duration_ms"
      ]
    },
    "Case": {
      "type": "object",
      "description": "Case references may be included for private checks. Their presence does not mean the private case is publicly retrievable.",
      "properties": {
        "id": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "headline": {
          "type": "string",
          "enum": [
            "AI involvement verified",
            "Camera origin verified",
            "Origin unresolved"
          ]
        },
        "status": {
          "$ref": "#/$defs/VerdictCode"
        },
        "copy_relationship": {
          "type": "string",
          "enum": [
            "new_case",
            "exact",
            "near_duplicate",
            "possible_variant"
          ]
        },
        "earliest_known_source": {
          "$ref": "#/$defs/Source"
        },
        "related_copies": {
          "type": "integer",
          "minimum": 0
        },
        "submit_proof_url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "id",
        "url",
        "headline",
        "status",
        "copy_relationship",
        "related_copies",
        "submit_proof_url"
      ]
    },
    "Content": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "media_type": {
          "type": "string"
        },
        "byte_size": {
          "type": "integer",
          "minimum": 0
        },
        "fingerprint": {
          "$ref": "#/$defs/Fingerprint"
        }
      },
      "required": [
        "id",
        "sha256",
        "media_type",
        "byte_size"
      ]
    },
    "Disclosure": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "check_id": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "location": {
          "type": "string",
          "enum": [
            "page_text",
            "page_source",
            "metadata",
            "caption",
            "publisher_context",
            "user_context",
            "source_code"
          ]
        },
        "snippet": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "check_id",
        "source",
        "location",
        "snippet",
        "created_at"
      ]
    },
    "Evidence": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "check_id": {
          "type": "string"
        },
        "content_id": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "class": {
          "type": "string",
          "enum": [
            "cryptographic_provenance",
            "provider_watermark",
            "declarative_metadata",
            "explicit_disclosure",
            "probabilistic_detector",
            "historical_match",
            "variant_match"
          ]
        },
        "mechanism": {
          "type": "string"
        },
        "outcome": {
          "type": "string",
          "enum": [
            "detected",
            "not_detected",
            "manifest_present",
            "invalid",
            "match",
            "unavailable"
          ]
        },
        "strength": {
          "type": "string",
          "enum": [
            "strong",
            "moderate",
            "weak",
            "informational"
          ]
        },
        "directness": {
          "type": "string",
          "enum": [
            "direct",
            "declarative",
            "circumstantial"
          ]
        },
        "summary": {
          "type": "string"
        },
        "snippet": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "details": {
          "type": "object",
          "additionalProperties": true
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "check_id",
        "provider",
        "class",
        "mechanism",
        "outcome",
        "strength",
        "directness",
        "summary",
        "created_at"
      ]
    },
    "Fingerprint": {
      "type": "object",
      "properties": {
        "algorithm": {
          "type": "string",
          "enum": [
            "isgenai-dhash-v1"
          ]
        },
        "value": {
          "type": "string"
        },
        "width": {
          "type": "integer",
          "minimum": 0
        },
        "height": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "algorithm",
        "value"
      ]
    },
    "ImageDiagnostics": {
      "oneOf": [
        {
          "$ref": "#/$defs/ImageDiagnosticsAvailable"
        },
        {
          "$ref": "#/$defs/ImageDiagnosticsUnavailable"
        }
      ]
    },
    "ImageDiagnosticsAvailable": {
      "type": "object",
      "description": "EXIF-oriented dimensions and descriptive first-frame measurements. Decoding is bounded to 40 million input pixels, and sampling fits inside 512 x 512 without enlargement. Numeric measurements are rounded to two decimal places. No AI-origin score, blur verdict or authorship inference is produced.",
      "properties": {
        "version": {
          "type": "string",
          "enum": [
            "isgenai.image-diagnostics.v1"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "available"
          ]
        },
        "width": {
          "type": "integer",
          "minimum": 1
        },
        "height": {
          "type": "integer",
          "minimum": 1
        },
        "megapixels": {
          "type": "number",
          "minimum": 0
        },
        "sample_width": {
          "type": "integer",
          "minimum": 1,
          "maximum": 512
        },
        "sample_height": {
          "type": "integer",
          "minimum": 1,
          "maximum": 512
        },
        "frames": {
          "type": "integer",
          "minimum": 1
        },
        "scope": {
          "type": "string",
          "enum": [
            "first_frame"
          ]
        },
        "visible_pixel_percent": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Percentage of sampled pixels with alpha greater than zero."
        },
        "transparent_pixel_percent": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Percentage of sampled pixels with alpha less than one. Partially transparent pixels count in both visible and transparent percentages, so these are not complements."
        },
        "brightness_mean": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 255,
          "description": "Alpha-weighted mean of 0.2126R + 0.7152G + 0.0722B using decoded 8-bit sRGB values; null when no visible sample exists."
        },
        "brightness_stddev": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 127.5,
          "description": "Alpha-weighted standard deviation of the same brightness values; null when no visible sample exists."
        },
        "dark_pixel_percent": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 100,
          "description": "Alpha-weighted percentage with brightness <= 8; null when no visible sample exists."
        },
        "light_pixel_percent": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 100,
          "description": "Alpha-weighted percentage with brightness >= 247; null when no visible sample exists."
        },
        "edge_difference_mean": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 255,
          "description": "Mean absolute brightness difference across horizontal and vertical adjacent samples, weighted by the smaller alpha. Null when no measurable neighbor pair exists, including a one-pixel image."
        }
      },
      "required": [
        "version",
        "status",
        "width",
        "height",
        "megapixels",
        "sample_width",
        "sample_height",
        "frames",
        "scope",
        "visible_pixel_percent",
        "transparent_pixel_percent",
        "brightness_mean",
        "brightness_stddev",
        "dark_pixel_percent",
        "light_pixel_percent",
        "edge_difference_mean"
      ]
    },
    "ImageDiagnosticsUnavailable": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "enum": [
            "isgenai.image-diagnostics.v1"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "unavailable"
          ]
        },
        "reason": {
          "type": "string",
          "enum": [
            "unsupported_format",
            "decode_failed_or_limit_exceeded"
          ]
        }
      },
      "required": [
        "version",
        "status",
        "reason"
      ]
    },
    "PublicResult": {
      "type": "object",
      "description": "Preferred user-facing interpretation. Missing AI signals do not establish human authorship; LIKELY AI is an estimate, not verified origin.",
      "properties": {
        "headline": {
          "type": "string",
          "enum": [
            "AI DETECTED",
            "LIKELY AI",
            "AI EDIT DETECTED",
            "NO AI SIGNAL DETECTED",
            "SIGNALS CONFLICT",
            "SCAN FAILED"
          ]
        },
        "basis": {
          "type": "string",
          "enum": [
            "Source record",
            "Instagram label",
            "Known copy",
            "Visual scan",
            "Public label",
            "Tool mention",
            "No direct signal",
            "Conflict",
            "Unavailable"
          ]
        },
        "summary": {
          "type": "string"
        },
        "facts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "caveat": {
          "type": "string"
        }
      },
      "required": [
        "headline",
        "basis",
        "summary",
        "facts"
      ]
    },
    "Receipt": {
      "type": "object",
      "description": "Present only when a public receipt was issued. A signed receipt records this check; it does not make every source claim true.",
      "properties": {
        "id": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "hash": {
          "type": "string"
        },
        "signature": {
          "type": "string"
        },
        "key_id": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "url",
        "hash",
        "signature",
        "key_id"
      ]
    },
    "Source": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "title": {
          "type": "string"
        },
        "publisher": {
          "type": "string"
        },
        "observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "check_id": {
          "type": "string"
        }
      },
      "required": [
        "observed_at",
        "check_id"
      ]
    },
    "Variant": {
      "type": "object",
      "properties": {
        "content_id": {
          "type": "string"
        },
        "check_id": {
          "type": "string"
        },
        "relationship": {
          "type": "string",
          "enum": [
            "exact",
            "near_duplicate",
            "possible_variant"
          ]
        },
        "distance": {
          "type": "number"
        },
        "source_url": {
          "type": "string",
          "format": "uri"
        },
        "verdict_code": {
          "$ref": "#/$defs/VerdictCode"
        }
      },
      "required": [
        "content_id",
        "relationship"
      ]
    },
    "Variants": {
      "type": "object",
      "description": "Known-copy matches are limited to the isGenAI corpus, not the entire web.",
      "properties": {
        "exact_matches": {
          "type": "integer",
          "minimum": 0
        },
        "near_duplicates": {
          "type": "integer",
          "minimum": 0
        },
        "possible_variants": {
          "type": "integer",
          "minimum": 0
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Variant"
          }
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "exact_matches",
        "near_duplicates",
        "possible_variants",
        "items",
        "note"
      ]
    },
    "Verdict": {
      "type": "object",
      "properties": {
        "code": {
          "$ref": "#/$defs/VerdictCode"
        },
        "label": {
          "type": "string",
          "enum": [
            "AI involvement verified",
            "Camera origin verified",
            "Origin unresolved"
          ]
        },
        "summary": {
          "type": "string"
        },
        "confidence": {
          "type": "string",
          "description": "Qualitative confidence in the evidence verdict. This is not a calibrated AI-authorship probability or detector accuracy score.",
          "enum": [
            "high",
            "medium",
            "low"
          ]
        },
        "caveats": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "code",
        "label",
        "summary",
        "confidence",
        "caveats"
      ]
    },
    "VerdictCode": {
      "type": "string",
      "enum": [
        "AI_INVOLVEMENT_VERIFIED",
        "CAMERA_ORIGIN_VERIFIED",
        "ORIGIN_UNRESOLVED"
      ]
    }
  }
}