Skip to content
BrainyShorts Docs
Esc
navigateopen⌘Jpreview

Reserve a media upload for a run

Same contract as POST /api/cli/media/uploads, authenticated with the run token.

POST/api/agent/runs/{id}/media/uploads
Authorization
AuthorizationBearer token (ba_run_...) · headerrequired

Per-run token returned by start, valid for 6 hours and bound to one run.

Path parameters
idstringrequired

Run id

Request body
requiredapplication/json
asset_idstring<uuid>

Optional, for idempotent retries

content_typestringrequired
Allowed:image/jpegimage/pngimage/webpvideo/mp4
content_lengthintegerrequired

Images up to 15 MiB, MP4 up to 200 MiB

min 1
content_sha256stringrequired
matches ^[a-f0-9]{64}$
content_md5stringrequired
matches ^[a-f0-9]{32}$
Responses
201

Reserved

object
401

RUN_TOKEN_REQUIRED

errorstringrequired
codestring
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://www.brainyshorts.com/api/agent/runs/string/media/uploads" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "asset_id": "b4695157-0d1d-4da0-8f9e-5c53149389e4",
  "content_type": "image/jpeg",
  "content_length": 1,
  "content_sha256": "string",
  "content_md5": "string"
}'
Response
{}