How to upload SRT subtitles and get a URL
Subtitle files are often generated separately from video and need a dependable handoff point. FilePost gives the SRT file its own URL so a player or automation step can retrieve it when needed.
FilePost hosts the subtitle text exactly as uploaded. Make sure the character encoding and timecode format are correct before uploading; the API does not rewrite captions or synchronize them to a video.
Upload srt files with FilePost
Use the authenticated FilePost upload API for srt 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.srt"
Example response
{
"url": "https://cdn.filepost.dev/file/…",
"file_id": "a1b2c3d4e5f6",
"name": "captions.srt",
"size": 84210,
"content_type": "application/x-subrip"
}
What to do with the returned URL
Save the subtitle URL with the video record, expose it as a download, or pass it to the next media-processing step.
<track src="https://cdn.filepost.dev/file/…" kind="subtitles">
Good uses for srt to URL
- Subtitle files next to hosted videos
- Media-processing handoffs
- Caption downloads from an app or workflow
Know the boundary
FilePost does not generate captions, translate subtitles, or retime cues. Use a captioning or media-processing tool for those jobs.
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.