# 建立新檔案。

要上傳新檔案，您必須先使用 File API。它會提供一個網址——請使用該網址上傳您的檔案。上傳完成後，您可以使用同一個回應中的 file_id，開始使用我們的 AI 功能。

Endpoint: POST /s2s/v2.0/file/obj-rem-vid
Security: BearerAuthenticationV2

## Security:

  - `BearerAuthenticationV2` (unknown)
    http bearer

## Request fields (application/json):

  - `files` (array, required)

  - `files.content_type` (string, required)
    這個檔案的內容 MIME 類型。目前可用的值列於 enum 中。
    Example: video/mp4

  - `files.file_name` (string, required)
    這個檔案的名稱
    Example: my-selfie.mp4

  - `files.file_size` (integer, required)
    此檔案的內容長度（位元組）。不應超過 100MB。
    Example: 50000

## Response 200:

  - `200` (unknown)
    成功取得檔案上傳資訊

## Response 200 fields (application/json):

  - `files` (array)

  - `files.content_type` (string)
    這個檔案的內容 MIME 類型。
    Example: video/mp4

  - `files.file_name` (string)
    這個檔案的名稱
    Example: my-selfie.mp4

  - `files.file_id` (string)
    此檔案的 ID。其他執行任務 API 會需要這個 `file_id`。
    Example: U8aqJbsXGT537jtGnEDFHqxdDXqh8+oTF/cSkLimzuvVwMP+Jb1XbjPsf7ZgUgLY

  - `files.requests` (array)
    使用下方的 `url`、`headers`、`method` 上傳檔案。完成後，`file_id` 將用於後續呼叫執行任務 API。

  - `files.requests.headers` (object)
    上傳檔案時要納入的標頭
    Example: {"Content-Type":"video/mp4","Content-Length":50000}

  - `files.requests.url` (string)
    上傳這個檔案的網址
    Example: https://example.com/presigned-upload-url

  - `files.requests.method` (string)
    上傳這個檔案所用的 HTTP 方法
    Example: PUT

## Response 400:

  - `400` (unknown)
    請求參數無效

## Response 400 fields (application/json):

  - `status` (integer)
    回應狀態
    Example: 400

  - `error` (string)
    Example: Invalid parameter value

  - `error_code` (string)
    Example: InvalidParameters

## Response 401:

  - `401` (unknown)
    API 金鑰無效或缺失

## Response 401 fields (application/json):

  - `status` (integer)
    回應狀態
    Example: 401

  - `error` (string)
    Example: Invalid API key

