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

# Read compact corpus orientation

> Manual purpose and coverage with a bounded factual inventory. Orientation is not source evidence.



## OpenAPI

````yaml /openapi.json get /corpus-overview
openapi: 3.1.0
info:
  title: AI Baseline API
  description: REST contract for AI Baseline queries and metadata-filter discovery.
  version: 12.6.2
servers:
  - url: https://api.ai-baseline.dev/baseline/sandp500
    description: Configured API
security:
  - ApiKeyAuth: []
paths:
  /corpus-overview:
    get:
      tags:
        - Public Tool
      summary: Read compact corpus orientation
      description: >-
        Manual purpose and coverage with a bounded factual inventory.
        Orientation is not source evidence.
      operationId: getCorpusOverview
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CorpusOverviewV1'
                  - $ref: '#/components/schemas/CorpusOverviewV2'
                title: Response Getcorpusoverview
        '404':
          description: Unknown domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Request body too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailureResponse'
        '502':
          description: An AI upstream returned output that failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailureResponse'
        '503':
          description: Service, AI dependency, or local capacity temporarily unavailable
          headers:
            Retry-After:
              description: Advisory delay in seconds for retryable failures
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              examples:
                capacity_queue_full:
                  summary: The bounded capacity waiting room is full
                  value:
                    status_code: 503
                    message: Service temporarily at capacity
                    detail:
                      code: CAPACITY_UNAVAILABLE
                      retryable: true
                      reason: queue_full
                      retry_after_seconds: 5
                capacity_wait_timeout:
                  summary: Capacity was not acquired before the wait timeout
                  value:
                    status_code: 503
                    message: Service temporarily at capacity
                    detail:
                      code: CAPACITY_UNAVAILABLE
                      retryable: true
                      reason: wait_timeout
                      retry_after_seconds: 5
                dependency_unavailable:
                  summary: A required AI upstream service is unavailable
                  value:
                    status_code: 503
                    message: >-
                      A required AI upstream service is temporarily unavailable.
                      Please retry.
                    detail:
                      code: DEPENDENCY_UNAVAILABLE
                      retryable: true
                      retry_after_seconds: 10
                service_unavailable:
                  summary: Application services are unavailable
                  value:
                    status_code: 503
                    message: Service unavailable
                    detail:
                      code: SERVICE_UNAVAILABLE
                      retryable: false
              schema:
                $ref: '#/components/schemas/RequestFailureResponse'
        '504':
          description: The admitted request exceeded its execution deadline
          headers:
            Retry-After:
              description: Advisory delay in seconds before retrying
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestFailureResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CorpusOverviewV1:
      properties:
        schema_version:
          type: integer
          const: 1
          title: Schema Version
          default: 1
        corpus_id:
          type: string
          maxLength: 200
          minLength: 1
          title: Corpus Id
        visibility_scope:
          type: string
          const: connection
          title: Visibility Scope
          default: connection
        policy_fingerprint:
          $ref: '#/components/schemas/Digest'
        authoring_mode:
          type: string
          const: manual
          title: Authoring Mode
          default: manual
        text_state:
          type: string
          enum:
            - missing
            - current
            - needs_review
            - withheld
          title: Text State
        text:
          anyOf:
            - $ref: '#/components/schemas/CorpusOverviewTextV1'
            - type: 'null'
        text_revision:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          title: Text Revision
        text_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Text Updated At
        inventory_state:
          type: string
          enum:
            - unavailable
            - fresh
            - stale
          title: Inventory State
        inventory:
          anyOf:
            - $ref: '#/components/schemas/CorpusInventoryV1'
            - type: 'null'
        inventory_revision:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          title: Inventory Revision
        inventory_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Inventory Updated At
      additionalProperties: false
      type: object
      required:
        - corpus_id
        - policy_fingerprint
        - text_state
        - text
        - text_revision
        - text_updated_at
        - inventory_state
        - inventory
        - inventory_revision
        - inventory_updated_at
      title: CorpusOverviewV1
      description: Public orientation shared by API and MCP, bounded independently of size.
    CorpusOverviewV2:
      properties:
        schema_version:
          type: integer
          const: 2
          title: Schema Version
          default: 2
        corpus_id:
          type: string
          maxLength: 200
          minLength: 1
          title: Corpus Id
        visibility_scope:
          type: string
          const: connection
          title: Visibility Scope
          default: connection
        policy_fingerprint:
          $ref: '#/components/schemas/Digest'
        authoring_mode:
          type: string
          const: manual
          title: Authoring Mode
          default: manual
        text_state:
          type: string
          enum:
            - missing
            - current
            - needs_review
            - withheld
          title: Text State
        text:
          anyOf:
            - $ref: '#/components/schemas/CorpusOverviewTextV1'
            - type: 'null'
        text_revision:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          title: Text Revision
        text_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Text Updated At
        inventory_state:
          type: string
          enum:
            - unavailable
            - fresh
            - stale
          title: Inventory State
        inventory:
          anyOf:
            - $ref: '#/components/schemas/CorpusInventoryV2'
            - type: 'null'
        inventory_revision:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          title: Inventory Revision
        inventory_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Inventory Updated At
      additionalProperties: false
      type: object
      required:
        - corpus_id
        - policy_fingerprint
        - text_state
        - text
        - text_revision
        - text_updated_at
        - inventory_state
        - inventory
        - inventory_revision
        - inventory_updated_at
      title: CorpusOverviewV2
      description: >-
        Current manual orientation and provider-selected inventory for API and
        MCP.
    ErrorResponse:
      properties:
        status_code:
          type: integer
          title: Status Code
        message:
          type: string
          title: Message
        detail:
          anyOf:
            - {}
            - type: 'null'
          title: Detail
      type: object
      required:
        - status_code
        - message
      title: ErrorResponse
    RequestFailureResponse:
      properties:
        status_code:
          type: integer
          enum:
            - 500
            - 502
            - 503
            - 504
          title: Status Code
        message:
          type: string
          title: Message
        detail:
          $ref: '#/components/schemas/RequestFailureDetail'
      additionalProperties: false
      type: object
      required:
        - status_code
        - message
        - detail
      title: RequestFailureResponse
    Digest:
      type: string
      title: Digest
      description: A lowercase SHA-256 digest with an explicit algorithm prefix.
    CorpusOverviewTextV1:
      properties:
        purpose:
          type: string
          maxLength: 1000
          title: Purpose
        coverage_narrative:
          type: string
          maxLength: 3000
          title: Coverage Narrative
      additionalProperties: false
      type: object
      required:
        - purpose
        - coverage_narrative
      title: CorpusOverviewTextV1
      description: Current operator-authored content, with no generated authoring mode.
    CorpusInventoryV1:
      properties:
        count_unit:
          type: string
          const: eligible_source_record
          title: Count Unit
          default: eligible_source_record
        document_count:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          title: Document Count
        publication_dates:
          anyOf:
            - $ref: '#/components/schemas/CorpusDateCoverageV1'
            - type: 'null'
        document_types:
          items:
            $ref: '#/components/schemas/CorpusTypeCountV1'
          type: array
          maxItems: 8
          title: Document Types
        other_type_count:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          title: Other Type Count
        missing_type_count:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          title: Missing Type Count
        topics:
          type: string
          enum:
            - unsupported
            - not_in_inventory
          title: Topics
      additionalProperties: false
      type: object
      required:
        - document_count
        - publication_dates
        - document_types
        - other_type_count
        - missing_type_count
        - topics
      title: CorpusInventoryV1
      description: Measured facts for one published inventory, never source evidence.
    CorpusInventoryV2:
      properties:
        fields:
          items:
            oneOf:
              - $ref: '#/components/schemas/CorpusDateCoverageV2'
              - $ref: '#/components/schemas/CorpusCategoryCoverageV2'
            discriminator:
              propertyName: kind
              mapping:
                categories: '#/components/schemas/CorpusCategoryCoverageV2'
                date_range: '#/components/schemas/CorpusDateCoverageV2'
          type: array
          minItems: 1
          title: Fields
      additionalProperties: false
      type: object
      required:
        - fields
      title: CorpusInventoryV2
      description: Selected facts only; private maintenance totals are not public fields.
    RequestFailureDetail:
      properties:
        code:
          $ref: '#/components/schemas/FailureCode'
        retryable:
          type: boolean
          title: Retryable
        reason:
          anyOf:
            - type: string
              enum:
                - queue_full
                - wait_timeout
            - type: 'null'
          title: Reason
        retry_after_seconds:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Retry After Seconds
      additionalProperties: false
      type: object
      required:
        - code
        - retryable
      title: RequestFailureDetail
    CorpusDateCoverageV1:
      properties:
        earliest:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Earliest
        latest:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Latest
        missing_count:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          title: Missing Count
      additionalProperties: false
      type: object
      required:
        - earliest
        - latest
        - missing_count
      title: CorpusDateCoverageV1
    CorpusTypeCountV1:
      properties:
        value:
          type: string
          maxLength: 80
          minLength: 1
          title: Value
        count:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          title: Count
      additionalProperties: false
      type: object
      required:
        - value
        - count
      title: CorpusTypeCountV1
    CorpusDateCoverageV2:
      properties:
        field:
          type: string
          pattern: ^(document|contextual_origin)\.[a-z][a-z0-9_]*$
          title: Field
        kind:
          type: string
          const: date_range
          title: Kind
          default: date_range
        earliest:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Earliest
        latest:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Latest
        missing:
          type: boolean
          title: Missing
        missing_count:
          anyOf:
            - type: integer
              maximum: 9223372036854776000
              minimum: 0
            - type: 'null'
          title: Missing Count
      additionalProperties: false
      type: object
      required:
        - field
        - earliest
        - latest
        - missing
        - missing_count
      title: CorpusDateCoverageV2
    CorpusCategoryCoverageV2:
      properties:
        field:
          type: string
          pattern: ^(document|contextual_origin)\.[a-z][a-z0-9_]*$
          title: Field
        kind:
          type: string
          const: categories
          title: Kind
          default: categories
        values:
          items:
            $ref: '#/components/schemas/CorpusCategoryValueV2'
          type: array
          title: Values
        truncated:
          type: boolean
          title: Truncated
        missing:
          type: boolean
          title: Missing
        missing_count:
          anyOf:
            - type: integer
              maximum: 9223372036854776000
              minimum: 0
            - type: 'null'
          title: Missing Count
        other:
          type: boolean
          title: Other
        other_count:
          anyOf:
            - type: integer
              maximum: 9223372036854776000
              minimum: 0
            - type: 'null'
          title: Other Count
      additionalProperties: false
      type: object
      required:
        - field
        - values
        - truncated
        - missing
        - missing_count
        - other
        - other_count
      title: CorpusCategoryCoverageV2
    FailureCode:
      type: string
      enum:
        - CAPACITY_UNAVAILABLE
        - DEPENDENCY_UNAVAILABLE
        - SERVICE_UNAVAILABLE
        - INVALID_UPSTREAM_RESPONSE
        - EXECUTION_DEADLINE_EXCEEDED
        - EXECUTION_WORK_LIMIT_EXCEEDED
        - INTERNAL_SERVER_ERROR
      title: FailureCode
    CorpusCategoryValueV2:
      properties:
        value:
          type: string
          maxLength: 80
          minLength: 1
          title: Value
        count:
          anyOf:
            - type: integer
              maximum: 9223372036854776000
              minimum: 1
            - type: 'null'
          title: Count
      additionalProperties: false
      type: object
      required:
        - value
        - count
      title: CorpusCategoryValueV2
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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