API
Upload files programmatically
Send a file to the Biohost API and get a temporary link back. No account and no API key — just POST a file. Uploads are rate-limited per IP and expire automatically, like everything else on Biohost.
Endpoint
POST https://biohost.app/api/v1/uploadContent type: multipart/form-data
Parameters
| Parameter | Required | Description |
|---|---|---|
| file | Yes | File to upload, up to 500.0 MB. |
| expire | No | Days until deletion (1, 3, 5). Default is 1. |
Response
{
"status": "success",
"data": {
"url": "https://biohost.app/f/{id}"
}
}On failure the response is { "status": "error", "message": "…" } with an appropriate HTTP status (400, 413, 429, 503).
Examples
Upload a file:
curl -F "file=@/path/to/test.jpg" \
https://biohost.app/api/v1/uploadUpload with a custom expiry:
curl -F "file=@/path/to/test.jpg" \
-F "expire=3" \
https://biohost.app/api/v1/upload