Create media from URL

This endpoint allows developers or users to create a new video or audio media in FastPix using a publicly accessible URL. FastPix fetches the media from the provided URL, processes it, and stores it on the platform for use. #### Public URL requirement: The provided URL must be publicly accessible and must point to a video stored in one of the following supported formats: .m4v, .ogv, .mpeg, .mov, .3gp, .f4v, .rm, .ts, .wtv, .avi, .mp4, .wmv, .webm, .mts, .vob, .mxf, asf, m2ts #### Supported storage types: The URL can originate from various cloud storage services or content delivery networks (CDNs) such as: * **Amazon S3:** URLs from Amazon's Simple Storage Service. * **Google Cloud Storage:** URLs from Google Cloud's storage solution. * **Azure Blob Storage:** URLs from Microsoft's Azure storage. * **Public CDNs:** URLs from public content delivery networks that host video files. Upon successful creation, the API returns an `id` that must be retained for future operations related to this media. #### How it works 1. Send a POST request to this endpoint with the media URL (typically a video or audio file) and optional media settings. 2. FastPix uploads the video from the provided URL to its storage. 3. Receive a response containing the unique id for the newly created media item. 4. Use the id in subsequent API calls, such as checking the status of the media with the <a href="https://fastpix.com/docs/video-on-demand-api/manage-videos/get-media">Get Media by ID</a> endpoint to determine when the media is ready for playback. FastPix uses webhooks to tell your application about things that happen in the background, outside of the API regular request flow. For instance, after the media file is created (but not yet processed or encoded), FastPix sends a `POST` request to your specified webhook URL with the event <a href="https://fastpix.com/docs/webhooks/media-events#videomediacreated">video.media.created</a>. After processing completes, monitor the events <a href="https://fastpix.com/docs/webhooks/media-events#videomediaready">video.media.ready</a> and <a href="https://fastpix.com/docs/webhooks/media-events#videomediafailed">video.media.failed</a> to track the status of the media file. Related guide: <a href="https://fastpix.com/docs/upload-videos/upload-videos-from-a-url">Upload videos from URL</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 uploading a video media from URL
inputslist of objectsRequired

Add one input object at a time. For example, first add a VideoInput object. If you also need a watermark, click Add item again and select WatermarkInput. Repeat this process for AudioInput or SubtitleInput as needed. For a complete explanation of how media uploads from URL and processing work, refer to the
FastPix Video on Demand Overview.

accessPolicyenumRequiredDefaults to public
Determines whether access to the streamed content is kept private or available to all.
metadatamap from strings to stringsOptional

You can search for videos with specific key value pairs using metadata, when you tag a video in “key” : “value” pairs. Dynamic metadata allows you to define a key that allows any value pair. You can have maximum of 255 characters and upto 10 entries are allowed.

drmConfigurationIdstringOptionalformat: "uuid"
UUID of the DRM configuration to be used
titlestringOptional<=255 characters
Title of the media file.
creatorIdstringOptional<=255 characters
The unique identifier of the user who created this media.
subtitlesobjectOptional

Generates subtitle files for audio/video files.

mp4SupportenumOptional

“capped_4k”: Generates an mp4 video file up to 4k resolution “audioOnly”: Generates an m4a audio file of the media file “audioOnly,capped_4k”: Generates both video and audio media files for offline viewing

sourceAccessbooleanOptional
The sourceAccess parameter determines whether the original media file is accessible. Set to true to enable access or false to restrict it
optimizeAudiobooleanOptional

normalize volume of the audio track. This is available for pre-recorded content only.

maxResolutionenumOptionalDefaults to 1080p
The maximum resolution tier defines the highest quality at which your media is available.
mediaQualityenumOptionalDefaults to standard
The quality tier applied to the media.
summaryobjectOptional
chaptersbooleanOptional

Enable or disable the chapters feature for the media. Set to true to enable chapters or false to disable.

namedEntitiesbooleanOptional

Enable or disable named entity extraction. Set to true to enable or false to disable.

moderationobjectOptional
accessRestrictionsobjectOptional

Response

Media is created successfully
successboolean
Shows the request status. Returns true for success and false for failure.
dataobject