Friday, June 12, 2026 Sign InRegister FREE My Account Help
Flamenet API — Video

Video API

Browse and upload videos, rate and comment, stream via presigned URLs, and share videos publicly.

Base path: /api/flamenet/v1/videos

GET /videos

Returns a paginated list of public videos, newest first.

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number.
per_pageinteger12Results 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
}
POST /videos AUTH REQUIRED

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

FieldTypeRequiredDescription
fnv_filefileYesVideo file (multipart).
titlestringYesVideo title.
descriptionstringNoVideo 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",
  ...
}
GET /videos/{id}

Returns video details. Private videos require authentication as the owner.

Example request

curl https://flamenet.io/api/flamenet/v1/videos/7
DELETE /videos/{id} AUTH REQUIRED

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
}
POST /videos/{id}/rate AUTH REQUIRED

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)

FieldTypeRequiredDescription
ratingintegerYes1 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).

GET /videos/{id}/comments

Returns paginated comments for a public video, oldest first.

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number.
per_pageinteger20Results 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
}
POST /videos/{id}/comments AUTH REQUIRED

Posts a new comment on a public video.

Request body (JSON)

FieldTypeRequiredDescription
bodystringYesComment 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"
}
GET /videos/{id}/stream

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).

POST /videos/{id}/share AUTH REQUIRED

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..."
}
DELETE /videos/{id}/share AUTH REQUIRED

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
}
FlameNet Weekly: the best of the forum, freshest listings, top Q&A — delivered every Sunday.
13 members · 0 new today · 0 online now · 674 posts in last 24h