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

# Stream an Authorized Source File

> Streams a source file after authorizing its sourcefile- resource ID with the caller's Bearer token. This route does not accept or mint a document session token and is separate from the OnlyOffice flow.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /source-file
openapi: 3.0.0
info:
  title: Artos API
  description: API for document generation, template management, and document organization
  version: 1.0.0
  contact:
    name: Artos Support
    email: internal@artosai.com
servers:
  - url: https://api.artosai.com
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security:
  - bearerAuth: []
paths:
  /source-file:
    post:
      tags:
        - Files
      summary: Stream an Authorized Source File
      description: >-
        Streams a source file after authorizing its sourcefile- resource ID with
        the caller's Bearer token. This route does not accept or mint a document
        session token and is separate from the OnlyOffice flow.
      operationId: streamSourceFile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceFileRequest'
            example:
              resource_id: sourcefile-org-id/input/protocol.pdf
      responses:
        '200':
          description: Source file bytes
        '400':
          description: The resource ID is not a sourcefile resource
        '401':
          description: Missing, invalid, or unauthorized Bearer token
components:
  schemas:
    SourceFileRequest:
      type: object
      properties:
        resource_id:
          type: string
          description: Source-file resource identifier beginning with sourcefile-.
      required:
        - resource_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Okta access-token JWT sent as a Bearer token. The token identifies the
        user and scopes access to the user's organization.

````