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

# Create local file group

> <p> Creates a new local file group by uploading files directly via multipart form data. </p> <p> The total request body size must not exceed 500 MB. </p> <p> Required roles: All </p>




## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/qaip/openapi.documented.yml post /local-file-groups
openapi: 3.0.3
info:
  title: QAIP APIs
  version: 1.0.0
servers:
  - url: https://developer.qaip.com/api/v1
    description: API base path
security:
  - ApiKeyAuth: []
tags:
  - name: completions
    description: Generate completions
  - name: search
    description: Search content
  - name: extract
    description: Data extraction using LLM
  - name: tags
    description: List available tags
  - name: agent
    description: (Experimental) Agent operations
  - name: tag-source-groups
    description: Tag and source group associations
  - name: source-groups
    description: Source group (job) management and metadata
  - name: sources
    description: Sources management and metadata
  - name: local-file-groups
    description: Local file group management
  - name: secrets
    description: Secret management
  - name: google-drives
    description: Google Drive data source management
  - name: google-drive-settings
    description: Google Drive data source setting management
  - name: crawls
    description: Web crawl data source management
  - name: crawl-settings
    description: Web crawl setting management
  - name: githubs
    description: GitHub data source management
  - name: github-settings
    description: GitHub data source setting management
  - name: notions
    description: Notion data source management
  - name: notion-settings
    description: Notion data source setting management
  - name: authz-subject-attributes
    description: Authorization subject attribute management (admin only)
paths:
  /local-file-groups:
    post:
      tags:
        - local-file-groups
      summary: Create local file group
      description: >
        <p> Creates a new local file group by uploading files directly via
        multipart form data. </p> <p> The total request body size must not
        exceed 500 MB. </p> <p> Required roles: All </p>
      operationId: createLocalFileGroup
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - name
                - files
                - last_modified
              properties:
                name:
                  type: string
                  description: Name of the local file group
                  maxLength: 200
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  minItems: 1
                  maxItems: 2000
                  description: Files to upload
                last_modified:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 2000
                  description: >-
                    Last modified timestamps in Unix epoch milliseconds
                    (integer) for each file (same order and count as files). For
                    example, 1709971200000 represents 2024-03-09T12:00:00Z.
                chunk_metadata_keys:
                  type: string
                  description: >
                    JSON array of chunk metadata key configurations. Each
                    element is an object with "key" (string) and "type" (one of
                    "string", "integer", "float", "date", "datetime"). Example:
                    [{"key":"author","type":"string"},{"key":"page_number","type":"integer"}]
      responses:
        '200':
          description: Successfully created local file group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateLocalFileGroupResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Request Entity Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from qaip import Qaip

            client = Qaip(
                api_key=os.environ.get("QAIP_API_KEY"),  # This is the default and can be omitted
            )
            local_file_group = client.local_file_groups.create(
                files=[b"Example data"],
                last_modified=["string"],
                name="name",
            )
            print(local_file_group.source_group_id)
components:
  schemas:
    CreateLocalFileGroupResponse:
      type: object
      required:
        - source_group_id
      properties:
        source_group_id:
          type: string
          description: The ID of the created source group
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              description: Human-readable error message
            type:
              type: string
              description: Machine-readable error code
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````