Post and measure Trial Reels through the official API
Claude posts Trial Reels to my photo page. It cuts variants from my photo library and my own music catalog, publishes them as Trials so only non-followers see them, reads the results a day and three days later, and writes the brief for the next batch. I still post my own reels alongside. This guide is how it's wired, using Meta's official API, not a bot that logs in as you. Read the caveats in step 10 before you build anything: the API can't do several things the app can.
The loop:
your library (photos, clips, your own music)
→ Claude picks a format and builds N variants that change ONE thing
→ script uploads each variant and publishes it as a Trial Reel
→ script pulls insights at ~24h and ~72h
→ results go in a sheet (views, skip rate, avg watch, shares, saves)
→ Claude ranks what worked and writes the next batch
Trial Reels are shown to non-followers first, so you can test hooks, fonts, lengths and openings without flooding your followers. You decide in the app which ones to share with everyone.
What you need: an Instagram professional account, a Facebook Page and Meta business portfolio, a Meta developer app, somewhere to host video files for a few minutes, and an AI assistant that can run scripts (Claude Code works well). n8n is optional if you want it scheduled without a computer session.
If you run more than one brand, give each its own business portfolio and its own app. Connecting one portfolio's app to another can move ownership of the app. Keep them separate from the start.
At developers.facebook.com, create an app with the use case for managing content on Instagram. There are two ways in:
graph.instagram.com. Permissions: instagram_business_basic, instagram_business_content_publish, plus insights.graph.facebook.com. Permissions: instagram_basic, instagram_content_publish, instagram_manage_insights, pages_read_engagement. This is the path I use.In your business portfolio, create a system user, assign it the Instagram account, the Page and the app, then generate a token with the permissions above. System user tokens can be set to never expire, which is what you want for something that runs on a schedule. User tokens expire and your posts will silently stop.
Twice. First, "No permissions available" when generating the token meant the app hadn't been assigned to the system user as an asset yet. Second, my first token was missing the content publish permission, so the first post attempt failed. Check the permission list on the token before you write any code.
The API doesn't take a file from your computer for this flow. It takes a public URL and fetches the video itself.
Publishing is two calls: create a container, wait for Instagram to process the video, then publish it.
# 1. create the container
POST https://graph.facebook.com/{version}/{IG_USER_ID}/media
media_type=REELS
video_url=https://your-bucket/.../variant-a.mp4
caption=paris · fujifilm x-t5
share_to_feed=false
access_token=$IG_TOKEN
→ returns { "id": CONTAINER_ID }
# 2. poll until it's ready
GET /{CONTAINER_ID}?fields=status_code
→ wait for FINISHED (IN_PROGRESS while it processes)
# 3. publish
POST /{IG_USER_ID}/media_publish
creation_id=CONTAINER_ID
→ returns { "id": MEDIA_ID }
Have Claude write this as a small script with three commands (post, publish, unstage) and log every media ID to a file. You'll need the IDs for insights.
Add one parameter to the container call:
trial_params={"graduation_strategy":"MANUAL"}
MANUAL: you decide in the app whether to share it with followers.SS_PERFORMANCE: Instagram shares it with followers automatically if it performs well.I use MANUAL so nothing reaches my followers without me deciding.
For large files the API offers a resumable upload instead of a URL. I used it for my first Trial, and it ignored the trial parameter: the reel went out to every follower and I had to delete it. Meta documents trial_params on the video URL container. Use the URL flow for Trials.
The API has no field that tells you a post is a Trial. Open the post in the app (or have someone screenshot it) before you, or Claude, call it a Trial. I made that a rule after the mistake above.
The API can't attach Instagram's music library or trending sounds. Whatever audio is in the file is what posts. You have two options:
Don't bake in commercial songs you don't own. Instagram can mute or remove the reel, and it can count against the account.
Claude's first batches used flashy edits: Ken Burns zooms, flashes, fast cuts. They looked nothing like my account, and the fastest-cut ones had the worst skip rates. My best reels are slow: a few seconds of real footage of me first, then calm cuts on the beat, one clean line of text. Have Claude measure your own top reels first and match that look, then test one variable at a time inside it.
Space similar posts out. When I posted four near-identical Trials within two minutes, they competed with each other and split the reach. A few hours apart gives each a fair test.
Pull insights per media ID at about 24 hours and 72 hours:
GET /{MEDIA_ID}/insights?metric=views,reach,likes,comments,shares,saved,...
&access_token=$IG_TOKEN
Most of a Trial's views come in the first day. If it's flat at 24 hours it rarely recovers. Shares and saves tell you more than likes about whether to share it with followers.
content_publishing_limit endpoint. You should be nowhere near it.A text file that turns an AI assistant into your setup partner for this. Paste it into Claude, ChatGPT or another assistant, or drop it into a Claude Code project. It checks your account type, walks you through the Meta app and token one screen at a time, writes the posting and insights scripts, and runs a first test post as a Trial. It's written to keep your token out of the chat and to verify a post really is a Trial before calling it one.
Stuck on a Meta permission screen, or want this set up for your account? Send me a message.
You don't need any of this for the API side. It's what I use to shoot the hooks and selfie clips that the variants are built from. Each slot has a budget, a pick and an upgrade, with what each is best for. "I use this" marks gear I own. Links open on Amazon.
Disclosure: As an Amazon Associate I earn from qualifying purchases. Product links on this page are affiliate links. Items marked "I use this" are gear I own; the rest are options I researched. The price you pay is the same. Meta, Instagram, Claude and n8n are named because I use them, not because they pay me. Meta changes its API often; check the official docs before you build.