POST/api/v1/uploads

Uploads

Send a file once and get a key to use in any job.

Jobs take their inputs as a file_key, never a URL. Upload each file here first and pass back the key you get. We never fetch a URL you give us, which keeps your product safe from someone pointing us at your internal network.

  • Images and audioUp to 45 MB
  • VideoUp to 500 MB
  • We never fetch your URLsYou upload; nothing is pulled in
curl -X POST https://api.kreatorsfactory.com/api/v1/uploads \  -H "Authorization: Bearer $KREATORSFACTORY_API_KEY" \  -F "file=@input.mp4"

How it works

Jobs take their inputs as a file_key, never a URL. Upload each file here first and pass back the key you get. We never fetch a URL you give us, which keeps your product safe from someone pointing us at your internal network.

Request parameters

Send multipart/form-data with one field.

FieldTypeRequiredDescription
filefileYesAn image, audio or video file. The type is read from the Content-Type, or from the file name when your client doesn't set one.

Limits

Images and audio up to 45 MB, video up to 500 MB. Over that you get input_too_large, and the upload is refused as it streams in rather than after the whole file has arrived.

Pass the key back exactly as you got it

A key that doesn’t start with api/ is rejected when you start the job, with invalid_input. So a malformed key fails at once instead of queueing a job that could only fail.

Response

Response200
{  "file_key": "api/videos/3f2a…/9f8c1d2e3a4b.mp4",  "url": "https://…"}

Money is in US dollars. Times are ISO 8601, in UTC.

Errors

Every error arrives as {"error": {"code", "message"}}. Branch on code; the message may change. All errors.

HTTPCodeWhat it means
401unauthorizedMissing, unknown or revoked key.
400unsupported_formatThat file type isn't accepted.
400input_too_largeOver the size limit for its type.
400invalid_inputA field failed validation, or a file_key doesn't start with api/.