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

# Get Processed Document Content

> Retrieve the processed markdown content for a document. Only available for documents with COMPLETED status.



## OpenAPI

````yaml api/openapi.json get /api/documents/{id}/content
openapi: 3.1.0
info:
  version: '0.1'
  title: Orchata API
servers:
  - url: https://api.orchata.ai
    description: Orchata API Server
security:
  - ApiKey: []
paths:
  /api/documents/{id}/content:
    get:
      tags:
        - Documents
      summary: Get Processed Document Content
      description: >-
        Retrieve the processed markdown content for a document. Only available
        for documents with COMPLETED status.
      parameters:
        - schema:
            type: string
            example: document_123
          required: true
          name: id
          in: path
        - schema:
            type: string
            example: space_123
            description: The ID of the space containing the documents
          required: true
          description: The ID of the space containing the documents
          name: spaceId
          in: query
      responses:
        '200':
          description: Successfully retrieved processed content
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  filename:
                    type: string
                  content:
                    type: string
                required:
                  - id
                  - filename
                  - content
        '401':
          description: Authentication required
        '404':
          description: Document or content not found
      x-codeSamples:
        - lang: typescript
          label: TypeScript SDK
          source: >-
            import { Orchata } from '@orchata-ai/sdk';


            const client = new Orchata({ apiKey: 'oai_your_api_key' });


            const { content } = await client.documents.getContent('doc_123',
            'space_123');
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Oai-Api-Key

````