I Built My Own Publishing API in One Night
Last night I filmed my cat Pierre in bed. He was doing his thing — crawling up on me, staring at me, eventually singing. I compressed the video, ran one command, and it appeared at the top of my live video feed automatically.
That command was this:
-H "X-Upload-Key: [secret]" \
-H "X-Filename: pierre.mp4" \
-H "Content-Type: video/mp4" \
--data-binary "@/path/to/pierre.mp4"
The response came back in seconds:
98 videos. Pierre at the top. Feed updated. Done.
What actually happened
Under the hood, one Cloudflare Worker handled everything: received the video bytes, stored them in R2 object storage, fetched the existing feed JSON, prepended the new video URL to the front of the list, wrote the updated JSON back to R2, and updated the KV store so the cron job knows which video is "new." No server. No database. No deployment pipeline. Just a Worker, a bucket, and a key-value store — all serverless, all on Cloudflare's edge network.
The total infrastructure cost for this is effectively zero at my current scale.
Why this feels significant
Before last night, adding a video to the feed required manually uploading to R2 via the AWS CLI, editing the feed JSON, re-uploading it, and purging the CDN cache. It worked but it wasn't something I'd do from my phone on a Tuesday morning before work.
Now the barrier is one curl command. Or eventually, no command at all — just "hey Claude, upload this video."
Having an API to your own site changes what's possible. It's the difference between a website and a platform.
This is the primitive the whole cubecast.app vision is built on. One authenticated POST request is all it takes to publish to the network. From here, the same pattern extends to multiple feeds, multiple platforms, eventually YouTube via the API I've applied for. One upload, everywhere at once.
The bigger picture
I started the 333-day signal experiment to force myself to build in public consistently. What I didn't expect is how quickly the infrastructure would start compounding. By night four, I have a live video feed, an automated cron rotation, a network of 8 connected domains, a signal score tracking the growth of the whole network, and now a publishing API I can hit from anywhere.
The chain is 4 days old. The foundation is already there.
Next: a single shell script that uploads a video, tweets it, and updates every endpoint at once. One command. Total distribution.
→ watch the cat feed (Pierre is at the top) → about the experiment ← all posts