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

# Upload Assets

Upload one or more images with semantic usage metadata. Every file in a request shares the same metadata; send separate requests when assets need different roles, scopes, or instructions.

Roles are `brand_logo`, `reference_image`, `content_image`, and `background`. Scopes are `all_slides` and `generation`. Save the returned asset IDs and pass them to generate or edit operations.

```bash theme={null}
curl -X POST \
  "https://slides-api.getalai.com/api/modern/v1/presentations/PRESENTATION_ID/assets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F 'metadata={"role":"brand_logo","scope":"all_slides","instructions":"Keep this logo visible and consistent."}' \
  -F 'files=@station-logo.png'
```


## OpenAPI

````yaml POST /api/modern/v1/presentations/{presentation_id}/assets
openapi: 3.1.0
info:
  title: Alai API
  description: API endpoints for Alai Classic, Creative, and Modern presentation generation
  version: 1.1.0
servers:
  - url: https://slides-api.getalai.com
security:
  - BearerAuth: []
paths:
  /api/modern/v1/presentations/{presentation_id}/assets:
    post:
      tags:
        - Modern Slides API
      summary: Upload Assets
      operationId: upload_assets_api_modern_v1_presentations__presentation_id__assets_post
      parameters:
        - name: presentation_id
          in: path
          required: true
          schema:
            type: string
            title: Presentation Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_assets_api_modern_v1_presentations__presentation_id__assets_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ModernApiAsset'
                title: >-
                  Response Upload Assets Api Modern V1 Presentations 
                  Presentation Id  Assets Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_upload_assets_api_modern_v1_presentations__presentation_id__assets_post:
      properties:
        files:
          items:
            type: string
            format: binary
          type: array
          title: Files
        metadata:
          type: string
          title: Metadata
          default: '{}'
      type: object
      required:
        - files
      title: >-
        Body_upload_assets_api_modern_v1_presentations__presentation_id__assets_post
    ModernApiAsset:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        file_path:
          type: string
          title: File Path
        role:
          $ref: '#/components/schemas/ModernApiAssetRole'
        scope:
          $ref: '#/components/schemas/ModernApiAssetScope'
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
      type: object
      required:
        - id
        - name
        - file_path
        - role
        - scope
      title: ModernApiAsset
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ModernApiAssetRole:
      type: string
      enum:
        - brand_logo
        - reference_image
        - content_image
        - background
      title: ModernApiAssetRole
    ModernApiAssetScope:
      type: string
      enum:
        - all_slides
        - generation
      title: ModernApiAssetScope
    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:
    BearerAuth:
      type: http
      scheme: bearer
      description: Your Alai API key. Get one from your account settings at app.getalai.com

````