Create a new source from a media URL. The source will be analyzed to extract metadata and generate a thumbnail. The source will be automatically deleted after the data retention period.
POST
/api/sources
Authorization
Authorization
header
string
required
Enter the project access token with the Bearer prefix, e.g. "Bearer project_access_token"
Bodyapplication/json
Source creation parameters
url
string
http-url
required
Url is the URL of the source, which must be a valid HTTP URL.
Examples:
https://example.com/video.mp4
metadata
object
Metadata allows for additional information to be attached to the source, with a maximum size of 2048 bytes.
Examples:
map[key:value key2:value2]
storage
object
Storage input configuration. Provide this or url, never both.
path
string
required
Exact object key in the configured bucket, 1 to 1024 UTF-8 bytes. The output base_prefix is not added.
id
string
Connected external storage belonging to this project. If omitted, uses the project default storage, which must be external. The resolved storage ID is saved on the source.
storage
object
required
Storage input configuration. Provide this or url, never both.
path
string
required
Exact object key in the configured bucket, 1 to 1024 UTF-8 bytes. The output base_prefix is not added.
id
string
Connected external storage belonging to this project. If omitted, uses the project default storage, which must be external. The resolved storage ID is saved on the source.
metadata
object
Metadata allows for additional information to be attached to the source, with a maximum size of 2048 bytes.
Examples:
map[key:value key2:value2]
url
string
http-url
Url is the URL of the source, which must be a valid HTTP URL.
Examples:
https://example.com/video.mp4
Responses
application/json
data
object
required
Data contains the response object
audio_bitrate
integer
required
Audio bitrate in bits per second
Examples:
128000
audio_codec
string
required
Audio codec used
Examples:
aac
created_at
string
date-time
required
Timestamp when the source was created
Examples:
2025-01-01T12:00:00Z
device
string
required
Device used to record the video
Examples:
iPhone
duration
integer
required
Duration of the video in seconds
Examples:
120
height
integer
required
Height of the video in pixels
Examples:
1080
id
string
required
Unique identifier of the source
Examples:
src_2G6MJiNz71bHQGNzGwKx5cJwPFS
metadata
object
required
Additional metadata for the source
Examples:
map[key1:value1 key2:value2]
size
integer
required
Size of the source file in bytes
Examples:
1.234567e+06
video_bitrate
integer
required
Video bitrate in bits per second
Examples:
2e+07
video_codec
string
required
Video codec used
Examples:
h264
video_framerate
number
required
Video framerate in frames per second
Examples:
29.97
width
integer
required
Width of the video in pixels
Examples:
1920
path
string
Exact object key in the configured bucket, 1 to 1024 UTF-8 bytes. The output base_prefix is not added.
storage_id
string
Connected Storage belonging to this Project.
url
string
URL where the source video can be accessed
Examples:
https://example.com/video.mp4
status
"success"
string
required
Status indicates the response status "success"
Created
application/json
error
object
required
code
400
integer
required
Code is the HTTP status code
Examples:
400
message
string
required
Message is a human-readable error description
Examples:
Invalid request parameters
type
"ValidationError"
string
required
Type indicates the error category
Available options:
ValidationError
status
"error"
string
required
Status indicates the response status "error"
Invalid request parameters
application/json
error
object
required
Error response details
code
401
integer
required
Code is the HTTP status code
Examples:
401
message
string
required
Message is a human-readable error description
Examples:
Authentication error: invalid token or subscription inactive
type
"AuthenticationError"
string
required
Type indicates the error category
Available options:
AuthenticationError
status
"error"
string
required
Status indicates the response status "error"
Authentication error: invalid token or subscription inactive
application/json
error
object
required
Error response details
code
403
integer
required
Code is the HTTP status code
Examples:
403
message
string
required
Message is a human-readable error description
Examples:
Unauthorized to perform this action
type
"ForbiddenError"
string
required
Type indicates the error category
Available options:
ForbiddenError
status
"error"
string
required
Status indicates the response status "error"
Unauthorized to perform this action: insufficient funds