> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inspack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Review content and return inspector results and aggregated summaries

> Review shared objects with inspector_ids, recommendations and memory, or use typed ctx for finding questions and summaries. Includes blocks and conversation metadata. Customer organization_id comes from authentication; system tokens may supply it. Customer brand_id must belong to the authenticated organization. The context_selection default is requested. One credit per request running inspectors, regardless of count. Questions and summaries of supplied findings are free; summaries that first run inspectors cost one credit. HTTP, transport and contract failures and wholly failed inspector runs refund an applied charge once. Partial successes and zero-violation results retain the charge. System tokens are exempt. Use inspector_ids [id] for a single inspection; multiple inspectors share one objects list. Different-content batches need separate review requests.



## OpenAPI

````yaml https://app.inspack.com/api/v1/docs/json post /api/v1/inspector/review
openapi: 3.1.0
info:
  title: GetGenAI API
  version: 1.38.0
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /api/v1/inspector/review:
    post:
      tags:
        - Inspector
      summary: Review content and return inspector results and aggregated summaries
      description: >-
        Review shared objects with inspector_ids, recommendations and memory, or
        use typed ctx for finding questions and summaries. Includes blocks and
        conversation metadata. Customer organization_id comes from
        authentication; system tokens may supply it. Customer brand_id must
        belong to the authenticated organization. The context_selection default
        is requested. One credit per request running inspectors, regardless of
        count. Questions and summaries of supplied findings are free; summaries
        that first run inspectors cost one credit. HTTP, transport and contract
        failures and wholly failed inspector runs refund an applied charge once.
        Partial successes and zero-violation results retain the charge. System
        tokens are exempt. Use inspector_ids [id] for a single inspection;
        multiple inspectors share one objects list. Different-content batches
        need separate review requests.
      operationId: review_api_review_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewResponse'
        '400':
          description: Invalid review input.
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: >-
            Customer organization missing, brand unavailable in the
            organization, or subscription inactive.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Review credits exhausted.
        '502':
          description: Upstream transport or response contract failure.
components:
  schemas:
    ReviewRequest:
      properties:
        document:
          anyOf:
            - $ref: '#/components/schemas/Document'
            - type: 'null'
        document_context:
          anyOf:
            - {}
            - type: 'null'
          title: Document Context
          description: >-
            Optional source metadata attached to the rendered document inspector
            object.
        objects:
          items:
            $ref: '#/components/schemas/ReviewImageObject'
          type: array
          title: Objects
        ctx:
          anyOf:
            - $ref: '#/components/schemas/ReviewContext'
            - type: 'null'
        context_selection:
          $ref: '#/components/schemas/ContextSelection'
          description: >-
            How inspector input is prepared from `document`. `requested` applies
            each inspector's requested_context and rule scopes, adding
            NO_REQUESTED_DATA markers for missing data. `none` renders the
            complete document to canonical inspector HTML without filtering.
          default: requested
        inspector_ids:
          items:
            type: integer
          type: array
          title: Inspector Ids
        include_recommendations:
          type: boolean
          title: Include Recommendations
          default: false
        organization_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Organization Id
        asset_type:
          anyOf:
            - $ref: '#/components/schemas/AssetType'
            - type: 'null'
        industry:
          anyOf:
            - $ref: '#/components/schemas/IndustryName'
            - type: 'null'
        countries:
          items:
            type: string
          type: array
          title: Countries
        brand_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Brand Id
        product_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Name
        use_case:
          anyOf:
            - type: string
            - type: 'null'
          title: Use Case
        max_recommendations:
          type: integer
          title: Max Recommendations
          default: 10
        doc_context:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Context
        insights_locale:
          anyOf:
            - type: string
            - type: 'null'
          title: Insights Locale
        previous_inspections:
          items:
            $ref: '#/components/schemas/PreviousInspection'
          type: array
          title: Previous Inspections
        session_context:
          items:
            $ref: '#/components/schemas/SessionContextItem'
          type: array
          title: Session Context
      type: object
      title: ReviewRequest
    ReviewResponse:
      properties:
        state:
          $ref: '#/components/schemas/ReviewSessionState'
        operation:
          anyOf:
            - $ref: '#/components/schemas/ReviewOperation'
            - type: 'null'
        document_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Document Version
        review_revision:
          anyOf:
            - type: string
            - type: 'null'
          title: Review Revision
        finding_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Finding Id
        selected_inspectors:
          items:
            type: integer
          type: array
          title: Selected Inspectors
        inspector_results:
          items:
            $ref: '#/components/schemas/InspectResponse'
          type: array
          title: Inspector Results
        inspector_errors:
          items:
            $ref: '#/components/schemas/InspectorReviewError'
          type: array
          title: Inspector Errors
        summaries:
          items:
            $ref: '#/components/schemas/AggregateViolation'
          type: array
          title: Summaries
        memory:
          anyOf:
            - $ref: '#/components/schemas/MemoryReconciliation'
            - type: 'null'
        blocks:
          items:
            $ref: '#/components/schemas/AgentBlock-Output'
          type: array
          title: Blocks
      type: object
      required:
        - state
      title: ReviewResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Document:
      properties:
        schema_version:
          type: integer
          const: 1
          title: Schema Version
          default: 1
        pages:
          items:
            $ref: '#/components/schemas/Page-Input'
          type: array
          title: Pages
      additionalProperties: false
      type: object
      title: Document
    ReviewImageObject:
      properties:
        type:
          type: string
          const: image
          title: Type
          default: image
        content:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: string
          title: Content
        ctx:
          anyOf:
            - {}
            - type: 'null'
          title: Ctx
      additionalProperties: false
      type: object
      required:
        - content
      title: ReviewImageObject
      description: Image-only companion object; review text always comes from Document v1.
    ReviewContext:
      oneOf:
        - $ref: '#/components/schemas/QuestionAboutExistingFindingContext'
        - $ref: '#/components/schemas/SummaryExistingFindingsContext'
        - $ref: '#/components/schemas/RegenerateExistingFindingContext'
      discriminator:
        propertyName: operation
        mapping:
          question_about_existing_finding: '#/components/schemas/QuestionAboutExistingFindingContext'
          regenerate_existing_finding: '#/components/schemas/RegenerateExistingFindingContext'
          summarize_findings: '#/components/schemas/SummaryExistingFindingsContext'
          summary_existing_findings: '#/components/schemas/SummaryExistingFindingsContext'
    ContextSelection:
      type: string
      enum:
        - none
        - requested
    AssetType:
      type: string
      enum:
        - ads_social_media
        - video_multimedia
        - print_materials
        - ads_promo_other
        - web_seo_content
        - email_crm
        - product_description
        - brief
        - owned_digital_product_other
        - packaging
        - labeling
        - master_label
        - retail_in_store
        - product_packaging_retail_other
        - pr_press_releases
        - legal_regulatory
        - brand_guidelines
        - safety_data_sheet
        - corporate_legal_brand_other
        - other
      title: AssetType
      description: >-
        Closed leaf taxonomy of asset types a precheck can classify.


        Values are identical to the DB ``asset_type.name`` so the classifier
        output

        resolves to a row with no translation. Extend by adding a member here
        and

        describing it in the classify prompt. Callers gate flows by comparing
        against

        a specific member (e.g. extract routes grounded extraction on

        ``packaging``/``labeling``).
    IndustryName:
      type: string
      enum:
        - FOOD_BEVERAGES
        - RAW_FOOD
        - NON_ALCOHOLIC_BEVERAGES
        - DIETARY_SUPPLEMENTS
        - FOOD_PRODUCTION
        - DAIRY
        - FARMING
        - RANCHING
        - FISHERY
        - RESTAURANTS
        - SUPERMARKETS
        - COSMETICS
        - PHARMA_AND_SUPPLEMENTS
        - PRESCRIPTION_DRUGS
        - OTC_DRUGS
        - SUPPLEMENTS
        - PHARMACEUTICALS
        - BIOTECHNOLOGY
        - ALCOHOL
        - DISTILLED_SPIRITS
        - MALT_BEVERAGES
        - WINE_AND_SPIRITS
        - TOBACCO
        - HOSPITAL_HEALTH_CARE
        - MEDICAL_DEVICES
        - MEDICAL_GASES
        - HEALTH_WELLNESS_AND_FITNESS
        - WEIGHT_LOSS
        - MEDICAL_PRACTICE
        - MENTAL_HEALTH_CARE
        - ALTERNATIVE_MEDICINE
        - VETERINARY
        - ENERGY
        - OIL_ENERGY
        - RENEWABLES_ENVIRONMENT
        - UTILITIES
        - ENVIRONMENTAL_SERVICES
        - GAMBLING_CASINOS
        - ADULT_PRODUCTS
        - DATING_SERVICES
        - RECREATIONAL_DRUGS
        - CANNABIS
        - PSYCHEDELIC_MUSHROOMS
        - MDMA
        - KETAMINE
        - HEC
        - REAL_ESTATE
        - STAFFING_AND_RECRUITING
        - CREDIT
        - BODY_MODIFICATION
        - OTHER_REGULATED
        - PEST_CONTROL
        - INFORMATION_TECHNOLOGY_AND_SERVICES
        - COMPUTER_SOFTWARE
        - COMPUTER_HARDWARE
        - COMPUTER_NETWORKING
        - COMPUTER_NETWORK_SECURITY
        - CONSUMER_ELECTRONICS
        - INFORMATION_SERVICES
        - INTERNET
        - SEMICONDUCTORS
        - NANOTECHNOLOGY
        - COMPUTER_GAMES
        - MOBILE_GAMES
        - TELECOMMUNICATIONS
        - WIRELESS
        - ENTERTAINMENT
        - BROADCAST_MEDIA
        - ONLINE_MEDIA
        - MEDIA_PRODUCTION
        - MOTION_PICTURES_AND_FILM
        - ANIMATION
        - MUSIC
        - PERFORMING_ARTS
        - PUBLISHING
        - NEWSPAPERS
        - PHOTOGRAPHY
        - FINE_ART
        - MUSEUMS_AND_INSTITUTIONS
        - WRITING_AND_EDITING
        - FINANCIAL_SERVICES
        - FINTECH
        - BANKING
        - CREDIT_UNIONS
        - CRYPTO
        - INSURANCE
        - LIFE_INSURANCE
        - ACCIDENT_SICKNESS_INSURANCE
        - ACCOUNTING
        - CAPITAL_MARKETS
        - INVESTMENT_BANKING
        - INVESTMENT_MANAGEMENT
        - VENTURE_CAPITAL_PRIVATE_EQUITY
        - CONSTRUCTION
        - ARCHITECTURE_PLANNING
        - CIVIL_ENGINEERING
        - BUILDING_MATERIALS
        - GLASS_CERAMICS_CONCRETE
        - COMMERCIAL_REAL_ESTATE
        - MACHINERY
        - INDUSTRIAL_AUTOMATION
        - MECHANICAL_OR_INDUSTRIAL_ENGINEERING
        - ELECTRICAL_ELECTRONIC_MANUFACTURING
        - CHEMICALS
        - PLASTICS
        - TEXTILES
        - PAPER_FOREST_PRODUCTS
        - PACKAGING_AND_CONTAINERS
        - PRINTING
        - FURNITURE
        - MINING_METALS
        - RAILROAD_MANUFACTURE
        - SHIPBUILDING
        - DEFENSE_SPACE
        - AVIATION_AEROSPACE
        - AUTOMOTIVE
        - TRANSPORTATION_TRUCKING_RAILROAD
        - LOGISTICS_AND_SUPPLY_CHAIN
        - WAREHOUSING
        - PACKAGE_FREIGHT_DELIVERY
        - AIRLINES_AVIATION
        - MARITIME
        - IMPORT_AND_EXPORT
        - CONSUMER_GOODS
        - RETAIL
        - WHOLESALE
        - CONSUMER_SERVICES
        - APPAREL_FASHION
        - LUXURY_GOODS_JEWELRY
        - SPORTING_GOODS
        - ARTS_AND_CRAFTS
        - BUSINESS_SUPPLIES_AND_EQUIPMENT
        - MANAGEMENT_CONSULTING
        - MARKETING_AND_ADVERTISING
        - MARKET_RESEARCH
        - PUBLIC_RELATIONS_AND_COMMUNICATIONS
        - DESIGN
        - GRAPHIC_DESIGN
        - HUMAN_RESOURCES
        - TRANSLATION_AND_LOCALIZATION
        - PROFESSIONAL_TRAINING_COACHING
        - OUTSOURCING_OFFSHORING
        - FACILITIES_SERVICES
        - SECURITY_AND_INVESTIGATIONS
        - LEGAL_SERVICES
        - LAW_PRACTICE
        - ALTERNATIVE_DISPUTE_RESOLUTION
        - JUDICIARY
        - EDUCATION_MANAGEMENT
        - HIGHER_EDUCATION
        - PRIMARY_SECONDARY_EDUCATION
        - E_LEARNING
        - RESEARCH
        - LIBRARIES
        - HOSPITALITY
        - LEISURE_TRAVEL_TOURISM
        - EVENTS_SERVICES
        - RECREATIONAL_FACILITIES_AND_SERVICES
        - SPORTS
        - GOVERNMENT_ADMINISTRATION
        - GOVERNMENT_RELATIONS
        - PUBLIC_POLICY
        - PUBLIC_SAFETY
        - LAW_ENFORCEMENT
        - MILITARY
        - LEGISLATIVE_OFFICE
        - EXECUTIVE_OFFICE
        - INTERNATIONAL_AFFAIRS
        - INTERNATIONAL_TRADE_AND_DEVELOPMENT
        - POLITICAL_ORGANIZATION
        - NON_PROFIT_ORGANIZATION_MANAGEMENT
        - PHILANTHROPY
        - FUND_RAISING
        - CIVIC_SOCIAL_ORGANIZATION
        - RELIGIOUS_INSTITUTIONS
        - THINK_TANKS
        - INDIVIDUAL_FAMILY_SERVICES
        - PROGRAM_DEVELOPMENT
      title: IndustryName
      description: Closed leaf taxonomy of industries (values == ``industry.name``).
    PreviousInspection:
      properties:
        inspector:
          $ref: '#/components/schemas/Inspector-Input'
          description: >-
            The inspector that produced this violation in the previous document
            version
        violation:
          $ref: '#/components/schemas/PreviousViolation'
          description: A previous-version violation together with its user-decision status
        source_summary:
          $ref: '#/components/schemas/SourceSummary'
          description: >-
            Aggregate summary that contained this violation in the previous
            version.
      type: object
      required:
        - inspector
        - violation
        - source_summary
      title: PreviousInspection
    SessionContextItem:
      properties:
        question:
          type: string
          minLength: 1
          title: Question
        answer:
          type: string
          minLength: 1
          title: Answer
      type: object
      required:
        - question
        - answer
      title: SessionContextItem
    ReviewSessionState:
      type: string
      enum:
        - responded_final
        - responded_iteration
      title: ReviewSessionState
    ReviewOperation:
      type: string
      enum:
        - question_about_existing_finding
        - summarize_findings
        - summary_existing_findings
        - regenerate_existing_finding
    InspectResponse:
      properties:
        inspector:
          $ref: '#/components/schemas/Inspector-Output'
          description: The inspector that performed the checks
        violations:
          items:
            $ref: '#/components/schemas/Violation-Output'
          type: array
          title: Violations
          description: >-
            A list of violations found during the inspection, each containing
            the content and issues related to the violation
      type: object
      required:
        - inspector
        - violations
      title: InspectResponse
      example:
        inspector:
          description: Checks advertising claims against substantiation rules.
          id: 51
          is_shared: false
          name: Advertising Claims
          requested_context: all_data
          short_description: Advertising claims
          short_name: Claims
          type: general
        violations:
          - block_id: b12
            content:
              text: 'Quick Approval Process: Apply in just minutes.'
            id: 0f1f6f0c-4f0a-4b0e-9a5c-1c6a2f9a7d31
            insight_summary: >-
              Marketing copy implies a guaranteed fast approval, which can
              mislead applicants and conflict with required disclosures.
            issues:
              - explanation: >-
                  Marketing copy implies a guaranteed fast approval, which can
                  mislead applicants and conflict with required disclosures.
                insight: >-
                  Qualify the speed claim with eligibility language or remove
                  the specific timeframe.
                rule:
                  name: Unsubstantiated Speed Claim
                  rule_id: 3412
                  text: >-
                    Claims about application or approval speed must include a
                    qualifying disclaimer.
            severity: MODERATE
            type: text
            violation_summary: >-
              Qualify the speed claim with eligibility language or remove the
              specific timeframe.
            violation_type: fix
    InspectorReviewError:
      properties:
        inspector:
          $ref: '#/components/schemas/Inspector-Output'
        rule_ids:
          items:
            type: integer
          type: array
          title: Rule Ids
        detail:
          type: string
          title: Detail
        error_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Type
          description: >-
            Exception class name of the failure, for diagnostics. The message
            itself is only logged.
      type: object
      required:
        - inspector
        - detail
      title: InspectorReviewError
    AggregateViolation:
      properties:
        id:
          type: string
          title: Id
          description: UUID
        type:
          type: string
          enum:
            - text
            - image
          title: Type
          description: >-
            Aggregate content type; raw image-ocr findings are normalized to
            image.
        grounding:
          items:
            $ref: '#/components/schemas/SummaryGrounding'
          type: array
          title: Grounding
          description: Current text block or image anchors that ground this summary.
        content:
          $ref: '#/components/schemas/ViolatedContent'
          description: The violated content; image summaries retain their URL in metadata.
        description:
          type: string
          title: Description
          description: >-
            One short noun phrase naming the finding, localized to
            insights_locale.
        why_summary_matters:
          type: string
          title: Why Summary Matters
          description: >-
            Concrete plain-language explanation of the consequence of leaving
            the finding unaddressed, localized to insights_locale.
        action_requirement:
          $ref: '#/components/schemas/ActionRequirementValue'
          description: >-
            How the user should react: required before issuance, recommended
            because action is advisable, or fyi as an optional improvement.
        action_description:
          type: string
          title: Action Description
          description: Short imperative description of the action the user should take.
        suggested_text:
          type: string
          title: Suggested Text
          description: >-
            Ready-to-use replacement or addition in the source content language,
            or an empty string when the action does not call for proposed copy.
        status:
          $ref: '#/components/schemas/ViolationStatusValue'
          description: >-
            Lifecycle status carried through memory reconciliation: 'active' for
            fresh or re-raised findings (the default, preserving pre-memory
            behavior), 'accepted'/'rejected' for summaries carried over from a
            previous document version without re-aggregation.
          default: active
        user_feedback:
          anyOf:
            - type: string
            - type: 'null'
          title: User Feedback
          description: >-
            User feedback echoed verbatim from the carried-over previous
            violation (the portal's rejectionReason). Null for fresh findings.
        previous_summaries:
          items:
            $ref: '#/components/schemas/PreviousSummaryReference'
          type: array
          title: Previous Summaries
          description: >-
            Immediate and inherited prior aggregate summaries for this finding,
            deduplicated by (summary_id, version) and ordered newest to oldest.
        violation_ids:
          items:
            type: string
          type: array
          title: Violation Ids
          description: >-
            Ids of the raw inspection violations aggregated into this summary (a
            single previous-violation id for memory carryover summaries).
      type: object
      required:
        - id
        - type
        - content
        - description
        - why_summary_matters
        - action_requirement
        - action_description
        - suggested_text
      title: AggregateViolation
      description: Action-oriented finding returned by ``/api/inspect/aggregate``.
    MemoryReconciliation:
      properties:
        invalidated_previous_ids:
          items:
            type: string
          type: array
          title: Invalidated Previous Ids
          description: >-
            Previous violations dropped from the result: their content is gone,
            they were judged resolved against the new content, or an accepted
            fix was applied.
        carried_over_previous_ids:
          items:
            type: string
          type: array
          title: Carried Over Previous Ids
          description: Previous accepted/rejected violations echoed as carryover summaries.
        kept_active_previous_ids:
          items:
            type: string
          type: array
          title: Kept Active Previous Ids
          description: >-
            Previous active violations kept and re-aggregated with the new
            violations.
        re_raised_previous_ids:
          items:
            type: string
          type: array
          title: Re Raised Previous Ids
          description: >-
            Previously accepted 'fix' violations whose issue persists in the new
            version; the matching new violations were kept active carrying a
            persistence note.
        suppressed_new_ids:
          items:
            type: string
          type: array
          title: Suppressed New Ids
          description: New violations dropped as duplicates of a previous violation.
      type: object
      title: MemoryReconciliation
      description: >-
        Bookkeeping of what memory reconciliation did with the previous
        violations (ENG-1787).
    AgentBlock-Output:
      oneOf:
        - $ref: '#/components/schemas/EvidenceBlock-Output'
        - $ref: '#/components/schemas/ExplanationBlock-Output'
        - $ref: '#/components/schemas/ReviewBriefBlock-Output'
      discriminator:
        propertyName: type
        mapping:
          evidence: '#/components/schemas/EvidenceBlock-Output'
          explanation: '#/components/schemas/ExplanationBlock-Output'
          review_brief: '#/components/schemas/ReviewBriefBlock-Output'
    UnauthorizedError:
      type: object
      properties:
        error:
          type: string
          example: Unauthorized
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Page-Input:
      properties:
        id:
          type: string
          minLength: 1
          title: Id
        number:
          type: integer
          minimum: 1
          title: Number
        width:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Width
        height:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Height
        blocks:
          items:
            $ref: '#/components/schemas/Block-Input'
          type: array
          title: Blocks
        panels:
          items:
            $ref: '#/components/schemas/Panel-Input'
          type: array
          title: Panels
        grounding_metadata:
          $ref: '#/components/schemas/GroundingMetadata-Input'
      additionalProperties: false
      type: object
      required:
        - id
        - number
        - grounding_metadata
      title: Page
    QuestionAboutExistingFindingContext:
      properties:
        operation:
          type: string
          const: question_about_existing_finding
          title: Operation
        user_message:
          type: string
          minLength: 1
          title: User Message
        history:
          items:
            $ref: '#/components/schemas/ConversationMessage'
          type: array
          title: History
        document_version:
          type: integer
          minimum: 1
          title: Document Version
        review_revision:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Review Revision
        finding:
          $ref: '#/components/schemas/AggregateViolation'
        sources:
          items:
            $ref: '#/components/schemas/FindingSource'
          type: array
          title: Sources
      additionalProperties: false
      type: object
      required:
        - operation
        - user_message
        - history
        - document_version
        - review_revision
        - finding
        - sources
      title: QuestionAboutExistingFindingContext
    SummaryExistingFindingsContext:
      properties:
        operation:
          type: string
          enum:
            - summarize_findings
            - summary_existing_findings
          title: Operation
        user_message:
          type: string
          minLength: 1
          title: User Message
        history:
          items:
            $ref: '#/components/schemas/ConversationMessage'
          type: array
          title: History
        document_version:
          type: integer
          minimum: 1
          title: Document Version
        review_revision:
          anyOf:
            - type: string
              pattern: ^[0-9a-f]{64}$
            - type: 'null'
          title: Review Revision
        summaries:
          anyOf:
            - items:
                $ref: '#/components/schemas/AggregateViolation'
              type: array
            - type: 'null'
          title: Summaries
      additionalProperties: false
      type: object
      required:
        - operation
        - user_message
        - history
        - document_version
        - review_revision
      title: SummaryExistingFindingsContext
    RegenerateExistingFindingContext:
      properties:
        operation:
          type: string
          const: regenerate_existing_finding
          title: Operation
        finding:
          $ref: '#/components/schemas/RegenerationFinding'
        sources:
          items:
            $ref: '#/components/schemas/RegenerationSource'
          type: array
          title: Sources
      additionalProperties: false
      type: object
      required:
        - operation
        - finding
        - sources
      title: RegenerateExistingFindingContext
      description: >-
        Scoped rewrite with caller-owned decisions and unchanged finding
        grounding.


        Rejected sources are omitted from aggregation; active and accepted
        sources

        remain eligible. Review hydrates the resulting replacements without
        memory

        reconciliation or inference for sources the caller omitted.
    Inspector-Input:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        short_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Name
        description:
          type: string
          title: Description
          default: ''
        short_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Description
        imageUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Imageurl
        is_shared:
          type: boolean
          title: Is Shared
          default: false
        requested_context:
          $ref: '#/components/schemas/RequestedContext'
          default: all_data
        type:
          type: string
          title: Type
          description: Deprecated inspector type. Use inspector categories instead.
          deprecated: true
          x-removal-note: Use inspector categories instead. This field will be removed.
      type: object
      required:
        - id
        - name
        - type
      title: Inspector
    PreviousViolation:
      properties:
        id:
          type: string
          title: Id
          description: UUID
        type:
          type: string
          enum:
            - text
            - image
            - image-ocr
          title: Type
          description: >-
            Specifies the type of content where the violation was found. Can
            either be 'text', 'image' or 'image-ocr'(text extracted from image)
        violation_type:
          $ref: '#/components/schemas/ViolationTypeValue'
          description: >-
            The action a reviewer should take on this violation: 'fix' (a
            mandatory rule — strictness required/prohibited — is breached and
            the content must be corrected), 'recommendation' (resolution needs
            reviewer judgement or external substantiation, or the violated rule
            is advisory), or 'informational' (an optional rule is unmet or
            context only; no action required). Defaults to 'fix' when absent,
            preserving legacy behavior.
          default: fix
        content:
          $ref: '#/components/schemas/ViolatedContent'
          description: >-
            The part of the content that contains the violation with optional
            position
        block_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Id
          description: >-
            Identifier of the structural block that contains the violating text,
            taken from the `grounding-block-id` attribute of the enclosing `<div
            data-section-marker="BLOCK: ...">` in the extracted HTML. Null when
            the content has no block markers.
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
          description: >-
            For image violations: human-readable description of the image region
            the violation is about (e.g. "front panel, bottom-right seal"). Null
            for text violations, which anchor via `content` instead.
        evidence:
          anyOf:
            - type: string
            - type: 'null'
          title: Evidence
          description: >-
            For image violations: what was observed in the anchored region — the
            exact on-image text being judged (transcribed verbatim) when the
            finding concerns text, otherwise a concise description of the visual
            element being judged, or of a missing required element and where it
            should appear. Null for text violations.
        issues:
          items:
            $ref: '#/components/schemas/ViolationIssue'
          type: array
          title: Issues
          description: >-
            The issues detected in the content, each with a rule, explanation
            and insight. Rule-based reviewer violations carry exactly one issue
            since ENG-1738 (one violation per rule), whose explanation/insight
            mirror insight_summary/violation_summary; multi-issue arrays only
            occur in pre-ENG-1738 stored payloads.
        severity:
          $ref: '#/components/schemas/SeverityValue'
          description: The severity of the violation, indicating how critical it is
        violation_summary:
          type: string
          title: Violation Summary
          description: >-
            Short summary of the action needed to resolve this violation,
            written in the request's insights_locale (default English); required
            wording quoted from a rule stays verbatim in its original language
        insight_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Insight Summary
          description: >-
            Short summary of what is wrong — why the anchored content violates
            the cited rule, written in the request's insights_locale (default
            English)
        correction:
          anyOf:
            - type: string
            - type: 'null'
          title: Correction
          description: >-
            Proposed replacement text. Always null for rule-based reviewer
            violations since ENG-1738 — corrections are generated by the
            aggregate layer (AggregateViolation.correction); only the plagiarism
            path still populates it per snippet.
        status:
          $ref: '#/components/schemas/ViolationStatusValue'
          description: >-
            User-decision lifecycle status this violation carried in the
            previous document version: 'active' (undecided), 'accepted', or
            'rejected'.
          default: active
        user_feedback:
          anyOf:
            - type: string
            - type: 'null'
          title: User Feedback
          description: >-
            Free-text user feedback recorded with the decision (the portal's
            rejectionReason). Used as matching context and echoed on carryover
            summaries.
      type: object
      required:
        - id
        - type
        - content
        - issues
        - severity
        - violation_summary
        - insight_summary
        - correction
      title: PreviousViolation
      description: >-
        A violation from the previous document version ("memory" input,
        ENG-1787).


        Same shape as the violations inside ``inspections``, extended with the

        user-decision state the portal recorded. Its inherited ``block_id`` is

        ignored: block ids are regenerated on re-extraction and are not stable

        across document versions, so previous violations are matched by their

        quoted text against the whole current content instead.
    SourceSummary:
      properties:
        summary_id:
          type: string
          title: Summary Id
          description: UUID of the aggregate summary in the previous version.
        version:
          type: string
          title: Version
          description: Version containing the prior aggregate summary.
        description:
          type: string
          title: Description
          description: Short finding phrase from the previous aggregate summary.
        why_summary_matters:
          type: string
          title: Why Summary Matters
          description: Concrete consequence from the previous aggregate summary.
        action_requirement:
          $ref: '#/components/schemas/ActionRequirementValue'
          description: User-reaction requirement from the previous aggregate summary.
        action_description:
          type: string
          title: Action Description
          description: Action wording from the previous aggregate summary.
        suggested_text:
          type: string
          title: Suggested Text
          description: Suggested copy from the previous aggregate summary.
        previous_summaries:
          items:
            $ref: '#/components/schemas/PreviousSummaryReference'
          type: array
          title: Previous Summaries
          description: Inherited lineage already carried by the previous aggregate summary.
      type: object
      required:
        - summary_id
        - version
        - description
        - why_summary_matters
        - action_requirement
        - action_description
        - suggested_text
      title: SourceSummary
      description: Prior aggregate wording and lineage supplied with a memory violation.
    Inspector-Output:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        short_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Name
        description:
          type: string
          title: Description
          default: ''
        short_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Description
        imageUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Imageurl
        is_shared:
          type: boolean
          title: Is Shared
          default: false
        requested_context:
          $ref: '#/components/schemas/RequestedContext'
          default: all_data
        type:
          type: string
          title: Type
          description: Deprecated inspector type. Use inspector categories instead.
          deprecated: true
          x-removal-note: Use inspector categories instead. This field will be removed.
      type: object
      required:
        - id
        - name
        - type
      title: Inspector
    Violation-Output:
      properties:
        id:
          type: string
          title: Id
          description: UUID
        type:
          type: string
          enum:
            - text
            - image
            - image-ocr
          title: Type
          description: >-
            Specifies the type of content where the violation was found. Can
            either be 'text', 'image' or 'image-ocr'(text extracted from image)
        violation_type:
          $ref: '#/components/schemas/ViolationTypeValue'
          description: >-
            The action a reviewer should take on this violation: 'fix' (a
            mandatory rule — strictness required/prohibited — is breached and
            the content must be corrected), 'recommendation' (resolution needs
            reviewer judgement or external substantiation, or the violated rule
            is advisory), or 'informational' (an optional rule is unmet or
            context only; no action required). Defaults to 'fix' when absent,
            preserving legacy behavior.
          default: fix
        content:
          $ref: '#/components/schemas/ViolatedContent'
          description: >-
            The part of the content that contains the violation with optional
            position
        block_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Id
          description: >-
            Identifier of the structural block that contains the violating text,
            taken from the `grounding-block-id` attribute of the enclosing `<div
            data-section-marker="BLOCK: ...">` in the extracted HTML. Null when
            the content has no block markers.
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
          description: >-
            For image violations: human-readable description of the image region
            the violation is about (e.g. "front panel, bottom-right seal"). Null
            for text violations, which anchor via `content` instead.
        evidence:
          anyOf:
            - type: string
            - type: 'null'
          title: Evidence
          description: >-
            For image violations: what was observed in the anchored region — the
            exact on-image text being judged (transcribed verbatim) when the
            finding concerns text, otherwise a concise description of the visual
            element being judged, or of a missing required element and where it
            should appear. Null for text violations.
        issues:
          items:
            $ref: '#/components/schemas/ViolationIssue'
          type: array
          title: Issues
          description: >-
            The issues detected in the content, each with a rule, explanation
            and insight. Rule-based reviewer violations carry exactly one issue
            since ENG-1738 (one violation per rule), whose explanation/insight
            mirror insight_summary/violation_summary; multi-issue arrays only
            occur in pre-ENG-1738 stored payloads.
        severity:
          $ref: '#/components/schemas/SeverityValue'
          description: The severity of the violation, indicating how critical it is
        violation_summary:
          type: string
          title: Violation Summary
          description: >-
            Short summary of the action needed to resolve this violation,
            written in the request's insights_locale (default English); required
            wording quoted from a rule stays verbatim in its original language
        insight_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Insight Summary
          description: >-
            Short summary of what is wrong — why the anchored content violates
            the cited rule, written in the request's insights_locale (default
            English)
        correction:
          anyOf:
            - type: string
            - type: 'null'
          title: Correction
          description: >-
            Proposed replacement text. Always null for rule-based reviewer
            violations since ENG-1738 — corrections are generated by the
            aggregate layer (AggregateViolation.correction); only the plagiarism
            path still populates it per snippet.
      type: object
      required:
        - id
        - type
        - content
        - issues
        - severity
        - violation_summary
        - insight_summary
        - correction
      title: Violation
    SummaryGrounding:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Reviewed image URL for image findings; null for text findings.
        block_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Id
          description: >-
            Current grounding-block-id for text findings; null for image
            findings.
        block_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Name
          description: Current BLOCK marker name when it can be resolved; otherwise null.
        group:
          anyOf:
            - type: string
            - type: 'null'
          title: Group
          description: >-
            Portal finding group: the violated rule's ctx.group_mapping when
            set, otherwise mapped from block_name; null when neither gives one.
      type: object
      title: SummaryGrounding
      description: Current-document anchor for an aggregate summary.
    ViolatedContent:
      properties:
        text:
          type: string
          title: Text
          description: The part of the content that contains the violation
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: >-
            Optional metadata about the violated content (e.g. extracted style
            attributes).
      type: object
      required:
        - text
      title: ViolatedContent
    ActionRequirementValue:
      type: string
      enum:
        - required
        - recommended
        - fyi
    ViolationStatusValue:
      type: string
      enum:
        - active
        - accepted
        - rejected
    PreviousSummaryReference:
      properties:
        summary_id:
          type: string
          title: Summary Id
          description: UUID of the earlier aggregate summary.
        version:
          type: string
          title: Version
          description: Document version that produced the earlier summary.
      type: object
      required:
        - summary_id
        - version
      title: PreviousSummaryReference
      description: Reference to an aggregate summary from an earlier document version.
    EvidenceBlock-Output:
      properties:
        type:
          type: string
          const: evidence
          title: Type
          default: evidence
        props:
          $ref: '#/components/schemas/EvidenceProps'
        sources:
          anyOf:
            - items:
                $ref: '#/components/schemas/BlockSource'
              type: array
              maxItems: 10
            - type: 'null'
          title: Sources
      additionalProperties: false
      type: object
      required:
        - props
      title: EvidenceBlock
    ExplanationBlock-Output:
      properties:
        type:
          type: string
          const: explanation
          title: Type
          default: explanation
        props:
          $ref: '#/components/schemas/ExplanationProps'
      additionalProperties: false
      type: object
      required:
        - props
      title: ExplanationBlock
    ReviewBriefBlock-Output:
      properties:
        type:
          type: string
          const: review_brief
          title: Type
          default: review_brief
        props:
          $ref: '#/components/schemas/ReviewBriefProps-Output'
      additionalProperties: false
      type: object
      required:
        - props
      title: ReviewBriefBlock
    Block-Input:
      properties:
        id:
          type: string
          minLength: 1
          title: Id
        label:
          type: string
          minLength: 1
          title: Label
        lang:
          type: string
          title: Lang
        bbox:
          anyOf:
            - $ref: '#/components/schemas/BBox'
            - type: 'null'
        rotation:
          anyOf:
            - $ref: '#/components/schemas/Rotation'
            - type: 'null'
        source_unit_ids:
          items:
            type: string
          type: array
          title: Source Unit Ids
        elements:
          items:
            $ref: '#/components/schemas/DocumentElement'
          type: array
          title: Elements
      additionalProperties: false
      type: object
      required:
        - id
        - label
        - lang
        - bbox
        - rotation
      title: Block
    Panel-Input:
      properties:
        id:
          type: string
          minLength: 1
          title: Id
        label:
          type: string
          minLength: 1
          title: Label
        bbox:
          anyOf:
            - $ref: '#/components/schemas/BBox'
            - type: 'null'
        rotation:
          anyOf:
            - $ref: '#/components/schemas/Rotation'
            - type: 'null'
        blocks:
          items:
            $ref: '#/components/schemas/Block-Input'
          type: array
          title: Blocks
        skipped_source_unit_ids:
          items:
            type: string
          type: array
          title: Skipped Source Unit Ids
      additionalProperties: false
      type: object
      required:
        - id
        - label
        - bbox
        - rotation
      title: Panel
    GroundingMetadata-Input:
      properties:
        coordinate_space:
          $ref: '#/components/schemas/CoordinateSpace'
        units:
          additionalProperties:
            $ref: '#/components/schemas/GroundingUnit'
          type: object
          title: Units
        panels:
          additionalProperties:
            $ref: '#/components/schemas/GroundingPanel-Input'
          type: object
          title: Panels
      additionalProperties: false
      type: object
      required:
        - coordinate_space
      title: GroundingMetadata
    ConversationMessage:
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
          title: Role
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        blocks:
          items:
            $ref: '#/components/schemas/AgentBlock-Input'
          type: array
          title: Blocks
      additionalProperties: false
      type: object
      required:
        - role
        - text
        - blocks
      title: ConversationMessage
    FindingSource:
      properties:
        inspector:
          $ref: '#/components/schemas/Inspector-Input'
        violation:
          $ref: '#/components/schemas/Violation-Input'
      additionalProperties: false
      type: object
      required:
        - inspector
        - violation
      title: FindingSource
    RegenerationFinding:
      properties:
        id:
          type: string
          title: Id
          description: UUID
        type:
          type: string
          enum:
            - text
            - image
          title: Type
          description: >-
            Aggregate content type; raw image-ocr findings are normalized to
            image.
        grounding:
          items:
            $ref: '#/components/schemas/SummaryGrounding'
          type: array
          title: Grounding
        content:
          $ref: '#/components/schemas/ViolatedContent'
          description: The violated content; image summaries retain their URL in metadata.
        description:
          type: string
          title: Description
          description: >-
            One short noun phrase naming the finding, localized to
            insights_locale.
        why_summary_matters:
          type: string
          title: Why Summary Matters
          description: >-
            Concrete plain-language explanation of the consequence of leaving
            the finding unaddressed, localized to insights_locale.
        action_requirement:
          $ref: '#/components/schemas/ActionRequirementValue'
          description: >-
            How the user should react: required before issuance, recommended
            because action is advisable, or fyi as an optional improvement.
        action_description:
          type: string
          title: Action Description
          description: Short imperative description of the action the user should take.
        suggested_text:
          type: string
          title: Suggested Text
          description: >-
            Ready-to-use replacement or addition in the source content language,
            or an empty string when the action does not call for proposed copy.
        status:
          $ref: '#/components/schemas/ViolationStatusValue'
          description: >-
            Lifecycle status carried through memory reconciliation: 'active' for
            fresh or re-raised findings (the default, preserving pre-memory
            behavior), 'accepted'/'rejected' for summaries carried over from a
            previous document version without re-aggregation.
          default: active
        user_feedback:
          anyOf:
            - type: string
            - type: 'null'
          title: User Feedback
          description: >-
            User feedback echoed verbatim from the carried-over previous
            violation (the portal's rejectionReason). Null for fresh findings.
        previous_summaries:
          items:
            $ref: '#/components/schemas/PreviousSummaryReference'
          type: array
          title: Previous Summaries
        violation_ids:
          items:
            type: string
            minLength: 1
          type: array
          minItems: 1
          title: Violation Ids
      additionalProperties: false
      type: object
      required:
        - id
        - type
        - grounding
        - content
        - description
        - why_summary_matters
        - action_requirement
        - action_description
        - suggested_text
        - previous_summaries
        - violation_ids
      title: RegenerationFinding
      description: Original aggregate with explicit grounding, contributors, and lineage.
    RegenerationSource:
      properties:
        inspector:
          $ref: '#/components/schemas/Inspector-Input'
        violation:
          $ref: '#/components/schemas/RegenerationViolation'
      additionalProperties: false
      type: object
      required:
        - inspector
        - violation
      title: RegenerationSource
    RequestedContext:
      anyOf:
        - type: string
          enum:
            - all_text
            - all_text_and_meta
            - all_images
            - all_data
        - items:
            type: string
          type: array
        - $ref: '#/components/schemas/PanelRequestedContext'
    ViolationTypeValue:
      type: string
      enum:
        - informational
        - recommendation
        - fix
    ViolationIssue:
      properties:
        rule:
          $ref: '#/components/schemas/ViolationRule'
          description: The rule that lead to the issue
        explanation:
          type: string
          title: Explanation
          description: What went wrong
        insight:
          type: string
          title: Insight
          description: Suggestions or insights on how to resolve the violation
      type: object
      required:
        - rule
        - explanation
        - insight
      title: ViolationIssue
    SeverityValue:
      type: string
      enum:
        - SEVERE
        - MODERATE
        - LOW
    EvidenceProps:
      properties:
        items:
          items:
            $ref: '#/components/schemas/EvidenceItem'
          type: array
          maxItems: 6
          minItems: 1
          title: Items
      additionalProperties: false
      type: object
      required:
        - items
      title: EvidenceProps
    BlockSource:
      type: string
      maxLength: 60
      minLength: 1
    ExplanationProps:
      properties:
        rung:
          type: string
          enum:
            - consequence
            - rationale
            - source
            - simpler
          title: Rung
        finding:
          anyOf:
            - type: string
              maxLength: 240
              minLength: 1
            - type: 'null'
          title: Finding
        headline:
          type: string
          maxLength: 400
          minLength: 1
          title: Headline
        detail:
          anyOf:
            - type: string
              maxLength: 500
              minLength: 1
            - type: 'null'
          title: Detail
        net:
          anyOf:
            - type: string
              maxLength: 300
              minLength: 1
            - type: 'null'
          title: Net
        citation:
          anyOf:
            - $ref: '#/components/schemas/ExplanationCitation'
            - type: 'null'
        upgrade:
          anyOf:
            - type: string
              maxLength: 300
              minLength: 1
            - type: 'null'
          title: Upgrade
      additionalProperties: false
      type: object
      required:
        - rung
        - headline
      title: ExplanationProps
    ReviewBriefProps-Output:
      properties:
        totals:
          $ref: '#/components/schemas/ReviewBriefTotals'
        groups:
          items:
            $ref: '#/components/schemas/ReviewBriefGroup-Output'
          type: array
          maxItems: 10
          minItems: 1
          title: Groups
        cleanGroups:
          anyOf:
            - items:
                $ref: '#/components/schemas/ReviewBriefCleanGroup'
              type: array
              maxItems: 10
            - type: 'null'
          title: Cleangroups
      additionalProperties: false
      type: object
      required:
        - totals
        - groups
      title: ReviewBriefProps
    BBox:
      prefixItems:
        - type: integer
        - type: integer
        - type: integer
        - type: integer
      type: array
      maxItems: 4
      minItems: 4
    Rotation:
      type: string
      enum:
        - rotation_0
        - rotation_90_clockwise
        - rotation_180
        - rotation_90_counterclockwise
        - skewed
        - mixed
        - unknown
    DocumentElement:
      oneOf:
        - $ref: '#/components/schemas/ParagraphElement'
        - $ref: '#/components/schemas/BulletListElement'
        - $ref: '#/components/schemas/NumberedListElement'
        - $ref: '#/components/schemas/TableElement'
      discriminator:
        propertyName: type
        mapping:
          bullet_list: '#/components/schemas/BulletListElement'
          numbered_list: '#/components/schemas/NumberedListElement'
          paragraph: '#/components/schemas/ParagraphElement'
          table: '#/components/schemas/TableElement'
    CoordinateSpace:
      properties:
        unit:
          type: string
          const: pixel
          title: Unit
          default: pixel
        origin:
          type: string
          const: top_left
          title: Origin
          default: top_left
        width:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Width
        height:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Height
      additionalProperties: false
      type: object
      title: CoordinateSpace
    GroundingUnit:
      properties:
        text:
          type: string
          title: Text
        bbox:
          anyOf:
            - $ref: '#/components/schemas/BBox'
            - type: 'null'
        rotation:
          anyOf:
            - $ref: '#/components/schemas/Rotation'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - text
        - bbox
        - rotation
      title: GroundingUnit
    GroundingPanel-Input:
      properties:
        bbox:
          anyOf:
            - $ref: '#/components/schemas/BBox'
            - type: 'null'
        rotation:
          anyOf:
            - $ref: '#/components/schemas/Rotation'
            - type: 'null'
        units:
          additionalProperties:
            $ref: '#/components/schemas/GroundingUnit'
          type: object
          title: Units
      additionalProperties: false
      type: object
      required:
        - bbox
        - rotation
      title: GroundingPanel
    AgentBlock-Input:
      oneOf:
        - $ref: '#/components/schemas/EvidenceBlock-Input'
        - $ref: '#/components/schemas/ExplanationBlock-Input'
        - $ref: '#/components/schemas/ReviewBriefBlock-Input'
      discriminator:
        propertyName: type
        mapping:
          evidence: '#/components/schemas/EvidenceBlock-Input'
          explanation: '#/components/schemas/ExplanationBlock-Input'
          review_brief: '#/components/schemas/ReviewBriefBlock-Input'
    Violation-Input:
      properties:
        id:
          type: string
          title: Id
          description: UUID
        type:
          type: string
          enum:
            - text
            - image
            - image-ocr
          title: Type
          description: >-
            Specifies the type of content where the violation was found. Can
            either be 'text', 'image' or 'image-ocr'(text extracted from image)
        violation_type:
          $ref: '#/components/schemas/ViolationTypeValue'
          description: >-
            The action a reviewer should take on this violation: 'fix' (a
            mandatory rule — strictness required/prohibited — is breached and
            the content must be corrected), 'recommendation' (resolution needs
            reviewer judgement or external substantiation, or the violated rule
            is advisory), or 'informational' (an optional rule is unmet or
            context only; no action required). Defaults to 'fix' when absent,
            preserving legacy behavior.
          default: fix
        content:
          $ref: '#/components/schemas/ViolatedContent'
          description: >-
            The part of the content that contains the violation with optional
            position
        block_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Id
          description: >-
            Identifier of the structural block that contains the violating text,
            taken from the `grounding-block-id` attribute of the enclosing `<div
            data-section-marker="BLOCK: ...">` in the extracted HTML. Null when
            the content has no block markers.
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
          description: >-
            For image violations: human-readable description of the image region
            the violation is about (e.g. "front panel, bottom-right seal"). Null
            for text violations, which anchor via `content` instead.
        evidence:
          anyOf:
            - type: string
            - type: 'null'
          title: Evidence
          description: >-
            For image violations: what was observed in the anchored region — the
            exact on-image text being judged (transcribed verbatim) when the
            finding concerns text, otherwise a concise description of the visual
            element being judged, or of a missing required element and where it
            should appear. Null for text violations.
        issues:
          items:
            $ref: '#/components/schemas/ViolationIssue'
          type: array
          title: Issues
          description: >-
            The issues detected in the content, each with a rule, explanation
            and insight. Rule-based reviewer violations carry exactly one issue
            since ENG-1738 (one violation per rule), whose explanation/insight
            mirror insight_summary/violation_summary; multi-issue arrays only
            occur in pre-ENG-1738 stored payloads.
        severity:
          $ref: '#/components/schemas/SeverityValue'
          description: The severity of the violation, indicating how critical it is
        violation_summary:
          type: string
          title: Violation Summary
          description: >-
            Short summary of the action needed to resolve this violation,
            written in the request's insights_locale (default English); required
            wording quoted from a rule stays verbatim in its original language
        insight_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Insight Summary
          description: >-
            Short summary of what is wrong — why the anchored content violates
            the cited rule, written in the request's insights_locale (default
            English)
        correction:
          anyOf:
            - type: string
            - type: 'null'
          title: Correction
          description: >-
            Proposed replacement text. Always null for rule-based reviewer
            violations since ENG-1738 — corrections are generated by the
            aggregate layer (AggregateViolation.correction); only the plagiarism
            path still populates it per snippet.
      type: object
      required:
        - id
        - type
        - content
        - issues
        - severity
        - violation_summary
        - insight_summary
        - correction
      title: Violation
    RegenerationViolation:
      properties:
        id:
          type: string
          title: Id
          description: UUID
        type:
          type: string
          enum:
            - text
            - image
            - image-ocr
          title: Type
          description: >-
            Specifies the type of content where the violation was found. Can
            either be 'text', 'image' or 'image-ocr'(text extracted from image)
        violation_type:
          $ref: '#/components/schemas/ViolationTypeValue'
          description: >-
            The action a reviewer should take on this violation: 'fix' (a
            mandatory rule — strictness required/prohibited — is breached and
            the content must be corrected), 'recommendation' (resolution needs
            reviewer judgement or external substantiation, or the violated rule
            is advisory), or 'informational' (an optional rule is unmet or
            context only; no action required). Defaults to 'fix' when absent,
            preserving legacy behavior.
          default: fix
        content:
          $ref: '#/components/schemas/ViolatedContent'
          description: >-
            The part of the content that contains the violation with optional
            position
        block_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Block Id
          description: >-
            Identifier of the structural block that contains the violating text,
            taken from the `grounding-block-id` attribute of the enclosing `<div
            data-section-marker="BLOCK: ...">` in the extracted HTML. Null when
            the content has no block markers.
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
          description: >-
            For image violations: human-readable description of the image region
            the violation is about (e.g. "front panel, bottom-right seal"). Null
            for text violations, which anchor via `content` instead.
        evidence:
          anyOf:
            - type: string
            - type: 'null'
          title: Evidence
          description: >-
            For image violations: what was observed in the anchored region — the
            exact on-image text being judged (transcribed verbatim) when the
            finding concerns text, otherwise a concise description of the visual
            element being judged, or of a missing required element and where it
            should appear. Null for text violations.
        issues:
          items:
            $ref: '#/components/schemas/ViolationIssue'
          type: array
          title: Issues
          description: >-
            The issues detected in the content, each with a rule, explanation
            and insight. Rule-based reviewer violations carry exactly one issue
            since ENG-1738 (one violation per rule), whose explanation/insight
            mirror insight_summary/violation_summary; multi-issue arrays only
            occur in pre-ENG-1738 stored payloads.
        severity:
          $ref: '#/components/schemas/SeverityValue'
          description: The severity of the violation, indicating how critical it is
        violation_summary:
          type: string
          title: Violation Summary
          description: >-
            Short summary of the action needed to resolve this violation,
            written in the request's insights_locale (default English); required
            wording quoted from a rule stays verbatim in its original language
        insight_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Insight Summary
          description: >-
            Short summary of what is wrong — why the anchored content violates
            the cited rule, written in the request's insights_locale (default
            English)
        correction:
          anyOf:
            - type: string
            - type: 'null'
          title: Correction
          description: >-
            Proposed replacement text. Always null for rule-based reviewer
            violations since ENG-1738 — corrections are generated by the
            aggregate layer (AggregateViolation.correction); only the plagiarism
            path still populates it per snippet.
        status:
          $ref: '#/components/schemas/ViolationStatusValue'
        user_feedback:
          anyOf:
            - type: string
            - type: 'null'
          title: User Feedback
          description: >-
            Free-text user feedback recorded with the decision (the portal's
            rejectionReason). Used as matching context and echoed on carryover
            summaries.
      additionalProperties: false
      type: object
      required:
        - id
        - type
        - content
        - issues
        - severity
        - violation_summary
        - insight_summary
        - correction
        - status
      title: RegenerationViolation
      description: Stored raw violation with an explicitly supplied user-decision status.
    PanelRequestedContext:
      type: string
    ViolationRule:
      properties:
        rule_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rule Id
          description: >-
            Stable identifier of the violated rule (the rule's database id),
            joined back from the rules payload the reviewer LLM was shown. Null
            for synthetic rules that have no stored counterpart (e.g.
            missing_page/plagiarism findings) or when the LLM cited an id not
            present in the payload.
        name:
          type: string
          title: Name
        text:
          type: string
          title: Text
        ctx:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Ctx
          description: >-
            Context of the stored rule, copied with its name and text. Its
            optional ``group_mapping`` sets the portal finding group of the
            summaries built from this violation. Null for synthetic rules and
            unmatched ids.
      type: object
      required:
        - name
        - text
      title: ViolationRule
    EvidenceItem:
      properties:
        claim:
          type: string
          maxLength: 160
          minLength: 1
          title: Claim
        detail:
          type: string
          maxLength: 500
          minLength: 1
          title: Detail
        source:
          type: string
          maxLength: 120
          minLength: 1
          title: Source
      additionalProperties: false
      type: object
      required:
        - claim
        - detail
        - source
      title: EvidenceItem
    ExplanationCitation:
      properties:
        reference:
          type: string
          maxLength: 120
          minLength: 1
          title: Reference
        url:
          anyOf:
            - type: string
              maxLength: 300
              minLength: 1
              format: uri
            - type: 'null'
          title: Url
        quote:
          anyOf:
            - type: string
              maxLength: 600
              minLength: 1
            - type: 'null'
          title: Quote
      additionalProperties: false
      type: object
      required:
        - reference
      title: ExplanationCitation
    ReviewBriefTotals:
      properties:
        findings:
          type: integer
          minimum: 0
          title: Findings
        duplicatesMerged:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Duplicatesmerged
        needAction:
          type: integer
          minimum: 0
          title: Needaction
        actionFindings:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Actionfindings
        recommended:
          type: integer
          minimum: 0
          title: Recommended
        fyi:
          type: integer
          minimum: 0
          title: Fyi
      additionalProperties: false
      type: object
      required:
        - findings
        - needAction
        - recommended
        - fyi
      title: ReviewBriefTotals
    ReviewBriefGroup-Output:
      properties:
        name:
          type: string
          maxLength: 60
          minLength: 1
          title: Name
        needAction:
          type: integer
          minimum: 0
          title: Needaction
        recommended:
          type: integer
          minimum: 0
          title: Recommended
        fyi:
          type: integer
          minimum: 0
          title: Fyi
        items:
          items:
            $ref: '#/components/schemas/ReviewBriefItem'
          type: array
          maxItems: 10
          title: Items
        collapsedItems:
          anyOf:
            - items:
                $ref: '#/components/schemas/ReviewBriefCollapsedItem'
              type: array
              maxItems: 20
            - type: 'null'
          title: Collapseditems
      additionalProperties: false
      type: object
      required:
        - name
        - needAction
        - recommended
        - fyi
        - items
      title: ReviewBriefGroup
    ReviewBriefCleanGroup:
      type: string
      maxLength: 60
      minLength: 1
    ParagraphElement:
      properties:
        type:
          type: string
          const: paragraph
          title: Type
          default: paragraph
        text:
          type: string
          title: Text
      additionalProperties: false
      type: object
      required:
        - text
      title: ParagraphElement
    BulletListElement:
      properties:
        type:
          type: string
          const: bullet_list
          title: Type
          default: bullet_list
        items:
          items:
            type: string
          type: array
          minItems: 1
          title: Items
      additionalProperties: false
      type: object
      required:
        - items
      title: BulletListElement
    NumberedListElement:
      properties:
        type:
          type: string
          const: numbered_list
          title: Type
          default: numbered_list
        items:
          items:
            type: string
          type: array
          minItems: 1
          title: Items
      additionalProperties: false
      type: object
      required:
        - items
      title: NumberedListElement
    TableElement:
      properties:
        type:
          type: string
          const: table
          title: Type
          default: table
        header_rows:
          items:
            items:
              type: string
            type: array
          type: array
          title: Header Rows
        body_rows:
          items:
            items:
              type: string
            type: array
          type: array
          title: Body Rows
      additionalProperties: false
      type: object
      title: TableElement
    EvidenceBlock-Input:
      properties:
        type:
          type: string
          const: evidence
          title: Type
          default: evidence
        props:
          $ref: '#/components/schemas/EvidenceProps'
        sources:
          anyOf:
            - items:
                $ref: '#/components/schemas/BlockSource'
              type: array
              maxItems: 10
            - type: 'null'
          title: Sources
      additionalProperties: false
      type: object
      required:
        - props
      title: EvidenceBlock
    ExplanationBlock-Input:
      properties:
        type:
          type: string
          const: explanation
          title: Type
          default: explanation
        props:
          $ref: '#/components/schemas/ExplanationProps'
      additionalProperties: false
      type: object
      required:
        - props
      title: ExplanationBlock
    ReviewBriefBlock-Input:
      properties:
        type:
          type: string
          const: review_brief
          title: Type
          default: review_brief
        props:
          $ref: '#/components/schemas/ReviewBriefProps-Input'
      additionalProperties: false
      type: object
      required:
        - props
      title: ReviewBriefBlock
    ReviewBriefItem:
      properties:
        instruction:
          type: string
          maxLength: 240
          minLength: 1
          title: Instruction
        location:
          anyOf:
            - type: string
              maxLength: 80
              minLength: 1
            - type: 'null'
          title: Location
        alternative:
          anyOf:
            - type: string
              maxLength: 240
              minLength: 1
            - type: 'null'
          title: Alternative
        trigger:
          anyOf:
            - type: string
              maxLength: 300
              minLength: 1
            - type: 'null'
          title: Trigger
        consequence:
          anyOf:
            - type: string
              maxLength: 300
              minLength: 1
            - type: 'null'
          title: Consequence
        locations:
          anyOf:
            - type: integer
              maximum: 99
              minimum: 2
            - type: 'null'
          title: Locations
        actions:
          items:
            $ref: '#/components/schemas/ReviewBriefAction'
          type: array
          maxItems: 4
          minItems: 1
          title: Actions
      additionalProperties: false
      type: object
      required:
        - instruction
        - actions
      title: ReviewBriefItem
    ReviewBriefCollapsedItem:
      properties:
        severity:
          type: string
          enum:
            - recommended
            - fyi
          title: Severity
        instruction:
          type: string
          maxLength: 240
          minLength: 1
          title: Instruction
        location:
          anyOf:
            - type: string
              maxLength: 80
              minLength: 1
            - type: 'null'
          title: Location
      additionalProperties: false
      type: object
      required:
        - severity
        - instruction
      title: ReviewBriefCollapsedItem
    ReviewBriefProps-Input:
      properties:
        totals:
          $ref: '#/components/schemas/ReviewBriefTotals'
        groups:
          items:
            $ref: '#/components/schemas/ReviewBriefGroup-Input'
          type: array
          maxItems: 10
          minItems: 1
          title: Groups
        cleanGroups:
          anyOf:
            - items:
                $ref: '#/components/schemas/ReviewBriefCleanGroup'
              type: array
              maxItems: 10
            - type: 'null'
          title: Cleangroups
      additionalProperties: false
      type: object
      required:
        - totals
        - groups
      title: ReviewBriefProps
    ReviewBriefAction:
      type: string
      maxLength: 48
      minLength: 1
    ReviewBriefGroup-Input:
      properties:
        name:
          type: string
          maxLength: 60
          minLength: 1
          title: Name
        needAction:
          type: integer
          minimum: 0
          title: Needaction
        recommended:
          type: integer
          minimum: 0
          title: Recommended
        fyi:
          type: integer
          minimum: 0
          title: Fyi
        items:
          items:
            $ref: '#/components/schemas/ReviewBriefItem'
          type: array
          maxItems: 10
          title: Items
        collapsedItems:
          anyOf:
            - items:
                $ref: '#/components/schemas/ReviewBriefCollapsedItem'
              type: array
              maxItems: 20
            - type: 'null'
          title: Collapseditems
      additionalProperties: false
      type: object
      required:
        - name
        - needAction
        - recommended
        - fyi
        - items
      title: ReviewBriefGroup
  responses:
    UnauthorizedError:
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.