Video API
Browse and upload videos, rate and comment, stream via presigned URLs, and share videos publicly.
Base path: /api/flamenet/v1/videos
Returns a paginated list of public videos, newest first.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number. |
per_page | integer | 12 | Results per page (max 50). |
Example request
curl "https://flamenet.io/api/flamenet/v1/videos?page=1&per_page=12"
Example response
{
"videos": [
{
"id": 7,
"title": "My Summer Road Trip",
"description": "Driving Route 66...",
"mime_type": "video/mp4",
"size_bytes": 104857600,
"size_display": "100.0 MB",
"view_count": 142,
"like_count": 18,
"dislike_count": 1,
"is_public": true,
"share_token": null,
"share_url": null,
"uploader_id": 3,
"uploader": "roadtripper",
"created_at": "2026-02-14 10:30:00"
}
],
"page": 1,
"per_page": 12,
"total": 54,
"pages": 5
}
Uploads a new video. Send as multipart/form-data. Accepted MIME types: video/mp4, video/webm, video/ogg, video/quicktime, video/x-msvideo.
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
fnv_file | file | Yes | Video file (multipart). |
title | string | Yes | Video title. |
description | string | No | Video description. |
Example request
curl -X POST https://flamenet.io/api/flamenet/v1/videos \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "fnv_file=@/path/to/video.mp4" \ -F "title=My Video" \ -F "description=A short clip"
Example response — 201 Created
{
"id": 8,
"title": "My Video",
...
}
Returns video details. Private videos require authentication as the owner.
Example request
curl https://flamenet.io/api/flamenet/v1/videos/7
Deletes the video from both cloud storage and the database. Must be the video owner.
Example request
curl -X DELETE https://flamenet.io/api/flamenet/v1/videos/7 \ -H "Authorization: Bearer YOUR_API_KEY"
Example response
{
"deleted": true,
"id": 7
}
Likes or dislikes a video. Submitting the same rating twice returns "already_rated". Changing your rating (like → dislike or vice versa) is allowed and returns "changed".
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
rating | integer | Yes | 1 for like, -1 for dislike. |
Example request
curl -X POST https://flamenet.io/api/flamenet/v1/videos/7/rate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rating":1}'
Example response
{
"result": "ok",
"like_count": 19,
"dislike_count": 1
}
result values: "ok" (new rating saved), "changed" (rating updated), "already_rated" (same rating submitted again).
Returns paginated comments for a public video, oldest first.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number. |
per_page | integer | 20 | Results per page (max 100). |
Example request
curl "https://flamenet.io/api/flamenet/v1/videos/7/comments"
Example response
{
"comments": [
{
"id": 23,
"video_id": 7,
"user_id": 5,
"author": "flamefan99",
"body": "Great video!",
"posted_at": "2026-02-15 14:22:00"
}
],
"page": 1,
"per_page": 20,
"total": 3,
"pages": 1
}
Posts a new comment on a public video.
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
body | string | Yes | Comment text. |
Example request
curl -X POST https://flamenet.io/api/flamenet/v1/videos/7/comments \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body":"Great video!"}'
Example response — 201 Created
{
"id": 24,
"video_id": 7,
"user_id": 2,
"author": "myusername",
"body": "Great video!",
"posted_at": "2026-03-02 09:15:00"
}
Returns a presigned S3 URL for streaming the video. Valid for 24 hours. Public videos are accessible without authentication. Private videos require auth as the owner.
Example request
curl https://flamenet.io/api/flamenet/v1/videos/7/stream
Example response
{
"stream_url": "https://your-bucket.s3.us-east-1.amazonaws.com/flamenet-videos/...",
"expires_in": 86400,
"mime_type": "video/mp4"
}
Use stream_url as the src of an HTML5 <video> element, or pass it to a media player. The URL expires after expires_in seconds (86400 = 24h).
Creates a public share link for the video. Anyone with the link can watch the video without logging in. If a share link already exists it is returned unchanged.
Example request
curl -X POST https://flamenet.io/api/flamenet/v1/videos/7/share \ -H "Authorization: Bearer YOUR_API_KEY"
Example response
{
"id": 7,
"shared": true,
"token": "a3f8c2d1e9b7...",
"share_url": "https://flamenet.io/videos/?fnv_share=a3f8c2d1e9b7..."
}
Removes the video's share link. Any existing share URLs will stop working immediately.
Example request
curl -X DELETE https://flamenet.io/api/flamenet/v1/videos/7/share \ -H "Authorization: Bearer YOUR_API_KEY"
Example response
{
"id": 7,
"shared": false
}