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

# Post apiv1uploadsinit



## OpenAPI

````yaml https://backend.aflux.ai/openapi post /api/v1/uploads/init
openapi: 3.0.3
info:
  title: AdFlux Backend API
  version: v1
servers:
  - url: /
security: []
tags:
  - name: auth
  - name: users
  - name: uploads
  - name: projects
  - name: campaigns
  - name: placements
  - name: billing
  - name: payments
  - name: image-generations
paths:
  /api/v1/uploads/init:
    post:
      tags:
        - uploads
      operationId: uploadsInit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitUploadRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadSlot'
        default:
          $ref: '#/components/responses/DefaultError'
      security:
        - Bearer: []
components:
  schemas:
    InitUploadRequest:
      type: object
      required:
        - assetKind
        - contentType
        - sizeBytes
      properties:
        assetKind:
          $ref: '#/components/schemas/AssetKind'
        originalName:
          type: string
          nullable: true
        contentType:
          type: string
          description: >
            MIME type of the file. Allowed values depend on assetKind:
            PROJECT_LOGO — image/png, image/jpeg, image/svg+xml (max 5 MB);
            CAMPAIGN_MEDIA — image/png, image/jpeg, image/gif, video/mp4 (max 25
            MB). The server also verifies the actual file bytes against the
            declared contentType and sizeBytes.
          example: image/png
        sizeBytes:
          type: integer
          format: int64
    UploadSlot:
      type: object
      required:
        - uploadId
        - assetKind
        - contentType
        - sizeBytes
        - state
        - expiresAt
      properties:
        uploadId:
          type: string
          format: uuid
        assetKind:
          $ref: '#/components/schemas/AssetKind'
        originalName:
          type: string
          nullable: true
        contentType:
          type: string
        sizeBytes:
          type: integer
          format: int64
        state:
          $ref: '#/components/schemas/UploadState'
        expiresAt:
          type: string
          format: date-time
    AssetKind:
      type: string
      description: >
        Purpose of the asset; determines the allowed contentType and max size on
        upload (see InitUploadRequest.contentType). PROJECT_LOGO — project logo
        (light/dark variants). CAMPAIGN_MEDIA — campaign creative.
      enum:
        - PROJECT_LOGO
        - CAMPAIGN_MEDIA
    UploadState:
      type: string
      enum:
        - INITIATED
        - UPLOADING
        - CLEANING
        - COMPLETED
        - FAILED
        - EXPIRED
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    DefaultError:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````