Files
Use Files to manage uploaded, recorded, and processed media: add an asset, update supported metadata, create a derivative, copy it to configured storage, or remove it.
Transfer lifecycle
All methods require x-access-token. The instance needs enough local space for upload and processing, and copying to object storage requires a configured Storage. Use upload or create to add media, then keep the returned identifier for inspection, updates, or transfer.
Copy and verify
copyTo starts an asynchronous storage copy; getCopyProgress reports transfer progress. Large uploads and copies can fail through disk limits, credentials, network capacity, or invalid paths. Verify the destination before deleting the source with remove or removeByPath, and treat user-supplied paths and filenames as untrusted input.
Related operations
Use the list, count, and lookup methods to inspect the inventory, and getStat for available processing status. Use Web players when an asset must be published for browser playback.
Create saves a managed file record in the file manager. Use it when an uploaded asset should become something the rest of the platform can work with reliably: a named file, a converted deliverable, or a reusable playback or overlay asset.
This method is more than metadata storage. If the requested output_format or transcoding settings differ from the uploaded asset, Callaba can start the conversion work that turns the source file into the deliverable the team actually needs.
Examples by preset on this method show the most useful create shapes: preserve an uploaded MP4 as-is, derive an MP3 deliverable, or materialize an HLS package.
Use this preset when an uploaded mezzanine file should become a reusable managed asset without additional conversion.
This is the cleanest file-manager path: upload first, then register the asset with metadata, visibility, and a durable file row.
curl --request POST \
--url http://localhost/api/files/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"file_name": "Main stage mezzanine",
"file_visibility": "private",
"file_description": "Uploaded mezzanine asset for overlay and playback workflows.",
"file_path": "uploaded/f-01abc-main-stage.mp4",
"output_format": "mp4",
"file_unique_id": "file_01abc",
"transcoding": {
"video_transcoding": "Disabled",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
}
}'Use this preset when the stored asset should be rewritten into a simpler audio deliverable during the save flow.
The file row is created first, then the background transcoding worker produces the derivative output and exposes progress through getStat.
curl --request POST \
--url http://localhost/api/files/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"file_name": "Main stage audio extract",
"file_visibility": "private",
"file_description": "Audio-only derivative prepared from the uploaded mezzanine file.",
"file_path": "uploaded/f-01abc-main-stage.mp4",
"output_format": "mp3",
"file_unique_id": "file_01abc",
"transcoding": {
"video_transcoding": "Disabled",
"audio_transcoding": "mp3",
"output_audio_bitrate": 128,
"sample_rate": 44100
}
}'Use this preset when the resulting asset should be materialized as an HLS package instead of a single file.
This is useful when the managed file will be handed to a playback or delivery workflow that expects an HLS-style directory output.
curl --request POST \
--url http://localhost/api/files/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"file_name": "Main stage HLS package",
"file_visibility": "private",
"file_description": "Segmented HLS output prepared from an uploaded mezzanine file.",
"file_path": "uploaded/f-01abc-main-stage.mp4",
"output_format": "m3u8",
"file_unique_id": "file_01abc",
"transcoding": {
"video_transcoding": "h264",
"audio_transcoding": "aac",
"output_audio_bitrate": 128,
"sample_rate": 44100
}
}'Dashboard label: Name.
Human-facing asset name stored in the file manager.
Dashboard label: File.
Path produced by uploadFile or already known to the platform.
Upload correlation id used to connect an in-progress upload with the saved file row.
Dashboard label: Visibility.
Controls whether the stored file should be treated as public or private in downstream UI flows.
Optional description stored on the file row.
Dashboard label: Output format.
If the requested format differs from the uploaded extension, the backend starts a background rewrite flow.
Optional transcoding settings used when the file should be converted into a different deliverable.
Optional source context for UI-driven flows. In practice the file manager most often saves rows under MODULE_FILES.
curl --request POST \
--url http://localhost/api/files/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"file_name": "Main stage mezzanine",
"file_visibility": "private",
"file_description": "Uploaded mezzanine asset for overlay and playback workflows.",
"file_path": "uploaded/f-01abc-main-stage.mp4",
"output_format": "mp4",
"file_unique_id": "file_01abc",
"transcoding": {
"video_transcoding": "Disabled",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
}
}'Saved file identifiers and the persisted file name.
Stored file location plus the upload correlation id.
Saved visibility and descriptive metadata for the asset.
Output-format and processing state stored with the file row.
Computed media metrics and backend-managed timestamp fields.
{
"_id": "680100000000000000000001",
"id": "680100000000000000000001",
"file_name": "Main stage mezzanine",
"file_unique_id": "file_01abc",
"file_description": "Uploaded mezzanine asset for overlay and playback workflows.",
"file_path": "uploaded/f-01abc-main-stage.mp4",
"storage_type": "STORAGE_TYPE_INTERNAL_DISK",
"storage_id": null,
"file_visibility": "private",
"module_name": "MODULE_FILES",
"entity_name": "",
"entity_id": null,
"output_format": "mp4",
"transcoding": {
"video_transcoding": "Disabled",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"overlay": {
"type": "DISABLED"
},
"duration_ms": 612000,
"size_bytes": 832640000,
"created": "2026-03-24T18:55:00.000Z"
}Workflow examples and help
Process a media file and copy it to storage
Create or upload the managed file, monitor any derivative processing, then copy the finished asset to a configured storage target.
- Create the managed derivativeChoose the source, output format, and required processing.
POST /api/files/create - Monitor processingWait for the background worker to finish.
POST /api/files/getStat - Copy to storageSend the finished file to a registered destination.
POST /api/files/copyTo - Verify copy completionKeep the source until the progress response confirms completion.
POST /api/files/getCopyProgressById
Do not remove the source until processing and copy progress are complete and the destination object has been verified.