Skip to main content

Endpoint

GET https://api.ugc.inc/media/file/{id}
GET https://api.ugc.inc/media/file/{id}/preview
GET https://api.ugc.inc/media/file/{id}/audio

Overview

Retrieve the actual media file content. This endpoint acts as a proxy to the underlying blob storage, hiding the storage URLs from clients.
This is a public endpoint - no authentication is required. This allows media URLs to be used directly in <img>, <video>, and <audio> tags without needing to pass credentials.
URL Patterns:
  • /media/file/{id} - Returns the main file (user_media video/image/audio, or social_audio’s audio file)
  • /media/file/{id}/preview - Returns the preview/thumbnail image (for videos or social_audio cover)
  • /media/file/{id}/audio - Returns the social_audio audio file (same as no suffix for social_audio)

Path Parameters

id
string
required
The media ID
subpath
string
Optional subpath: preview for cover image, audio for audio file (social_audio only)

Response

Returns the raw file content with appropriate Content-Type header. Content Types:
  • Videos: video/mp4
  • Images: image/jpeg, image/png, etc.
  • Audio: audio/mpeg
The response includes cache headers for optimal performance:
  • Cache-Control: public, max-age=31536000, immutable
curl -X GET "https://api.ugc.inc/media/file/media_abc123" \
  -o video.mp4
HTTP/1.1 200 OK
Content-Type: video/mp4
Cache-Control: public, max-age=31536000, immutable

[binary file content]