Create Instagram accounts with OpenAI Codex
Create geo-targeted Instagram accounts from OpenAI Codex with TokPortal: create_bundle platform=instagram → configure_bundle_account → publish_bundle; R…
Creating Instagram accounts from OpenAI Codex is the same bundle flow as TikTok with platform: "instagram": create_bundle in the target country, configure_bundle_account (bio up to 120 characters here), publish_bundle, and a human manager creates and warms the account on a local device; content later goes in as Reels (instagram_content_type: "reel"), feed posts or carousels (carousel_images). Instagram's official Graph API only publishes to professional accounts you already own via OAuth and caps API publishing at 100 posts per 24 hours per account; it has no account-creation endpoint, which is the part TokPortal supplies.
Connect TokPortal to OpenAI Codex
OpenAI Codex is a terminal agent: OpenAI's coding agent (Codex CLI and IDE extension); MCP servers live in ~/.codex/config.toml.
Add the remote server to ~/.codex/config.toml:
[mcp_servers.tokportal]
url = "https://app.tokportal.com/api/ext/mcp"
# either OAuth (run `codex mcp login tokportal` once) …
# … or a static key from your environment:
# bearer_token_env_var = "TOKPORTAL_API_KEY"
Then codex mcp login tokportal for the OAuth flow. Recent Codex builds also accept the one-liner codex mcp add tokportal --url https://app.tokportal.com/api/ext/mcp; the stdio form always works:
codex mcp add tokportal --env TOKPORTAL_API_KEY=sk_... -- npx -y tokportal-mcp
Snippet status: verified against OpenAI Codex's documentation (source).
Once connected, sanity-check the setup with a read-only call: "What is my TokPortal credit balance?" should trigger tokportal_get_credit_balance. GET requests and dry-run writes do not spend credits.
Try the workflow without spending
For this trial, use the remote MCP endpoint https://app.tokportal.com/api/ext/mcp, local tokportal-mcp 1.15.1 or later, or the REST API. Upgrade and restart an older local server first. Version 1.15.0 does not forward the dry-run header; do not use its write tools for a simulation. If you cannot verify the installed local version, use the remote endpoint or REST.
Use the sandbox for the first attempt. MCP write tools accept dry_run: true as a top-level argument, beside body; REST writes accept the X-TokPortal-Dry-Run: true header. Keep your usual authentication and scopes. Each simulated write validates the request and returns credits_would_charge with credits_charged: 0. Nothing is created or published.
Simulated IDs start with 00000000-0000-4000-8000-. Use them only in later dry-run writes. GET requests read real data, so skip publish-readiness checks and polling for synthetic IDs. Simulations have no cross-call memory and upload URLs are placeholders: do not upload files to them.
To run for real, review the returned price and confirm before the first live write. Bundle creation charges credits immediately; publishing hands the order to a manager. Repeat creation without dry-run mode and use the new real IDs for configuration and publishing. A synthetic ID cannot be reused in a live request.
How it works
Instagram bundles differ from TikTok bundles in a few fields, and the agent should know them. biography accepts up to 120 characters (80 on TikTok). Video slots take instagram_content_type (reel for Reels, post for a feed video), instagram_location, up to 5 instagram_collaborators, instagram_audio_name for a named audio, and instagram_add_to_story: true to also share to Stories; carousels use video_type: "carousel" with 1–20 carousel_images (upload each with upload_image_from_url or upload_image_direct, purpose carousel) and an optional carousel_title; stories use video_type: "story" with story_image_url or video_url and an optional story_repost_url (1 credit) to repost an existing Instagram post.
The order of operations from OpenAI Codex: list_countries (Instagram availability is per country too), get_credit_costs, create_bundle (platform: instagram, country, bundle_type, videos_quantity, optional Advanced Warming — supported on Instagram with the same 3–30 terms), configure_bundle_account with username, visible_name, biography, profile_picture_url, link_in_bio, then slots with configure_bundle_video or batch_configure_bundle_videos at ≤3 per day, get_bundle_publish_readiness, publish_bundle. Delivered accounts show up in list_accounts?platform=instagram with profile_url. For a fleet, create_bundles_bulk with platforms: ["instagram"] (or both platforms at once for paired TikTok/Instagram personas).
Instagram accounts are also eligible for TokPortal Coverage (25 credits / 30 days after the first period), which is what backs refunds/remakes on bans — read get_account_managed_subscription per account if you plan to keep them long-term.
Run it from OpenAI Codex
Start a OpenAI Codex session in the project folder and paste the prompt below. Every tokportal_* call is shown before it runs; approve read-only tools freely and review write tools (create_*, configure_*, publish_*) before accepting.
Tool sequence
tokportal_list_countries— Countries open for Instagram account creation.tokportal_get_credit_costs— Setup, slot and warming prices.tokportal_create_bundle—platform: instagram,country,bundle_type,videos_quantity, warming terms.tokportal_upload_image_from_url— Profile picture (purpose: profile_picture) and carousel images.tokportal_configure_bundle_account—biography≤120,link_in_bio,profile_picture_url.tokportal_configure_bundle_video—instagram_content_type: reel|post,carousel_images,instagram_add_to_story,instagram_collaborators.tokportal_publish_bundle— Manager creates and warms the account.tokportal_list_accounts—platform=instagramto fetch delivered accounts.
Prompt to paste
Evaluate this workflow in the TokPortal sandbox only.
Use the remote MCP endpoint https://app.tokportal.com/api/ext/mcp or local tokportal-mcp 1.15.1 or later for write tools.
Verify the installed local version before using its write tools. Version 1.15.0 is unsafe for simulations.
If the local version is older or unknown, use the remote endpoint or authenticated REST
requests with X-TokPortal-Dry-Run: true instead.
For every non-GET MCP tool call, set dry_run: true as a top-level boolean beside body.
For every REST write in a workflow, send the X-TokPortal-Dry-Run: true header.
Use normal read tools for existing real objects. Do not GET or poll synthetic IDs,
and do not upload files to simulated upload URLs. Simulated objects have no cross-call memory.
Show credits_would_charge and verify credits_charged is 0 for each simulated write.
Do not execute any live write. Ask for my explicit GO before the first real write,
including bundle creation, which charges immediately. After GO, repeat creation
without dry_run and use the new real IDs; never reuse synthetic IDs in live requests.
Use the TokPortal MCP tools. Create an Instagram account in Germany (account_and_videos, 9 videos)
for a Berlin brunch guide: @berlin.brunch.club, bio in German ≤120 chars, link https://brunch.example.
Configure position 1 as a Reel and position 2 as a 3-image carousel (I will give URLs),
then simulate publish_bundle and report validation and credits_would_charge.
Run codex in your project, paste the prompt; Codex lists the tokportal_* calls it wants to make and asks for approval unless you run with full-auto.
REST equivalent (write requests below are simulations; GET requests read existing real data)
curl -X POST -H "X-TokPortal-Dry-Run: true" https://app.tokportal.com/api/ext/bundles \
-H "X-API-Key: sk_..." -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{"bundle_type":"account_and_videos","platform":"instagram","country":"DE","videos_quantity":9,"title":"IG DE #1"}'
curl -X PUT -H "X-TokPortal-Dry-Run: true" https://app.tokportal.com/api/ext/bundles/BUNDLE_ID/account \
-H "X-API-Key: sk_..." -H "Content-Type: application/json" \
-d '{"username":"berlin.brunch.club","visible_name":"Berlin Brunch Club","biography":"Die besten Brunch-Spots in Berlin ☕🥐 Jede Woche neu.","link_in_bio":"https://brunch.example"}'
# Reel
curl -X PUT -H "X-TokPortal-Dry-Run: true" https://app.tokportal.com/api/ext/bundles/BUNDLE_ID/videos/1 \
-H "X-API-Key: sk_..." -H "Content-Type: application/json" \
-d '{"video_type":"video","instagram_content_type":"reel","description":"Top 3 Brunch in Kreuzberg 🥞","target_publish_date":"2026-09-03","video_url":"https://.../kreuzberg.mp4","instagram_add_to_story":true}'
# Carousel
curl -X PUT -H "X-TokPortal-Dry-Run: true" https://app.tokportal.com/api/ext/bundles/BUNDLE_ID/videos/2 \
-H "X-API-Key: sk_..." -H "Content-Type: application/json" \
-d '{"video_type":"carousel","description":"5 Cafés für Remote Work","target_publish_date":"2026-09-04","carousel_images":["https://.../1.jpg","https://.../2.jpg","https://.../3.jpg"]}'
curl -X POST -H "X-TokPortal-Dry-Run: true" https://app.tokportal.com/api/ext/bundles/BUNDLE_ID/publish -H "X-API-Key: sk_..."
Key parameters
| Parameter | Values | Notes |
|---|---|---|
platform | Same bundle flow as TikTok. | |
biography | ≤120 chars | 80 on TikTok. |
instagram_content_type | reel · post | For video_type video. |
carousel_images | 1–20 URIs | video_type carousel; upload with upload_image_*. |
instagram_collaborators | ≤5 handles | Collab invites by the manager. |
instagram_add_to_story | boolean | Also share the post to Stories. |
story_repost_url | instagram.com URL | Story reposting an existing IG post; 1 credit. |
Full schemas: OpenAPI reference · openapi.json.
Example configurations
German Instagram account with warming
{"bundle_type":"account_and_videos","platform":"instagram","country":"DE","videos_quantity":9,
"wants_advanced_warming":true,"advanced_warming_terms":["brunch berlin","café kreuzberg","frühstück ideen"]}
Reel with collaborators
{"video_type":"video","instagram_content_type":"reel","description":"Sunday brunch tour 🥐","target_publish_date":"2026-09-06",
"video_url":"https://pub-xxx.r2.dev/videos/b/tour.mp4","instagram_collaborators":["cafe.partner"],"instagram_location":"Berlin, Germany"}
Bulk Instagram fleet
{"platforms":["instagram"],"country":"ES","accounts_count":10,"videos_per_account":6,"external_ref":"ig-es-wave1"}
Credits
Instagram account setup is 32 credits at the standard rate, video/carousel/story slots 2 credits, warming targets 5 each, story repost link 1 credit; TokPortal Coverage 25 credits / 30 days after the first period. Live rates via get_credit_costs — see Credits & Pricing.
Why not the official API
Meta's Instagram Platform (Content Publishing) documents a limit of 100 API-published posts per account within a 24-hour moving period, requires a professional account the user authorizes to your app, and offers no account creation at all (checked August 2026). TokPortal creates the accounts in the target country with a human manager and posts Reels, posts, carousels and stories on them without OAuth per account.
As of August 2026 the first-party routes look like this. TikTok's Content Posting API (Direct Post) requires each account owner to authorize your app with the video.publish scope, limits every user access token to 6 requests per minute, keeps all posts from unaudited apps in private viewing mode until TikTok audits the app, and enforces an unpublished daily post cap per user (spam_risk_too_many_posts) that integrators commonly report at roughly 15–25 posts per account per day. Meta's Instagram Content Publishing API allows 100 API-published posts per professional account in a 24-hour moving window and only for accounts you own and connect via OAuth. Neither creates accounts, warms them, or reports third-party bans. TokPortal is human-operated infrastructure: accounts created and run by managers in the target country, one X-API-Key for all of them, dated slots (max 3 per day per bundle) instead of per-account tokens.
Sources: TikTok Content Posting API – Direct Post, TikTok Content Posting API – Get started, Instagram Platform – Content Publishing.
FAQ
Can I create Instagram and TikTok accounts for the same brand together?
Yes — create_bundles_bulk with platforms: ["tiktok","instagram"], or two create_bundle calls; configure each account separately.
How do carousels work?
video_type: carousel with 1–20 carousel_images (public URLs or TokPortal storage URLs from upload_image_from_url / upload_image_direct), plus description and an optional carousel_title.
Does warming exist on Instagram?
Yes, Advanced Niche Warming works on TikTok and Instagram: 3–30 search terms, one recorded verified session per term.
What is the Instagram bio limit?
120 characters (biography); the API rejects longer values. TikTok is 80.
Related
Also works with
- Create Instagram accounts with Factory Droid
- Create Instagram accounts with n8n
- Create Instagram accounts with Make
- Create Instagram accounts with Zapier
- Create Instagram accounts with Pipedream
- Create Instagram accounts with Dify
All 25 agents for "Create Instagram accounts"
Other jobs with OpenAI Codex
- Create TikTok accounts with OpenAI Codex
- Post 100 TikTok videos a day with OpenAI Codex
- Run US TikTok accounts from abroad with OpenAI Codex
- Warm TikTok & Instagram accounts with OpenAI Codex
- Run a faceless TikTok channel with OpenAI Codex
- Seed UGC across many accounts with OpenAI Codex
- Seed a music sound on TikTok with OpenAI Codex
- Launch an app with persona accounts with OpenAI Codex
- Run multi-client agency operations with OpenAI Codex
- Get ban alerts via webhooks with OpenAI Codex
- Pull analytics across all accounts with OpenAI Codex