My Account Subscribe Help About
Sign In | Register FREE
Tuesday, April 28, 2026
King to defend democratic values as US state visit beginsBP profits more than double as Iran war sends oil prices higherSuspect charged with attempted assassination of Trump at Washington dinnerPolitical violence jolts the US once again - with a familiar responseMy tenant owes £15,000 in rent, but I can't get them out of the propertyWhen Attenborough met the gorillas - the story behind his iconic TV momentRussian superyacht sails through Strait of Hormuz despite blockadeFigures show rise in suicides after domestic abuseMan who murdered British dad in Australia declared mentally unfit for trialMan pleads guilty to murder two decades after death of Run DMC's Jam Master JayJimmy Kimmel rejects White House criticism over Melania widow jokeIn pictures: King Charles and Queen Camilla begin US state visitNewspaper headlines: 'United King Don' and 'PM battles to block sleaze vote'Why Spotify has no button to filter out AI music'My husband finally got full-time care – he died a week later'Babies among those tied up and allegedly abused in Indonesia childcare centre'I had £20,000 stolen and had to fight a 13-month fraud reporting rule to get it back''My husband might give up work to care for our kids' - nursery bills in Wales highest in BritainRescuers race to free survivors trapped inside train after fatal Indonesia crashTerror trial to begin for man accused of plotting attack on Taylor Swift concertRebel Wilson says claims she bullied women on her film are 'absolute nonsense'Claire's closes all 154 stores in UK and Ireland with loss of 1,300 jobsIS claims responsibility for Nigeria attack that killed 29 peopleExecutions in North Korea ramped up significantly during pandemic - reportDeal 'within sight' to end year-long Birmingham bin strike, says council leaderBBC News appThe King Arrives In The US, But Can He Mend The Special Relationship?Who is Trump’s 'would-be assassin' and were there security failings at DC shooting?All but back in Champions League - yet big decisions loom at Man UtdGreaves becomes first female PDC title winner

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
}