Upload media from device

This endpoint enables accelerated uploads of large media files directly from your local device to FastPix for processing and storage. > **NOTE** > > This version now supports uploads with no file size limitations and offers faster uploads. The previous endpoint (which had a 500MB size limit) is now deprecated. You can find details in the [changelog](https://fastpix.com/docs/changelog/release-notes). #### How it works 1. Send a POST request to this endpoint with optional media settings. 2. The response includes an `uploadId` and a signed `url` for direct video file upload. 3. Upload your video file to the provided url by making a PUT request. The API accepts the media file from your device and uploads it to the FastPix platform. (Refer to <a href="https://fastpix.com/docs/upload-videos/upload-videos-from-device#step-3-initiate-the-upload">Step 3: Initiate the upload</a> for complete instructions.) 4. Once uploaded, the media undergoes processing and is assigned a unique ID for tracking. Retain this `uploadId` for any future operations related to this upload. After uploading, you can use the <a href="https://fastpix.com/docs/video-on-demand-api/manage-videos/get-media">Get Media by ID</a> endpoint to check the status of the uploaded media asset and see if it has transitioned to a `Ready` status for playback. To notify your application about the status of this API request check for the webhooks for <a href="https://fastpix.com/docs/webhooks/webhook-event-reference#media-related-events">media related events</a>. #### Example A social media platform allows users to upload video content directly from their phones or computers. This endpoint facilitates the upload process. For example, if you are developing a video-sharing app where users can upload short clips from their mobile devices, this endpoint enables them to select a video, upload it to the platform. Related guide: <a href="https://fastpix.com/docs/upload-videos/upload-videos-from-device">Upload videos directly</a>

Authentication

AuthorizationBasic
FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request. - <b>Username:</b> Access Token ID - <b>Password:</b> Secret Key Activate your FastPix account to generate your API credentials. <a href="https://fastpix.com/docs/getting-started/activate-your-account" target="_blank">See the guide here</a>

Request

Request body for direct upload
corsOriginstringRequiredDefaults to *

Upload media directly from a device using the URL name or enter ”*” to allow all.

pushMediaSettingsobjectOptional
Configuration settings for uploading and processing media on the FastPix platform. These settings define how the uploaded video is handled, including access control, resolution, DRM, and optional metadata. For a complete explanation of how media uploads and processing work, refer to the <a href="https://fastpix.com/docs/get-started/overview" target="_blank">FastPix Video on Demand Overview</a>.

Response

Direct upload created successfully
successboolean
Shows the request status. Returns true for success and false for failure.
dataobject
Displays the result of the request.