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

# Upload File

> 上传图片、视频或音频文件，返回可公网访问的文件 URL。单文件最大 100 MB。

Upload an image, video, or audio file and receive a publicly accessible URL. Use the returned URL as reference media in video generation, image editing, and other API endpoints.

<Note>
  Maximum file size is **100 MB**. The form field name must be `file`, sent as `multipart/form-data`.
</Note>

## Supported formats

| Type  | Extensions                                         |
| ----- | -------------------------------------------------- |
| Image | `.jpg` `.jpeg` `.png` `.gif` `.webp` `.bmp` `.svg` |
| Video | `.mp4` `.mov` `.avi` `.webm` `.mkv` `.m4v` `.flv`  |
| Audio | `.mp3` `.wav` `.aac` `.m4a` `.flac` `.ogg`         |

## Common use cases

Use the returned `url` in other OpenAPI endpoints, for example:

* `images` in [Create Video](/en/api-reference/videos/create)
* `url` in [SP Upload Asset](/en/api-reference/seedance/sp/assets-upload)
* `image_url` in [Understand Image](/en/api-reference/images/understand)


## OpenAPI

````yaml POST /api/open-api/v1/files/upload
openapi: 3.1.0
info:
  title: Jimmy AI OpenAPI
  description: API for Jimmy AI video generation services
  version: 1.0.0
servers:
  - url: https://www.jimmyai.cn
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/open-api/v1/files/upload:
    post:
      summary: Upload File
      description: >-
        Upload an image, video, or audio file and receive a publicly accessible
        URL. Maximum file size is 100 MB.
      operationId: uploadFile
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileUploadRequest'
      responses:
        '200':
          description: Upload successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUploadApiResponse'
              examples:
                success:
                  summary: Upload successful
                  value:
                    code: 20000
                    msg: ok
                    data:
                      url: >-
                        https://cdn.example.com/openapi/upload/20240628/abc123.jpg
                      filename: photo.jpg
                      size: 102400
                      mime_type: image/jpeg
components:
  schemas:
    FileUploadRequest:
      type: object
      required:
        - file
      properties:
        file:
          type: string
          format: binary
          description: File to upload. Field name must be `file`.
    FileUploadApiResponse:
      type: object
      properties:
        code:
          type: integer
          example: 20000
        msg:
          type: string
          example: ok
        data:
          $ref: '#/components/schemas/FileUploadData'
    FileUploadData:
      type: object
      properties:
        url:
          type: string
          description: Public URL of the uploaded file
          example: https://cdn.example.com/openapi/upload/20240628/abc123.jpg
        filename:
          type: string
          description: Original filename
          example: photo.jpg
        size:
          type: integer
          format: int64
          description: File size in bytes
          example: 102400
        mime_type:
          type: string
          description: File MIME type
          example: image/jpeg
      example:
        url: https://cdn.example.com/openapi/upload/20240628/abc123.jpg
        filename: photo.jpg
        size: 102400
        mime_type: image/jpeg
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````