API Documentation

API Documentation

FileHost.net provides a simple HTTP API to integrate ours into your business or application.
All requests to the API should be only GET or POST
POST parameters can be sent as form fields or as a JSON object body; a parameter in the query string wins over the same one in the body.
Send your API key as the key or api_key parameter, in the header X-API-Key: YOUR_API_KEY or in the header Authorization: Bearer YOUR_API_KEY.
You can find your API key here - https://filehost.net/settings
All dates and times are in UTC (YYYY-MM-DD HH:MM:SS), in responses and in parameters such as created; daily statistics cover UTC days.
Every answer is JSON with the same envelope, status is an integer and equals the HTTP status code: {"msg":"OK","server_time":"2026-03-12 04:30:07","status":200,"result":{}}

Rate limits

API requests are limited per account: by default 250 requests per hour, 5,000 requests per day and 25 uploads per day. Contact us if you need higher limits.

Every answer carries the headers X-RateLimit-Limit-Hour, X-RateLimit-Remaining-Hour, X-RateLimit-Limit-Day and X-RateLimit-Remaining-Day. Upload requests also carry X-UploadLimit-Day and X-UploadRemaining-Day. When a limit is reached the API answers 429 with a Retry-After header (seconds).

Response
{
  "msg": "The hourly API request limit has been reached.",
  "server_time": "2026-03-12 04:30:07",
  "status": 429
}

Errors

Errors use the same answer without result, and status is the HTTP status code. For example {"msg":"File not found.","server_time":"2026-03-12 04:30:07","status":404}

401
Missing or invalid API key
403
API access is disabled for the account, or the owner of the file does not allow copies
404
File or folder not found
405
Wrong method (use GET or POST)
409
Conflict (the folder is not empty)
422
A parameter is missing or invalid, the message says which (for example "file_code is required.")
429
Rate limit reached, or no remote upload slots are available
503
The upload service is not available right now

Account

Account Info

Get basic info of your account

GET https://filehost.net/api/account/info?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": {
    "email": "email@test.com",
    "balance": "0.00000",
    "balance_available": "0.00000",
    "storage_used": "24186265",
    "storage_left": 53662904935,
    "upload_level": 0,
    "upload_level_name": "New",
    "files_limit": 500,
    "uploads_per_day": 20,
    "premim_expire": "2026-03-12 21:00:00",
    "premium_expire": "2026-03-12 21:00:00"
  }
}

Account Reports

Get reports of your account (default last 7 days)

The range includes today, so last=7 returns 8 rows. The value of downloads is always "0".

GET https://filehost.net/api/account/stats?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
last
Last x days report (default 7, max 120)
No
from_date
From date - YYYY-MM-DD
No
to_date
To date - YYYY-MM-DD
No
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": [
    {
      "profit_views": "0.00000",
      "downloads": "0",
      "views": "0",
      "day": "2026-03-11",
      "profit_total": "0.00000"
    },
    {
      "profit_views": "0.00000",
      "downloads": "0",
      "views": "0",
      "day": "2026-03-12",
      "profit_total": "0.00000"
    }
  ]
}

DMCA List

Get DMCA reported files list (500 results per page)

GET https://filehost.net/api/dmca/list?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
per_page
Results per page (default 500)
no
page
Pagination
no
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": [
    {
      "reported_on": "2026-03-12 04:30:07",
      "protected_download": "yyy",
      "protected_embed": "zzz",
      "file_code": "xxx",
      "fld_id": "0",
      "disabled_on": "2026-03-12 05:00:07"
    }
  ]
}

Upload

Local upload

Upload local files using API

Send the file with a POST (multipart) to the URL returned here. That URL accepts POST only.

GET https://filehost.net/api/upload/server?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
file
The file to upload (multipart form field, sent to the returned URL)
Yes
title
Title of the file (alias file_title)
No
fld_id
Folder ID (0 = top level)
No
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": "https://filehost.net/api/upload/server/01?key={your_api_key}"
}
Example to use (cURL)
curl -X POST -F 'file=@file.mp4' -F 'title=My video' "https://filehost.net/api/upload/server/01?key={your_api_key}"
Example to use (HTML)
<form enctype="multipart/form-data" action="https://filehost.net/api/upload/server/01?key={your_api_key}" method="post">
<input name="file" type="file">
<input type="submit">
</form>
After upload response

The result is a list with one file, like File info. canplay and length are "0" until processing is finished, and size can change after processing.

{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": [
    {
      "download_url": "https://filehost.net/v/xxx",
      "thumbnail": "https://filehost.net/thumbs/xxx/grid4.webp",
      "thumbnails": {
        "single": "https://filehost.net/thumbs/xxx/single.webp",
        "grid2": "https://filehost.net/thumbs/xxx/grid2.webp",
        "grid3": "https://filehost.net/thumbs/xxx/grid3.webp",
        "grid4": "https://filehost.net/thumbs/xxx/grid4.webp"
      },
      "file_code": "xxx",
      "canplay": "0",
      "length": "0",
      "views": "0",
      "uploaded": "2026-03-12 04:30:07",
      "public": "1",
      "fld_id": "0",
      "title": "test_file",
      "status": 200,
      "filecode": "xxx",
      "size": "123456",
      "last_view": "",
      "protected_embed": "https://filehost.net/e/xxx",
      "protected_dl": "https://filehost.net/v/xxx"
    }
  ]
}

Copy or Clone

Copy / Clone your's or other's file

GET https://filehost.net/api/file/clone?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
file_code
File code (your own file, or another user's public file if the owner allows copies)
Yes
fld_id
Folder ID (to copy inside the folder, 0 = top level)
No
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": {
    "embed_url": "https://filehost.net/e/xxx",
    "download_url": "https://filehost.net/v/xxx",
    "protected_download": "https://filehost.net/v/xxx",
    "protected_embed": "https://filehost.net/e/xxx",
    "filecode": "xxx"
  }
}

Large files (resumable upload)

Send big files in parts. A failed part is simply sent again, and an interrupted upload continues where it stopped when you start it again with the same name, size and modified time (within 48 hours).

POST https://filehost.net/api/uploads/chunked?key={your_api_key}
Parameter
Description
Required
name
File name with extension
Yes
size
File size in bytes
Yes
modified
Last modified time (any number that stays the same for the file)
No
folder_id
Folder ID
No
title
Title of the file
No
Response (HTTP 201, or 200 with "resumed": true when an interrupted upload continues)
{
  "status": "ok",
  "upload_id": "up_8fe75a942bd003f06095",
  "kind": "video",
  "chunk_bytes": 8388608,
  "chunk_count": 13,
  "received_bytes": 0,
  "missing": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  "state": "open",
  "resumed": false
}
Then send every part listed in missing, then finish
# part N = bytes N*chunk_bytes up to (N+1)*chunk_bytes, as the raw request body
curl -X POST --data-binary @part-0.bin -H "Content-Type: application/octet-stream" \
  "https://filehost.net/api/uploads/chunked/{upload_id}/0?key={your_api_key}"

curl -X POST "https://filehost.net/api/uploads/chunked/{upload_id}/complete?key={your_api_key}"

Calling complete again returns the same answer. If parts are still missing, complete answers HTTP 409 with "status": "fail" and the list in missing. An unknown or expired upload id answers 404. This endpoint uses its own answer, {"status":"ok"} or {"status":"fail","message":"..."}, not the envelope above.

After upload response (HTTP 201)
{
  "status": "ok",
  "kind": "video",
  "code": "xxx",
  "video": {
    "public_id": "xxx",
    "title": "My video",
    "status": "queued",
    "watch_url": "https://filehost.net/v/xxx",
    "embed_url": "https://filehost.net/e/xxx"
  }
}

Remote upload

Add link

Upload files using direct links

The returned code (ru...) is the code of the transfer: use it with Remote upload status. Once the transfer is finished, File info, File status, File image, File rename, File move, Copy / Clone and Delete file accept it too, and the transfer lists show the file's own code in final_file_code.

GET https://filehost.net/api/upload/url?key={your_api_key}&url={upload_url}
Parameter
Description
Required
key
Your API Key
Yes
url
URL to upload (public http or https address)
Yes
fld_id
To upload inside a folder (0 = top level)
No
new_title
Title of the new file (alias new_name)
No
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "new_title": "My video",
  "status": 200,
  "total_slots": "25",
  "result": {
    "filecode": "ruKXic5ID33YA"
  },
  "used_slots": "1"
}

Remote upload list

Remote Upload List & Status

GET https://filehost.net/api/urlupload/list?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
Response (status is pending, working, finished or error)
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": [
    {
      "bytes_total": "0",
      "created": "2026-03-12 04:30:07",
      "remote_url": "https://example.com/video.mp4",
      "status": "working",
      "file_code": "ruKXic5ID33YA",
      "bytes_downloaded": "0",
      "folder_id": "0",
      "final_file_code": ""
    }
  ]
}

Remote upload status

Remote Upload Status

GET https://filehost.net/api/urlupload/status?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
file_code
Transfer code (ru...) of the file
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": [
    {
      "bytes_total": "0",
      "created": "2026-03-12 04:30:07",
      "remote_url": "https://example.com/video.mp4",
      "status": "finished",
      "file_code": "ruKXic5ID33YA",
      "bytes_downloaded": "0",
      "folder_id": "0",
      "final_file_code": "xxx"
    }
  ]
}

Remote upload slots

Get total & used remote upload slots

GET https://filehost.net/api/urlupload/slots?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "total_slots": "25",
  "used_slots": "10"
}

Remote upload actions

Perform various actions on remote upload

Send exactly one of restart_errors=1, clear_errors=1, clear_all=1 or delete_code=CODE. Without any of them the answer is 422 "No valid action was requested.".

GET https://filehost.net/api/urlupload/actions?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
restart_errors
Restart all errors
One of these
clear_errors
Clear all errors
One of these
clear_all
Clear all
One of these
delete_code
Delete a transfer, pass its code (ru...)
One of these
Response (the message is "Errors restarted", "Errors cleared", "All transfers cleared" or "Transfer deleted")
{
  "msg": "Errors restarted",
  "server_time": "2026-03-12 04:30:07",
  "status": 200
}

Manage folders

Create folder

Create a folder

GET https://filehost.net/api/folder/create?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
name
Name of the folder
Yes
parent_id
Parent folder ID (0 = top level)
No
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": {
    "fld_id": "pLftqDGBOxQ"
  }
}

Rename folder

Rename a folder

GET https://filehost.net/api/folder/rename?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
fld_id
Folder ID
Yes
name
New name of the folder
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": "true"
}

List Folders & Files

List the folders and files inside a folder (up to 200 files)

GET https://filehost.net/api/folder/list?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
fld_id
Folder ID (default top level)
No
only_folders
To list only folders (0 or 1)
No
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": {
    "folders": [
      {
        "name": "Folder name",
        "code": "67299gduj3",
        "fld_id": "oCMom6rPfB8"
      }
    ],
    "files": [
      {
        "download_url": "https://filehost.net/v/xxx",
        "thumbnail": "https://filehost.net/thumbs/xxx/grid4.webp",
        "thumbnails": {
          "single": "https://filehost.net/thumbs/xxx/single.webp",
          "grid2": "https://filehost.net/thumbs/xxx/grid2.webp",
          "grid3": "https://filehost.net/thumbs/xxx/grid3.webp",
          "grid4": "https://filehost.net/thumbs/xxx/grid4.webp"
        },
        "file_code": "xxx",
        "canplay": "1",
        "length": "1234",
        "views": "1",
        "uploaded": "2026-03-12 04:30:07",
        "public": "1",
        "fld_id": "0",
        "title": "test_file",
        "status": 200,
        "filecode": "xxx",
        "size": "123456",
        "last_view": "",
        "protected_embed": "https://filehost.net/e/xxx",
        "protected_dl": "https://filehost.net/v/xxx"
      }
    ]
  }
}

Delete folder

Delete an empty folder

Only empty folders (no files and no subfolders) can be deleted, otherwise the answer is 409 "The folder is not empty.".

GET https://filehost.net/api/folder/delete?key={your_api_key}&fld_id=pLftqDGBOxQ
Parameter
Description
Required
key
Your API Key
Yes
fld_id
Folder ID
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": "true"
}

Manage files

List files

List all files

GET https://filehost.net/api/file/list?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
page
Pagination
no
per_page
Max videos per page (default 50, max 200)
no
fld_id
Videos inside a folder (0 = top level)
no
created
Show files uploaded after timestamp in UTC (Ex : 2026-03-12 03:15:19, or a date YYYY-MM-DD)
Or specify number to show only files uploaded X minutes ago
no
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": {
    "total_pages": 1,
    "files": [
      {
        "download_url": "https://filehost.net/v/xxx",
        "thumbnail": "https://filehost.net/thumbs/xxx/grid4.webp",
        "thumbnails": {
          "single": "https://filehost.net/thumbs/xxx/single.webp",
          "grid2": "https://filehost.net/thumbs/xxx/grid2.webp",
          "grid3": "https://filehost.net/thumbs/xxx/grid3.webp",
          "grid4": "https://filehost.net/thumbs/xxx/grid4.webp"
        },
        "file_code": "xxx",
        "canplay": "1",
        "length": "1234",
        "views": "1",
        "uploaded": "2026-03-12 04:30:07",
        "public": "1",
        "fld_id": "0",
        "title": "test_file",
        "status": 200,
        "filecode": "xxx",
        "size": "123456",
        "last_view": "",
        "protected_embed": "https://filehost.net/e/xxx",
        "protected_dl": "https://filehost.net/v/xxx"
      }
    ],
    "results_total": "1",
    "results": 1
  }
}

File status

Check status of your file (status is Active, Working or Error)

GET https://filehost.net/api/file/check?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
file_code
File code (several codes can be separated by commas)
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": [
    {
      "status": "Active",
      "filecode": "xxx"
    }
  ]
}

File info

Get file info

GET https://filehost.net/api/file/info?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
file_code
File code (several codes can be separated by commas)
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": [
    {
      "download_url": "https://filehost.net/v/xxx",
      "thumbnail": "https://filehost.net/thumbs/xxx/grid4.webp",
      "thumbnails": {
        "single": "https://filehost.net/thumbs/xxx/single.webp",
        "grid2": "https://filehost.net/thumbs/xxx/grid2.webp",
        "grid3": "https://filehost.net/thumbs/xxx/grid3.webp",
        "grid4": "https://filehost.net/thumbs/xxx/grid4.webp"
      },
      "file_code": "xxx",
      "canplay": "1",
      "length": "1234",
      "views": "1",
      "uploaded": "2026-03-12 04:30:07",
      "public": "1",
      "fld_id": "0",
      "title": "test_file",
      "status": 200,
      "filecode": "xxx",
      "size": "123456",
      "last_view": "",
      "protected_embed": "https://filehost.net/e/xxx",
      "protected_dl": "https://filehost.net/v/xxx"
    }
  ]
}

File image

Get the file thumbnail and all its versions

GET https://filehost.net/api/file/image?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
file_code
File code (several codes can be separated by commas)
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": [
    {
      "status": 200,
      "filecode": "xxx",
      "title": "test_file",
      "thumbnail": "https://filehost.net/thumbs/xxx/grid4.webp",
      "thumbnails": {
        "single": "https://filehost.net/thumbs/xxx/single.webp",
        "grid2": "https://filehost.net/thumbs/xxx/grid2.webp",
        "grid3": "https://filehost.net/thumbs/xxx/grid3.webp",
        "grid4": "https://filehost.net/thumbs/xxx/grid4.webp"
      }
    }
  ]
}

File rename

Rename your file

GET https://filehost.net/api/file/rename?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
file_code
File code
Yes
title
New file name (alias name)
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": "true"
}

File move

Move your file from one folder to another (also available as /api/file/set_folder)

GET https://filehost.net/api/file/move?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
file_code
File code
Yes
fld_id
Folder ID to move the file (set 0 to / directory)
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": "true"
}

Delete file

Delete your file

Codes that are not found are left out of the result; the answer is 404 only when none is found.

GET https://filehost.net/api/file/delete?key={your_api_key}&file_code=xxx
Parameter
Description
Required
key
Your API Key
Yes
file_code
File code (several codes can be separated by commas)
Yes
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": [
    {
      "filecode": "xxx",
      "status": "deleted"
    }
  ]
}

Search your files (the result has the same shape as List files)

GET https://filehost.net/api/search/videos?key={your_api_key}
Parameter
Description
Required
key
Your API Key
Yes
search_term
Search term
Yes
page
Pagination
No
per_page
Max videos per page (default 50, max 200)
No
fld_id
Only search inside a folder (0 = top level)
No
Response
{
  "msg": "OK",
  "server_time": "2026-03-12 04:30:07",
  "status": 200,
  "result": {
    "total_pages": 1,
    "files": [
      {
        "download_url": "https://filehost.net/v/xxx",
        "thumbnail": "https://filehost.net/thumbs/xxx/grid4.webp",
        "thumbnails": {
          "single": "https://filehost.net/thumbs/xxx/single.webp",
          "grid2": "https://filehost.net/thumbs/xxx/grid2.webp",
          "grid3": "https://filehost.net/thumbs/xxx/grid3.webp",
          "grid4": "https://filehost.net/thumbs/xxx/grid4.webp"
        },
        "file_code": "xxx",
        "canplay": "1",
        "length": "1234",
        "views": "1",
        "uploaded": "2026-03-12 04:30:07",
        "public": "1",
        "fld_id": "0",
        "title": "test_file",
        "status": 200,
        "filecode": "xxx",
        "size": "123456",
        "last_view": "",
        "protected_embed": "https://filehost.net/e/xxx",
        "protected_dl": "https://filehost.net/v/xxx"
      }
    ],
    "results_total": "1",
    "results": 1
  }
}

Extras

Remote splash image

Load splash image via URL directly

URL https://filehost.net/e/xxx?c_poster=https://example.com/image.jpg
Parameter
Description
Required
c_poster
Splash image
Yes

Remote subtitle

Load multiple subtitles via URL directly

URL https://filehost.net/e/xxx?c1_file=https://example.com/sub.vtt&c1_label=English
Parameter
Description
Required
c1_file
Subtitle URL (srt or vtt)
Yes
c1_label
Subtitle language or any lable
Yes

Remote subtitle JSON

Load multiple subtitles via URL in JSON format

URL https://filehost.net/e/xxx?subtitle_json=https://example.com/sub.json
Parameter
Description
Required
subtitle_json
Multiple subtitle in JSON format
Yes
Remote subtitle JSON example
[
 {"src":"https://example.com/name_en.vtt", "label":"English", "default": true},
 {"src":"https://example.com/name_fr.vtt", "label":"French"}
]

Official clients

Official PHP client

Coming soon.

Official Python client

Coming soon.

Contact

For API access and integration support, contact support@filehost.net.