Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dohoo.ai/llms.txt

Use this file to discover all available pages before exploring further.

The Dohoo Files API lets you upload images and videos to Dohoo-managed storage, check their processing status, retrieve them, and delete them when they’re no longer needed. Dohoo uses a two-step presigned URL upload flow: you first request a signed S3 URL from Dohoo, then PUT your file bytes directly to S3. This keeps large uploads fast and avoids routing binary data through Dohoo’s servers.
Every request to the Dohoo API (except the S3 PUT in step 2) must include your API key in the X-API-Key header.
X-API-Key: dh_live_xxxxxxxxxxxxxxxxxxxxxxxx

Step 1 — Get a presigned upload URL


POST /api/upload/presigned-url Request a short-lived presigned URL from Dohoo. Provide the filename and MIME type of the file you want to upload. Dohoo returns a signed S3 URL along with a fileId you’ll use to track and reference the file later. Request body
filename
string
required
The original filename including its extension (e.g. my-video.mp4).
contentType
string
required
The MIME type of the file (e.g. video/mp4, image/jpeg).
curl -X POST https://dohoo.ai/api/upload/presigned-url \
  -H "X-API-Key: dh_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"filename": "my-video.mp4", "contentType": "video/mp4"}'
Response
{
  "fileId": "abc123",
  "uploadUrl": "https://s3.amazonaws.com/..."
}
Save both values. You’ll PUT to uploadUrl in step 2, and reference fileId in all subsequent API calls.

Step 2 — Upload the file to S3


PUT {uploadUrl} PUT the raw file bytes directly to the presigned S3 URL you received in step 1. You do not need to include your X-API-Key header for this request — the URL is already cryptographically signed and authorises the upload on its own. Set the Content-Type header to match the MIME type you specified when requesting the URL.
curl -X PUT "{uploadUrl}" \
  -H "Content-Type: video/mp4" \
  --data-binary @my-video.mp4
A 200 OK from S3 means the upload succeeded. Proceed to check processing status if your file requires transcoding before publishing.

Check upload status


GET /api/upload/status/:id Returns the current processing status of an uploaded file. Poll this endpoint after uploading a video to confirm it has finished transcoding before you attempt to publish it.
id
string
required
The fileId returned in step 1.
curl https://dohoo.ai/api/upload/status/abc123 \
  -H "X-API-Key: dh_live_xxxx"
Poll GET /api/upload/status/:id at a short interval (e.g. every 5 seconds) until the status indicates the file is ready before calling a publish endpoint. This prevents publish failures caused by files that are still processing.

List all files


GET /api/upload/files Returns a list of all files you have uploaded to Dohoo.
curl https://dohoo.ai/api/upload/files \
  -H "X-API-Key: dh_live_xxxx"

Get the latest uploaded file


GET /api/upload/latest Returns metadata for the most recently uploaded file in your account. Useful for quickly referencing the last file you uploaded without having to list all files.
curl https://dohoo.ai/api/upload/latest \
  -H "X-API-Key: dh_live_xxxx"

Download a file


GET /api/upload/direct/{fileId} Returns the file itself as a binary response. Use this endpoint when you need to retrieve the original file contents, for example to serve it from your own infrastructure or archive it locally.
fileId
string
required
The unique identifier of the file to download.
curl https://dohoo.ai/api/upload/direct/abc123 \
  -H "X-API-Key: dh_live_xxxx" \
  --output my-video.mp4

Delete a file


DELETE /api/upload/file/{fileId} Permanently deletes a file from Dohoo storage.
fileId
string
required
The unique identifier of the file to delete.
curl -X DELETE https://dohoo.ai/api/upload/file/abc123 \
  -H "X-API-Key: dh_live_xxxx"
Deleted files cannot be recovered. Make sure you no longer need the file — or have a copy elsewhere — before calling this endpoint.