> For the complete documentation index, see [llms.txt](https://monkey-gun.gitbook.io/monkeygun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://monkey-gun.gitbook.io/monkeygun/guides/publishing.md).

# Publishing

Send a rendered video to a hosted page, a download link, your Buffer channels or YouTube.

```bash
curl -X POST https://api.monkeygun.com/v1/videos/vid-391/publish \
  -H "Authorization: Bearer $MK_KEY" -H "Content-Type: application/json" \
  -d '{ "destination": "share-link" }'
```

The video must be `rendered`. `POST /v1/tools/publish` takes the same body with `videoId` in it.

## Destinations

| `destination`          | What happens                                                                                                       | Setup                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- |
| `share-link` (default) | Returns a hosted page, `https://monkeygun.com/w/{id}?k=…`, with Open Graph tags for X, iMessage, Slack and Discord | None                                                     |
| `download`             | Returns a keyed MP4 link you can download or re-host                                                               | None                                                     |
| `buffer`               | Posts to your Buffer channels: X, Instagram, TikTok, YouTube, LinkedIn and anything else Buffer connects           | Paste a Buffer access token in **Settings → Publishing** |
| `youtube`              | Uploads straight to your YouTube channel                                                                           | **Settings → Publishing → Connect YouTube**              |

## Buffer

```bash
curl -X POST https://api.monkeygun.com/v1/videos/vid-391/publish \
  -H "Authorization: Bearer $MK_KEY" -H "Content-Type: application/json" \
  -d '{
    "destination": "buffer",
    "autopost": true,
    "caption": "$AI traded $1.2M in its first 24 hours.\nyourexchange.com/ai",
    "captions": {
      "instagram": "$AI traded $1.2M in its first 24 hours. Trade it: link in bio.",
      "tiktok": "$AI, first 24 hours on yourexchange"
    },
    "instagramStory": true
  }'
```

```json
{ "ok": true, "destination": "buffer", "bufferPostId": "66f1…,66f1…,66f1…", "storyPostIds": ["66f1…"], "draft": false,
  "url": "https://api.monkeygun.com/api/media/videos/vid-391/vid-391.mp4?k=cb66…" }
```

| Field            | What it does                                                                                                                                                       |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `autopost`       | `true` posts now. Leave it out to save a draft in Buffer, so someone approves it there                                                                             |
| `caption`        | Post text for every channel. Without it, the post uses the video's call to action or title                                                                         |
| `captions`       | Post text per Buffer service, keyed by Buffer's service name: `instagram`, `tiktok`, `twitter`, `youtube`, `linkedin`, … A service without an entry uses `caption` |
| `channelIds`     | Buffer channel ids to post to. Default: the show's picks, else the channels selected in Settings → Publishing                                                      |
| `instagramStory` | With `autopost: true`, also posts the video as a Story on each Instagram channel after the Reel. Story ids come back in `storyPostIds`                             |

Every Instagram post goes out as a Reel, also shared to the feed. Instagram captions do not make links clickable, so write "link in bio" there and keep the full link for X and LinkedIn.

One channel failing does not stop the others. Failures come back in `failed`, for example `["instagram: …"]`, and `ok` is `false` only when no channel took the post.

`caption` on a designed video is written for this: see [Voices, languages and captions](/monkeygun/guides/voices-languages-captions.md#captions).

## YouTube

```bash
curl -X POST https://api.monkeygun.com/v1/videos/vid-391/publish \
  -H "Authorization: Bearer $MK_KEY" -H "Content-Type: application/json" \
  -d '{ "destination": "youtube", "privacy": "public", "caption": "$AI: the first 24 hours" }'
```

The title is `captions.youtube`, else `caption`, else the video title, cut to 100 characters. The description is the video's call to action and source link. `privacy` is `public`, `unlisted` or `private`; it defaults to `unlisted`, or `public` with `autopost: true`. The response has the YouTube `url`.

## Scheduled shows

Shows that post themselves use the same channels. See [Scheduled shows](/monkeygun/guides/scheduled-shows.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://monkey-gun.gitbook.io/monkeygun/guides/publishing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
