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

# Get object pages

> Retrieves the raw text of a processed vault object split by page. The object must have completed ingestion before pages can be retrieved — for PDFs this requires the OCR pipeline to have finished writing the per-page sidecar, so freshly uploaded PDFs return 400 with the current `ingestionStatus` until processing completes. For PDFs this returns the per-page OCR text. For plain text files (txt, md, source code, court reporter transcripts) the text is split using right-aligned page-number markers when present (preserving the original document numbering, including continuations like Volume 2 starting at page 234), falling back to form-feed (\f) page-break characters, and finally a single page if neither signal is present. Use the optional `start` and `end` query parameters to fetch a specific inclusive page range. Pages with no text are omitted.



## OpenAPI

````yaml /openapi.json get /vault/{id}/objects/{objectId}/pages
openapi: 3.1.0
info:
  title: Case.dev API
  description: >-
    The AI-native platform for legal technology. Build smarter legal
    applications with our suite of AI-powered APIs.
  version: 1.0.0
  contact:
    name: Case.dev Support
    email: support@casemark.com
    url: https://case.dev
  license:
    name: Proprietary
    url: https://case.dev/terms
servers:
  - url: https://api.case.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Vaults
    description: Secure document storage with semantic search and GraphRAG
  - name: Vault Events
    description: Vault-scoped event subscriptions and delivery testing
  - name: Vault Memory
    description: Vault-scoped persistent memory and semantic retrieval
  - name: Vault Objects
    description: Vault object management, content access, and document operations
  - name: Memory
    description: >-
      Persistent memory for AI agents with semantic search and 12 generic
      indexed tag fields
  - name: OCR
    description: Extract text from PDFs, images, and scanned documents
  - name: Voice
    description: Audio transcription and text-to-speech
  - name: LLMs
    description: Access 40+ language models through a unified API
  - name: Search
    description: Web search and AI answers
  - name: Mail
    description: Managed inboxes for agent email workflows
  - name: Media
    description: Transcript retrieval and captioned media clip generation
  - name: Legal
    description: Legal research tools including citation verification
  - name: Privilege
    description: Privilege detection for e-discovery and litigation workflows
  - name: Compute
    description: Serverless GPU and CPU infrastructure
  - name: Format
    description: Document formatting and template rendering (MD/JSON to PDF/DOCX)
  - name: SuperDoc
    description: Document conversion and template automation
  - name: Webhooks
    description: Webhook endpoint management
  - name: System
    description: Public system metadata and discovery endpoints
  - name: Usage
    description: Usage reporting and webhook subscriptions
  - name: Database
    description: Serverless PostgreSQL databases with instant branching
  - name: Translation
    description: Language detection and translation for multilingual legal workflows
  - name: Skills
    description: Search and read legal AI skills for agents
  - name: Agents/Linc
    description: Durable, stateful legal agent sessions with sandboxed tools and files
  - name: Matters
    description: Matter-native legal workspaces and orchestration primitives
  - name: Connectors
    description: Import and export between provider folders (Google Drive) and vaults
  - name: Applications Projects
    description: Web application project management
  - name: Applications Deployments
    description: Web application deployment management
  - name: Applications Domains
    description: Custom domain configuration for applications
  - name: Applications Env Vars
    description: Environment variable management for applications
paths:
  /vault/{id}/objects/{objectId}/pages:
    get:
      tags:
        - Vault Objects
      summary: Get object pages
      description: >-
        Retrieves the raw text of a processed vault object split by page. The
        object must have completed ingestion before pages can be retrieved — for
        PDFs this requires the OCR pipeline to have finished writing the
        per-page sidecar, so freshly uploaded PDFs return 400 with the current
        `ingestionStatus` until processing completes. For PDFs this returns the
        per-page OCR text. For plain text files (txt, md, source code, court
        reporter transcripts) the text is split using right-aligned page-number
        markers when present (preserving the original document numbering,
        including continuations like Volume 2 starting at page 234), falling
        back to form-feed (\f) page-break characters, and finally a single page
        if neither signal is present. Use the optional `start` and `end` query
        parameters to fetch a specific inclusive page range. Pages with no text
        are omitted.
      operationId: getVaultObjectPages
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The vault ID
        - name: objectId
          in: path
          required: true
          schema:
            type: string
          description: The object ID
        - name: start
          in: query
          required: false
          schema:
            type: integer
          description: >-
            First page to return (inclusive, 1-indexed). If omitted, starts at
            the first page with text.
        - name: end
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Last page to return (inclusive, 1-indexed). If omitted, returns
            through the last page with text.
      responses:
        '200':
          description: Successfully retrieved object pages
          content:
            application/json:
              schema:
                type: object
                required:
                  - pages
                  - metadata
                properties:
                  pages:
                    type: array
                    description: Per-page OCR text in ascending page order
                    items:
                      type: object
                      required:
                        - page
                        - text
                      properties:
                        page:
                          type: integer
                          description: Page number (1-indexed)
                        text:
                          type: string
                          description: OCR text for this page
                  metadata:
                    type: object
                    required:
                      - object_id
                      - vault_id
                      - filename
                      - source
                      - page_count
                      - returned_pages
                    properties:
                      object_id:
                        type: string
                      vault_id:
                        type: string
                      filename:
                        type: string
                      source:
                        type: string
                        enum:
                          - ocr
                          - txt
                        description: >-
                          Where the page text came from. `ocr` for PDFs
                          (per-page OCR sidecar). `txt` for plain-text files
                          split on form-feed (\f) characters.
                      page_count:
                        type: integer
                        description: >-
                          Total number of pages with extracted text in the
                          document
                      returned_pages:
                        type: integer
                        description: >-
                          Number of pages returned after applying the range
                          filter
                      start:
                        type: integer
                        nullable: true
                        description: Echoes the start query param if provided
                      end:
                        type: integer
                        nullable: true
                        description: Echoes the end query param if provided
              example:
                pages:
                  - page: 1
                    text: PLAINTIFF’S MOTION FOR SUMMARY JUDGMENT...
                  - page: 2
                    text: STATEMENT OF UNDISPUTED FACTS...
                metadata:
                  object_id: obj_abc123
                  vault_id: vault_def456
                  filename: motion_for_summary_judgment.pdf
                  source: ocr
                  page_count: 15
                  returned_pages: 2
                  start: 1
                  end: 2
        '400':
          description: Bad request - invalid range or object not processed
        '401':
          description: Unauthorized - invalid API key
        '403':
          description: Forbidden - API key lacks vault service access
        '404':
          description: >-
            Object or vault not found, or no per-page OCR text available
            (non-PDF document)
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key starting with `sk_case_`

````