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

# Initiate Chunked Upload

> Initiate chunked uploads for one or more assets (batch).



## OpenAPI

````yaml /api-reference/openapi.json post /assets/chunked/initiate
openapi: 3.1.0
info:
  title: Aspect Platform API
  description: A FastAPI application for Aspect Platform functionality
  version: 0.0.0
servers:
  - url: https://api.aspect.inc
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /assets/chunked/initiate:
    post:
      tags:
        - Assets
      summary: Initiate Chunked Upload
      description: Initiate chunked uploads for one or more assets (batch).
      operationId: post_Assets_assets_chunked_initiate
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/ChunkedUploadInitiateRequest'
              type: array
              title: Payloads
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ChunkedUploadInitiateBatchItem'
                type: array
                title: Response Initiate Chunked Upload Assets Chunked Initiate Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ChunkedUploadInitiateRequest:
      properties:
        directory_id:
          type: string
          format: uuid
          title: Directory Id
          description: ID of the directory this asset belongs to
        name:
          type: string
          title: Name
          description: Filename including extension
        size_bytes:
          type: integer
          title: Size Bytes
          description: Total file size in bytes
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
          description: >-
            Client-generated asset ID (optional, server generates if not
            provided)
        auto_rename:
          anyOf:
            - $ref: '#/components/schemas/AutoRenameStyle'
            - type: 'null'
          description: >-
            Auto-rename style to use if name conflicts with an existing item. If
            not set and a conflict exists, returns 409.
        conflict_resolution:
          anyOf:
            - type: string
              enum:
                - replace
                - skip
            - type: 'null'
          title: Conflict Resolution
          description: >-
            How to handle name conflicts. 'replace': trash existing asset,
            create new. 'skip': skip this item if a conflict exists (no asset
            created). Mutually exclusive with auto_rename.
      type: object
      required:
        - directory_id
        - name
        - size_bytes
      title: ChunkedUploadInitiateRequest
      description: API request schema for initiating a chunked upload
    ChunkedUploadInitiateBatchItem:
      properties:
        result:
          anyOf:
            - $ref: '#/components/schemas/ChunkedUploadInitiateResponse'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        skipped:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Skipped
      type: object
      title: ChunkedUploadInitiateBatchItem
      description: >-
        Single result in a batch initiate response. Exactly one of result,
        error, or skipped is set.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AutoRenameStyle:
      type: string
      enum:
        - parenthesized
        - numeric
      title: AutoRenameStyle
      description: Style for auto-renaming items when name conflicts occur during creation
    ChunkedUploadInitiateResponse:
      properties:
        asset_id:
          type: string
          format: uuid
          title: Asset Id
          description: Asset ID
        asset_type:
          $ref: '#/components/schemas/AssetType'
          description: Detected asset type from filename extension
        asset_name:
          type: string
          title: Asset Name
          description: Final asset name (may differ from requested name if auto-renamed)
        chunk_size:
          type: integer
          title: Chunk Size
          description: Chunk size in bytes (currently 4MB)
        token:
          anyOf:
            - type: string
            - type: 'null'
          title: Token
          description: >-
            Signed RS256 JWT authorizing chunk uploads through the edge worker.
            None when edge worker token signing is not configured.
        token_expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Token Expires At
          description: When the upload token expires. None when token is not included.
      type: object
      required:
        - asset_id
        - asset_type
        - asset_name
        - chunk_size
      title: ChunkedUploadInitiateResponse
      description: API response schema for initiating a chunked upload
    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
    AssetType:
      type: string
      enum:
        - video
        - image
        - audio
        - document
        - vector
        - other
      title: AssetType
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT in Authorization header. 'Bearer ' prefix optional.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````