{"id":1448,"date":"2026-03-02T15:07:11","date_gmt":"2026-03-02T15:07:11","guid":{"rendered":"http:\/\/localhost:8881\/api-videos\/"},"modified":"2026-03-02T15:07:11","modified_gmt":"2026-03-02T15:07:11","slug":"api-videos","status":"publish","type":"page","link":"https:\/\/flamenet.io\/api-videos\/","title":{"rendered":"Flamenet API \u2014 Video"},"content":{"rendered":"<nav class=\"api-nav\"><span class=\"api-nav-brand\">&#9670; Flamenet API<\/span><a href=\"https:\/\/flamenet.io\/api-docs\/\">Overview<\/a><a href=\"https:\/\/flamenet.io\/api-forum\/\">Forum<\/a><a href=\"https:\/\/flamenet.io\/api-answers\/\">Answers<\/a><a href=\"https:\/\/flamenet.io\/api-shop\/\">Shop<\/a><a href=\"https:\/\/flamenet.io\/api-marketplace\/\">Marketplace<\/a><a href=\"https:\/\/flamenet.io\/api-files\/\">Files<\/a><a href=\"https:\/\/flamenet.io\/api-videos\/\" class=\"active\">Video<\/a><\/nav><div class=\"api-wrap\">        <h1>Video API<\/h1>\n        <p>Browse and upload videos, rate and comment, stream via presigned URLs, and share videos publicly.<\/p>\n        <p><strong>Base path:<\/strong> <code>\/api\/flamenet\/v1\/videos<\/code><\/p>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-get\">GET<\/span>\n            <span class=\"endpoint-path\">\/videos<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Returns a paginated list of public videos, newest first.<\/p>\n            <h3>Query parameters<\/h3>\n            <table>\n              <thead><tr><th>Parameter<\/th><th>Type<\/th><th>Default<\/th><th>Description<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td><code>page<\/code><\/td><td>integer<\/td><td>1<\/td><td>Page number.<\/td><\/tr>\n                <tr><td><code>per_page<\/code><\/td><td>integer<\/td><td>12<\/td><td>Results per page (max 50).<\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <h3>Example request<\/h3>\n            <pre>curl \"https:\/\/flamenet.io\/api\/flamenet\/v1\/videos?page=1&per_page=12\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">videos<\/span>\": [\n    {\n      \"<span class=\"key\">id<\/span>\":            <span class=\"num\">7<\/span>,\n      \"<span class=\"key\">title<\/span>\":         \"<span class=\"str\">My Summer Road Trip<\/span>\",\n      \"<span class=\"key\">description<\/span>\":  \"<span class=\"str\">Driving Route 66...<\/span>\",\n      \"<span class=\"key\">mime_type<\/span>\":     \"<span class=\"str\">video\/mp4<\/span>\",\n      \"<span class=\"key\">size_bytes<\/span>\":    <span class=\"num\">104857600<\/span>,\n      \"<span class=\"key\">size_display<\/span>\":  \"<span class=\"str\">100.0 MB<\/span>\",\n      \"<span class=\"key\">view_count<\/span>\":    <span class=\"num\">142<\/span>,\n      \"<span class=\"key\">like_count<\/span>\":    <span class=\"num\">18<\/span>,\n      \"<span class=\"key\">dislike_count<\/span>\": <span class=\"num\">1<\/span>,\n      \"<span class=\"key\">is_public<\/span>\":     <span class=\"num\">true<\/span>,\n      \"<span class=\"key\">share_token<\/span>\":   <span class=\"num\">null<\/span>,\n      \"<span class=\"key\">share_url<\/span>\":     <span class=\"num\">null<\/span>,\n      \"<span class=\"key\">uploader_id<\/span>\":   <span class=\"num\">3<\/span>,\n      \"<span class=\"key\">uploader<\/span>\":      \"<span class=\"str\">roadtripper<\/span>\",\n      \"<span class=\"key\">created_at<\/span>\":    \"<span class=\"str\">2026-02-14 10:30:00<\/span>\"\n    }\n  ],\n  \"<span class=\"key\">page<\/span>\":     <span class=\"num\">1<\/span>,\n  \"<span class=\"key\">per_page<\/span>\": <span class=\"num\">12<\/span>,\n  \"<span class=\"key\">total<\/span>\":    <span class=\"num\">54<\/span>,\n  \"<span class=\"key\">pages<\/span>\":    <span class=\"num\">5<\/span>\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-post\">POST<\/span>\n            <span class=\"endpoint-path\">\/videos<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Uploads a new video. Send as <code>multipart\/form-data<\/code>. Accepted MIME types: <code>video\/mp4<\/code>, <code>video\/webm<\/code>, <code>video\/ogg<\/code>, <code>video\/quicktime<\/code>, <code>video\/x-msvideo<\/code>.<\/p>\n            <h3>Request fields<\/h3>\n            <table>\n              <thead><tr><th>Field<\/th><th>Type<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td><code>fnv_file<\/code><\/td><td>file<\/td><td>Yes<\/td><td>Video file (multipart).<\/td><\/tr>\n                <tr><td><code>title<\/code><\/td><td>string<\/td><td>Yes<\/td><td>Video title.<\/td><\/tr>\n                <tr><td><code>description<\/code><\/td><td>string<\/td><td>No<\/td><td>Video description.<\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <h3>Example request<\/h3>\n            <pre>curl -X POST https:\/\/flamenet.io\/api\/flamenet\/v1\/videos \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -F \"fnv_file=@\/path\/to\/video.mp4\" \\\n  -F \"title=My Video\" \\\n  -F \"description=A short clip\"<\/pre>\n            <h3>Example response \u2014 201 Created<\/h3>\n            <pre>{\n  \"<span class=\"key\">id<\/span>\":    <span class=\"num\">8<\/span>,\n  \"<span class=\"key\">title<\/span>\": \"<span class=\"str\">My Video<\/span>\",\n  ...\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-get\">GET<\/span>\n            <span class=\"endpoint-path\">\/videos\/{id}<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Returns video details. Private videos require authentication as the owner.<\/p>\n            <h3>Example request<\/h3>\n            <pre>curl https:\/\/flamenet.io\/api\/flamenet\/v1\/videos\/7<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-delete\">DELETE<\/span>\n            <span class=\"endpoint-path\">\/videos\/{id}<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Deletes the video from both cloud storage and the database. Must be the video owner.<\/p>\n            <h3>Example request<\/h3>\n            <pre>curl -X DELETE https:\/\/flamenet.io\/api\/flamenet\/v1\/videos\/7 \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">deleted<\/span>\": <span class=\"num\">true<\/span>,\n  \"<span class=\"key\">id<\/span>\":      <span class=\"num\">7<\/span>\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-post\">POST<\/span>\n            <span class=\"endpoint-path\">\/videos\/{id}\/rate<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Likes or dislikes a video. Submitting the same rating twice returns <code>\"already_rated\"<\/code>. Changing your rating (like \u2192 dislike or vice versa) is allowed and returns <code>\"changed\"<\/code>.<\/p>\n            <h3>Request body (JSON)<\/h3>\n            <table>\n              <thead><tr><th>Field<\/th><th>Type<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td><code>rating<\/code><\/td><td>integer<\/td><td>Yes<\/td><td><code>1<\/code> for like, <code>-1<\/code> for dislike.<\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <h3>Example request<\/h3>\n            <pre>curl -X POST https:\/\/flamenet.io\/api\/flamenet\/v1\/videos\/7\/rate \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"rating\":1}'<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">result<\/span>\":        \"<span class=\"str\">ok<\/span>\",\n  \"<span class=\"key\">like_count<\/span>\":    <span class=\"num\">19<\/span>,\n  \"<span class=\"key\">dislike_count<\/span>\": <span class=\"num\">1<\/span>\n}<\/pre>\n            <p><code>result<\/code> values: <code>\"ok\"<\/code> (new rating saved), <code>\"changed\"<\/code> (rating updated), <code>\"already_rated\"<\/code> (same rating submitted again).<\/p>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-get\">GET<\/span>\n            <span class=\"endpoint-path\">\/videos\/{id}\/comments<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Returns paginated comments for a public video, oldest first.<\/p>\n            <h3>Query parameters<\/h3>\n            <table>\n              <thead><tr><th>Parameter<\/th><th>Type<\/th><th>Default<\/th><th>Description<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td><code>page<\/code><\/td><td>integer<\/td><td>1<\/td><td>Page number.<\/td><\/tr>\n                <tr><td><code>per_page<\/code><\/td><td>integer<\/td><td>20<\/td><td>Results per page (max 100).<\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <h3>Example request<\/h3>\n            <pre>curl \"https:\/\/flamenet.io\/api\/flamenet\/v1\/videos\/7\/comments\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">comments<\/span>\": [\n    {\n      \"<span class=\"key\">id<\/span>\":        <span class=\"num\">23<\/span>,\n      \"<span class=\"key\">video_id<\/span>\":  <span class=\"num\">7<\/span>,\n      \"<span class=\"key\">user_id<\/span>\":   <span class=\"num\">5<\/span>,\n      \"<span class=\"key\">author<\/span>\":    \"<span class=\"str\">flamefan99<\/span>\",\n      \"<span class=\"key\">body<\/span>\":      \"<span class=\"str\">Great video!<\/span>\",\n      \"<span class=\"key\">posted_at<\/span>\": \"<span class=\"str\">2026-02-15 14:22:00<\/span>\"\n    }\n  ],\n  \"<span class=\"key\">page<\/span>\":     <span class=\"num\">1<\/span>,\n  \"<span class=\"key\">per_page<\/span>\": <span class=\"num\">20<\/span>,\n  \"<span class=\"key\">total<\/span>\":    <span class=\"num\">3<\/span>,\n  \"<span class=\"key\">pages<\/span>\":    <span class=\"num\">1<\/span>\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-post\">POST<\/span>\n            <span class=\"endpoint-path\">\/videos\/{id}\/comments<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Posts a new comment on a public video.<\/p>\n            <h3>Request body (JSON)<\/h3>\n            <table>\n              <thead><tr><th>Field<\/th><th>Type<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead>\n              <tbody>\n                <tr><td><code>body<\/code><\/td><td>string<\/td><td>Yes<\/td><td>Comment text.<\/td><\/tr>\n              <\/tbody>\n            <\/table>\n            <h3>Example request<\/h3>\n            <pre>curl -X POST https:\/\/flamenet.io\/api\/flamenet\/v1\/videos\/7\/comments \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"body\":\"Great video!\"}'<\/pre>\n            <h3>Example response \u2014 201 Created<\/h3>\n            <pre>{\n  \"<span class=\"key\">id<\/span>\":        <span class=\"num\">24<\/span>,\n  \"<span class=\"key\">video_id<\/span>\":  <span class=\"num\">7<\/span>,\n  \"<span class=\"key\">user_id<\/span>\":   <span class=\"num\">2<\/span>,\n  \"<span class=\"key\">author<\/span>\":    \"<span class=\"str\">myusername<\/span>\",\n  \"<span class=\"key\">body<\/span>\":      \"<span class=\"str\">Great video!<\/span>\",\n  \"<span class=\"key\">posted_at<\/span>\": \"<span class=\"str\">2026-03-02 09:15:00<\/span>\"\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-get\">GET<\/span>\n            <span class=\"endpoint-path\">\/videos\/{id}\/stream<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Returns a presigned S3 URL for streaming the video. Valid for <strong>24 hours<\/strong>. Public videos are accessible without authentication. Private videos require auth as the owner.<\/p>\n            <h3>Example request<\/h3>\n            <pre>curl https:\/\/flamenet.io\/api\/flamenet\/v1\/videos\/7\/stream<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">stream_url<\/span>\": \"<span class=\"str\">https:\/\/your-bucket.s3.us-east-1.amazonaws.com\/flamenet-videos\/...<\/span>\",\n  \"<span class=\"key\">expires_in<\/span>\": <span class=\"num\">86400<\/span>,\n  \"<span class=\"key\">mime_type<\/span>\":  \"<span class=\"str\">video\/mp4<\/span>\"\n}<\/pre>\n            <p>Use <code>stream_url<\/code> as the <code>src<\/code> of an HTML5 <code>&lt;video&gt;<\/code> element, or pass it to a media player. The URL expires after <code>expires_in<\/code> seconds (86400 = 24h).<\/p>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-post\">POST<\/span>\n            <span class=\"endpoint-path\">\/videos\/{id}\/share<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">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.<\/p>\n            <h3>Example request<\/h3>\n            <pre>curl -X POST https:\/\/flamenet.io\/api\/flamenet\/v1\/videos\/7\/share \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">id<\/span>\":        <span class=\"num\">7<\/span>,\n  \"<span class=\"key\">shared<\/span>\":    <span class=\"num\">true<\/span>,\n  \"<span class=\"key\">token<\/span>\":     \"<span class=\"str\">a3f8c2d1e9b7...<\/span>\",\n  \"<span class=\"key\">share_url<\/span>\": \"<span class=\"str\">https:\/\/flamenet.io\/videos\/?fnv_share=a3f8c2d1e9b7...<\/span>\"\n}<\/pre>\n          <\/div>\n        <\/div>\n\n        <div class=\"endpoint\">\n          <div class=\"endpoint-header\">\n            <span class=\"method method-delete\">DELETE<\/span>\n            <span class=\"endpoint-path\">\/videos\/{id}\/share<\/span>\n            <span class=\"auth-badge\">AUTH REQUIRED<\/span>\n          <\/div>\n          <div class=\"endpoint-body\">\n            <p class=\"endpoint-desc\">Removes the video's share link. Any existing share URLs will stop working immediately.<\/p>\n            <h3>Example request<\/h3>\n            <pre>curl -X DELETE https:\/\/flamenet.io\/api\/flamenet\/v1\/videos\/7\/share \\\n  -H \"Authorization: Bearer YOUR_API_KEY\"<\/pre>\n            <h3>Example response<\/h3>\n            <pre>{\n  \"<span class=\"key\">id<\/span>\":     <span class=\"num\">7<\/span>,\n  \"<span class=\"key\">shared<\/span>\": <span class=\"num\">false<\/span>\n}<\/pre>\n          <\/div>\n        <\/div>\n        <div class=\"api-footer\">Flamenet API v1.0 &mdash; <a href=\"https:\/\/flamenet.io\/api-docs\/\">API Overview<\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1448","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/flamenet.io\/api\/wp\/v2\/pages\/1448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flamenet.io\/api\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/flamenet.io\/api\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/flamenet.io\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flamenet.io\/api\/wp\/v2\/comments?post=1448"}],"version-history":[{"count":0,"href":"https:\/\/flamenet.io\/api\/wp\/v2\/pages\/1448\/revisions"}],"wp:attachment":[{"href":"https:\/\/flamenet.io\/api\/wp\/v2\/media?parent=1448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}