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

# Create Chunks

> Create chunks/embeddings from existing content.

This endpoint processes uploaded content that was stored without ingestion
(ingest=False) and creates vector embeddings for it.

Args:
    request: CreateChunksRequest containing:
        - content_id: Content ID to process
        - reader: Reader to use ("native", "langchain", "markitdown", etc.)
        - force_rechunk: Whether to force re-chunking existing chunks

Returns:
    CreateChunksResponse with processing results

Examples:
    Create chunks for uploaded content:
        POST /chunks/create
        {
            "content_id": "content_123",
            "reader": "markitdown",
            "force_rechunk": false
        }
    
    Force re-chunk with different reader:
        POST /chunks/create
        {
            "content_id": "content_123",
            "reader": "langchain_pdfplumber",
            "force_rechunk": true
        }



## OpenAPI

````yaml api-reference/openapi.json post /api/v1/chunks/create
openapi: 3.1.0
info:
  title: FastAPI app
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/chunks/create:
    post:
      tags:
        - Chunks
      summary: Create Chunks
      description: >-
        Create chunks/embeddings from existing content.


        This endpoint processes uploaded content that was stored without
        ingestion

        (ingest=False) and creates vector embeddings for it.


        Args:
            request: CreateChunksRequest containing:
                - content_id: Content ID to process
                - reader: Reader to use ("native", "langchain", "markitdown", etc.)
                - force_rechunk: Whether to force re-chunking existing chunks

        Returns:
            CreateChunksResponse with processing results

        Examples:
            Create chunks for uploaded content:
                POST /chunks/create
                {
                    "content_id": "content_123",
                    "reader": "markitdown",
                    "force_rechunk": false
                }
            
            Force re-chunk with different reader:
                POST /chunks/create
                {
                    "content_id": "content_123",
                    "reader": "langchain_pdfplumber",
                    "force_rechunk": true
                }
      operationId: create_chunks_api_v1_chunks_create_post
      parameters:
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The workspace ID
            title: X-Workspace-Id
          description: The workspace ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChunksRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateChunksResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - DualAuthScheme: []
components:
  schemas:
    CreateChunksRequest:
      properties:
        content_id:
          type: string
          title: Content Id
          description: Content ID to create chunks from
        reader:
          anyOf:
            - type: string
            - type: 'null'
          title: Reader
          description: Reader to use for processing
          default: native
        force_rechunk:
          type: boolean
          title: Force Rechunk
          description: Force re-chunking even if chunks already exist
          default: false
      type: object
      required:
        - content_id
      title: CreateChunksRequest
      description: Request to create chunks from existing content.
    CreateChunksResponse:
      properties:
        status:
          type: string
          title: Status
          description: Status of the operation
        content_ids_processed:
          items:
            type: string
          type: array
          title: Content Ids Processed
          description: Successfully processed content IDs
        content_ids_failed:
          items:
            type: string
          type: array
          title: Content Ids Failed
          description: Failed content IDs
        total_chunks_created:
          type: integer
          title: Total Chunks Created
          description: Total number of chunks created
          default: 0
        message:
          type: string
          title: Message
          description: Summary message
      type: object
      required:
        - status
        - message
      title: CreateChunksResponse
      description: Response for chunk creation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    DualAuthScheme:
      type: http
      scheme: bearer

````