Skip to content
BrainyShorts Docs
Esc
navigateopen⌘Jpreview

Complete a local run

In draft mode, send media and caption only. In auto mode, every TikTok and YouTube target needs a published_targets entry from a direct upload.

POST/api/agent/runs/{id}/complete-local
Authorization
AuthorizationBearer token (ba_run_...) · headerrequired

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

or
AuthorizationBearer token (ba_sk_...) · headerrequired

API key from /dashboard/api-keys. Keys expire after 365 days.

Path parameters
idstringrequired

Run id

Request body
requiredapplication/json
captionstringrequired
max length 2200
titlestring
media_typestring
Allowed:imagecarouselvideo
media_urlsstring<uri>[]
max items 10
slidesSlide[]
max items 10
Show properties
Array of Slide
textstring
max length 500
urlstring<uri>required
aspect_ratiostring
default: "9:16"
published_targetsobject[]
max items 12
Show properties
Array of object
social_account_idstring<uuid>
platformstring
Allowed:tiktokyoutube
direct_upload_idstring<uuid>
metadataobject
executor_idstring
Responses
200

OK

object
400

INVALID_RUN_OUTPUT

errorstringrequired
codestring
401

Missing, invalid, expired, or revoked API key

errorstringrequired
codestring
409

RUN_CONFLICT, AUTOMATION_PAUSED, REVISION_STALE, or AUTOMATION_REMOVED

errorstringrequired
codestring
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://www.brainyshorts.com/api/agent/runs/string/complete-local" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "caption": "string",
  "title": "string",
  "media_type": "image",
  "media_urls": [
    "http://example.com"
  ],
  "slides": [
    {
      "text": "string",
      "url": "http://example.com",
      "aspect_ratio": "9:16"
    }
  ],
  "published_targets": [
    {
      "social_account_id": "f4777757-36aa-48ee-b520-6e818e68eb51",
      "platform": "tiktok",
      "direct_upload_id": "28819bb3-02a6-40f2-80ee-1b080beb2151"
    }
  ],
  "metadata": {},
  "executor_id": "string"
}'
Response
{}