How to upload a VTT file and get a URL
WebVTT files make video more accessible and searchable, but they still need a reliable delivery URL. FilePost hosts the VTT file and returns a public link your player can reference.
Keep the WebVTT headers, cue timing, and encoding valid before upload. FilePost does not edit the file or infer which video it belongs to, so store the returned URL alongside the matching media record.
Upload vtt files with FilePost
Use the authenticated FilePost upload API for vtt files. The endpoint returns a JSON object containing the public URL, file ID, size, content type, and filename mode.
curl -X POST https://upload.filepost.dev/v1/upload \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@captions.vtt"
Example response
{
"url": "https://cdn.filepost.dev/file/…",
"file_id": "a1b2c3d4e5f6",
"name": "captions.vtt",
"size": 84210,
"content_type": "text/vtt"
}
What to do with the returned URL
Store the VTT URL with the video metadata and reference it from your player or downstream workflow.
<track src="https://cdn.filepost.dev/file/…" kind="captions" srclang="en">
Good uses for vtt to URL
- Browser video captions
- Timed metadata and chapter files
- Subtitle handoffs in media automation
Know the boundary
FilePost does not create captions, translate them, or validate cue timing. Use your player or caption-processing layer for those responsibilities.
For the complete request and response contract, see the FilePost API documentation. You can also test the flow with the interactive upload on the homepage.