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

# Bulk Create Documents

> Upload up to 100 [knowledge base](/line/knowledge-base) documents in a single request



## OpenAPI

````yaml /latest.yml POST /agents/documents/bulk
openapi: 3.0.1
info:
  title: Cartesia API
  version: 0.0.1
servers:
  - url: https://api.cartesia.ai
    description: Production
security: []
paths:
  /agents/documents/bulk:
    post:
      tags:
        - Documents
      summary: Bulk Create Documents
      description: >-
        Upload up to 100 [knowledge base](/line/knowledge-base) documents in a
        single request
      operationId: documents_create_bulk
      parameters:
        - $ref: '#/components/parameters/CartesiaVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDocumentsBulkBody'
      responses:
        '201':
          description: Documents created.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentResponse'
        '404':
          description: >-
            One or more target folders were not found (`error_code:
            kb_folder_not_found`).
        '413':
          description: >-
            One or more documents exceed the 1 MB limit. The error message lists
            the offending indices.
      security:
        - APIKeyAuth: []
components:
  parameters:
    CartesiaVersionHeader:
      name: Cartesia-Version
      in: header
      description: API version header.
      required: true
      schema:
        type: string
        format: date
        example: '2026-03-01'
        enum:
          - '2026-03-01'
  schemas:
    CreateDocumentsBulkBody:
      title: CreateDocumentsBulkBody
      type: object
      properties:
        documents:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/CreateDocumentBody'
          description: The documents to upload. Up to 100 per request.
      required:
        - documents
    DocumentResponse:
      title: DocumentResponse
      type: object
      properties:
        id:
          type: string
          description: The ID of the document.
        name:
          type: string
          nullable: true
          description: The document's display name, or `null` if unnamed.
        content:
          type: string
          description: The full document text.
        created_at:
          type: string
          format: date-time
          description: When the document was uploaded.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: User-defined string-keyed metadata.
      required:
        - id
        - name
        - content
        - created_at
        - metadata
    CreateDocumentBody:
      title: CreateDocumentBody
      type: object
      properties:
        folder_id:
          type: string
          description: The folder to upload the document into.
        content:
          type: string
          minLength: 1
          description: The document text. Maximum 1 MB.
        name:
          type: string
          nullable: true
          description: An optional display name for the document.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            User-defined string-keyed metadata. Used to filter retrieval at
            query time.
      required:
        - folder_id
        - content
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Cartesia API key (`sk_car_...`). Get one at
        [play.cartesia.ai/keys](https://play.cartesia.ai/keys).

````