---
title: "Upload media"
method: POST
path: "/media/upload"
tags: ["Media"]
---

# Upload media

`POST /media/upload`

## Request

- Base URL: `https://api.pickfu.com/v1`
- URL: `https://api.pickfu.com/v1/media/upload`
- Auth: HTTP bearer

Uploads an image or video to the PickFu CDN. Accepts either a URL (fetched and re-hosted) or base64-encoded data (max 20MB decoded).

YouTube, Vimeo, and Wistia URLs are returned as-is since PickFu embeds them natively.

## Request body

- union
  - object
    - `url` string, uri, required: HTTPS URL of the media to upload. Mutually exclusive with data.
    - `data` string: Base64-encoded media content. Mutually exclusive with url. Max 20MB.
    - `filename` string: Optional filename hint for the CDN public ID
    - `resourceType` 'image' | 'video': Resource type. Auto-detected from URL/content if omitted.
  - object
    - `url` string, uri: HTTPS URL of the media to upload. Mutually exclusive with data.
    - `data` string, required: Base64-encoded media content. Mutually exclusive with url. Max 20MB.
    - `filename` string: Optional filename hint for the CDN public ID
    - `resourceType` 'image' | 'video': Resource type. Auto-detected from URL/content if omitted.

## Response `200`

Default Response

- object
  - `success` boolean
  - `data` object
    - `url` string: CDN URL of the uploaded media
    - `resourceType` string: Detected or specified resource type
    - `embedded` boolean: True if the URL is an embeddable video platform (YouTube/Vimeo/Wistia) returned as-is

---

[API](https://skmtc.dev/pickfu/apis/pickfu-api.md) · [All operations](https://skmtc.dev/pickfu/apis/pickfu-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pickfu/apis/pickfu-api/revisions/919fc58413ea?raw)
