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

# Upload media to channel

> Upload media file to a specific channel



## OpenAPI

````yaml post /api/messaging/channels/{channelId}/upload-media
openapi: 3.1.0
info:
  title: Eliza OS API
  description: >-
    API documentation for Eliza OS v1.2.0 - A flexible and scalable AI agent
    framework.


    This API is designed to be used with a locally running Eliza instance.
    Endpoints allow for creating,

    managing, and interacting with AI agents through a REST interface.


    The API is organized into the following domains:

    - **System**: System-wide operations and environment management

    - **Agents**: Agent lifecycle and management operations

    - **Memory**: Agent memory and room management

    - **Messaging**: Message handling, channels, and servers

    - **Audio**: Audio processing and speech synthesis

    - **Media**: File upload and media management

    - **TEE**: Trusted Execution Environment operations

    - **WebSocket**: Real-time communication via Socket.IO
  version: 1.2.0
  contact:
    name: Eliza OS Community
    url: https://github.com/elizaos/eliza
servers:
  - url: http://localhost:3000
    description: Local development server
security: []
tags:
  - name: system
    description: System-wide operations and environment management
  - name: agents
    description: Operations for managing AI agents
  - name: memory
    description: Operations for managing agent memories
  - name: rooms
    description: Operations for managing rooms
  - name: messaging
    description: Operations for messages, channels, and servers
  - name: audio
    description: Operations for speech and audio processing
  - name: media
    description: Operations for file uploads and media management
  - name: logs
    description: Operations for accessing system and agent logs
  - name: tee
    description: Trusted Execution Environment operations
  - name: websocket
    description: Real-time WebSocket communication
paths:
  /api/messaging/channels/{channelId}/upload-media:
    post:
      tags:
        - media
      summary: Upload media to channel
      description: Upload media file to a specific channel
      operationId: uploadChannelMedia
      parameters:
        - name: channelId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: ID of the channel
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Media file to upload
                agentId:
                  type: string
                  format: uuid
                  description: ID of the agent uploading the media
      responses:
        '200':
          description: Media uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  url:
                    type: string
                    description: URL of the uploaded media
                  channelId:
                    type: string
                    format: uuid
                  agentId:
                    type: string
                    format: uuid
                  type:
                    type: string
                    enum:
                      - image
                      - video
                  mimeType:
                    type: string
                  size:
                    type: integer
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Unsupported media type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Error uploading media
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code
            message:
              type: string
              description: Error message
            details:
              type: string
              description: Detailed error information

````