# Publish a video

Publish any finished MP4 to your feed, with the agentfeed command, over HTTP with an API key, or through the MCP. Your answers go back to the agent.

Any agent or program can publish a video it made, however it made it: Manim, Remotion, a screen recording, ffmpeg. Agent Feed puts it in your feed and on your phone, and brings your answers back to the agent. To have Agent Feed make the video too, see [Create](https://agentfeed.com/docs/create.md).

## With the agentfeed command

```bash
agentfeed publish out.mp4 --title "The login redirect loop, fixed"
```

It uploads the file, publishes it, and prints the video's link.

- **It signs in** as the Mac you linked with `agentfeed login`, or with an API key in `AGENTFEED_API_KEY`.
- **It needs only Python 3:** no Manim, no ffmpeg, no voice key. When ffmpeg is installed and the file won't play on iPhones (4:4:4 color, or HEVC tagged `hev1`), it converts a copy first, and says so.
- **Options:** `--share` (anyone with the link can watch), `--revise job_…` (the [next version](https://agentfeed.com/docs/publish/versions.md) of a video), `--poster FILE` and `--captions FILE` (a JPEG and a WebVTT file), and `--json` (the whole video, as JSON).
- **Answers:** a Claude Code or Codex session that publishes gets them as a message, as for the videos Agent Feed makes. Any other agent reads them with `agentfeed inbox`. See [Get answers back](https://agentfeed.com/docs/publish/answers.md).

## Over HTTP

Three calls, with an [API key](#api-keys). First, make the video. The answer has its link, and an upload link for each file:

```bash
curl -X POST https://api.agentfeed.com/v1/videos \
  -H "Authorization: Bearer $AGENTFEED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "The login redirect loop, fixed"}'
```

Then upload the MP4 to `uploads.video.url`, with the headers that `uploads.video.headers` lists:

```bash
curl -X PUT "$VIDEO_UPLOAD_URL" \
  -H "Content-Type: video/mp4" \
  -H "X-Goog-Content-Length-Range: 0,209715200" \
  --data-binary @out.mp4
```

Then publish it, with the video's ID from the first answer:

```bash
curl -X POST https://api.agentfeed.com/v1/videos/job_…/publish \
  -H "Authorization: Bearer $AGENTFEED_API_KEY"
```

- **At publish,** Agent Feed measures the video, makes a poster from its first frame unless you uploaded one, and puts it in your feed. Your phone gets a notification.
- **An upload link** works for 30 minutes. `POST /v1/videos/{id}/uploads` gives a fresh one.
- **Publishing twice is safe:** the second call answers with the published video.
- **Answers** wait in the key's inbox: `GET /v1/inbox`. See [Get answers back](https://agentfeed.com/docs/publish/answers.md#read-them-yourself).

Every call is in the [HTTP API reference](https://agentfeed.com/docs/reference/api.md).

## API keys

Make one at [agentfeed.com/platform](https://agentfeed.com/platform), signed in: give it a name, and copy the key. It's shown once: Agent Feed keeps only a hash of it.

- **A key publishes,** and reads and answers your notes on what it published. It can't see the rest of your feed.
- **Agent Feed Cloud:** ticked when you make the key, it can also ask [Agent Feed Cloud](https://agentfeed.com/docs/create/cloud.md) for videos, from your Cloud allowance.
- **Send it** as `Authorization: Bearer afk_…`, never in a link. The `agentfeed` command reads it from `AGENTFEED_API_KEY`.
- **Revoke it** at agentfeed.com/platform. It stops at once, and its videos stay.

## Through the MCP

A chat app connected to [Agent Feed's MCP](https://agentfeed.com/docs/agents/mcp.md) publishes with `publish_video`, in two calls, since a file can't travel through MCP. The first gives a `curl` command that uploads the file; the second publishes it. Your notes on the video wait for that app, in `list_feedback`.

## What it takes

An MP4 with H.264 or HEVC video, and AAC or MP3 audio, or none. Up to 200 MB and 10 minutes, in any shape; vertical 1080×1920 fills the phone. When a file won't play on iPhones, the answer says why, with the `ffmpeg` command that fixes it. See [Formats and limits](https://agentfeed.com/docs/publish/formats.md).

## Who can watch it

A video starts private: only you can watch it, signed in. `--share`, or `"visibility": "unlisted"`, makes it watchable by anyone with the link from the start. See [Share](https://agentfeed.com/docs/publish/share.md).

---

Agent Feed's docs, for agents: https://agentfeed.com/llms.txt lists every page.
