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

# file.upload

> Creates a file record and returns a presigned upload URL. Upload the file content to the returned `upload_url` via PUT before it expires. Use [file.detail](https://open.manus.ai/docs/v2/file.detail) to check upload status or download the file. Then use the `file.id` as `file_id` in [task.create](https://open.manus.ai/docs/v2/task.create) or [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage) message content. See [Limits](https://open.manus.ai/docs/v2/file.upload#limits).

<sup>Questions or issues? Contact us at [api-support@manus.ai](mailto:api-support@manus.ai).</sup>

> [!TIP]
>
> **Auth:**
>
> * **API Key:** Full access.
> * **Standard OAuth client:** Requires `create_task` or `manage_all_tasks`.
> * **Trusted client:** Full access.

## Limits

| Limit | Value |
| - | - |
| Size per file | 512 MB |
| Total storage per account | 10 GB |
| `upload_url` validity | 3 minutes |
| File lifetime | 48 hours after upload |
| Blocked types | Executable and script files, such as `.exe`, `.sh`, `.bat`, `.dmg` |

Exceeding a size limit returns `QuotaExceededError`.

Files attached inline in a task message instead of through `file.upload` have a lower cap: `file_url` and decoded `file_data` are limited to 20 MB each. Upload larger files first and pass the returned `file.id` as `file_id`.


## OpenAPI

````yaml POST /v2/file.upload
openapi: 3.1.0
info:
  title: Manus OpenAPI v2
  description: >-
    API for integrating Manus into your workflow. All responses are wrapped with
    {"ok": true, "request_id": "...", ...} for success and {"ok": false,
    "request_id": "...", "error": {"code": "...", "message": "..."}} for errors.
  version: 2.0.0
servers:
  - url: https://api.manus.ai
security:
  - ApiKeyAuth: []
paths:
  /v2/file.upload:
    post:
      summary: UploadFile
      description: >-
        Creates a file record and returns a presigned upload URL. Upload the
        file content to the returned `upload_url` via PUT before it expires. Use
        [file.detail](https://open.manus.ai/docs/v2/file.detail) to check upload
        status or download the file. Then use the `file.id` as `file_id` in
        [task.create](https://open.manus.ai/docs/v2/task.create) or
        [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage)
        message content. See
        [Limits](https://open.manus.ai/docs/v2/file.upload#limits).
      operationId: openapi.v2.OpenapiV2Service.UploadFile
      parameters:
        - name: x-manus-api-key
          in: header
          required: false
          schema:
            type: string
          description: >-
            API key for direct authentication. Provide either this or
            `Authorization`, not both. See
            [Authentication](https://open.manus.ai/docs/v2/authentication).
        - name: Authorization
          in: header
          required: false
          schema:
            type: string
            example: Bearer {access_token}
          description: >-
            OAuth2 access token in `Bearer {token}` format. An OAuth client
            requires the `create_task` or `manage_all_tasks` scope unless it is
            a `Trusted team client` or `Trusted public client`. Provide either
            this or `x-manus-api-key`, not both. See the [Open
            App](https://open.manus.ai/docs/v2/open-app) guide.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filename:
                  type: string
                  description: >-
                    Name of the file to upload, including extension (e.g.,
                    "report.pdf", "data.csv"). The extension helps determine the
                    file type.
              required:
                - filename
      responses:
        '200':
          description: File record created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    example: true
                    description: Whether the request was successful.
                  request_id:
                    type: string
                    description: Unique identifier for this API request.
                  file:
                    $ref: '#/components/schemas/File'
                    description: >-
                      The created file record. Status will be pending until the
                      upload completes.
                  upload_url:
                    type: string
                    description: >-
                      Presigned S3 URL for uploading the file content. Send a
                      PUT request with the file bytes as the body. Expires in 3
                      minutes.
                  upload_expires_at:
                    type: string
                    description: >-
                      Unix timestamp in seconds when upload_url expires, encoded
                      as a decimal string. Complete the upload before this time.
                    pattern: ^[0-9]+$
                    example: '1893456180'
        4XX:
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security: []
components:
  schemas:
    File:
      type: object
      description: Basic file information returned in lists and upload responses.
      properties:
        id:
          type: string
          description: >-
            Unique identifier for the file. Use this as file_id when attaching
            to tasks.
        filename:
          type: string
          description: Name of the file.
        status:
          type: string
          enum:
            - pending
            - uploaded
            - deleted
            - error
          description: >-
            File status. "pending" — waiting for upload. "uploaded" — ready to
            use. "deleted" — file has been deleted. "error" — upload failed.
        created_at:
          type: string
          description: >-
            Unix timestamp in seconds when the file record was created, encoded
            as a decimal string.
          pattern: ^[0-9]+$
          example: '1893456000'
    ErrorResponse:
      type: object
      description: Standard error response format returned when a request fails.
      properties:
        ok:
          type: boolean
          example: false
          description: Always false for error responses.
        request_id:
          type: string
          description: >-
            Unique identifier for this API request, useful for debugging with
            support.
        error:
          type: object
          description: Error details.
          properties:
            code:
              type: string
              description: >-
                Machine-readable error code (e.g., "invalid_argument",
                "not_found", "permission_denied", "rate_limited").
            message:
              type: string
              description: Human-readable error description explaining what went wrong.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-manus-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.