For your AI
Agents × jobs · Vercel AI SDK

Run US TikTok accounts from abroad with Vercel AI SDK

Operate US TikTok accounts from anywhere with Vercel AI SDK: TokPortal creates and posts on accounts held by US-based managers — no VPN, no US SIM, no p…

Markdown

From Vercel AI SDK, a US TikTok presence is one field away: create_bundle with country: "US" routes the order to a manager physically in the United States, who creates the account on a US device and network, warms it and posts every video you configure. You never touch a VPN, a US phone number or the account itself — you send configure_bundle_video calls from wherever you are and read results with list_accounts and analytics tools. This is the practical answer to "how do I post to US TikTok from Europe/Asia/LATAM" that the official API cannot give, because it only posts on accounts a user already owns and controls.

Connect TokPortal to Vercel AI SDK

Vercel AI SDK is an agent framework (code): TypeScript toolkit for AI apps; the MCP client (@ai-sdk/mcp, formerly experimental_createMCPClient in ai) turns TokPortal tools into generateText/streamText tools.

npm i ai @ai-sdk/mcp @modelcontextprotocol/sdk @ai-sdk/anthropic
import { generateText } from 'ai';
import { anthropic } from '@ai-sdk/anthropic';
import { createMCPClient } from '@ai-sdk/mcp';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';

const mcpClient = await createMCPClient({
  transport: new StreamableHTTPClientTransport(
    new URL('https://app.tokportal.com/api/ext/mcp'),
    { requestInit: { headers: { 'X-API-Key': process.env.TOKPORTAL_API_KEY! } } },
  ),
});

try {
  const tools = await mcpClient.tools();
  const { text } = await generateText({
    model: anthropic('claude-sonnet-4-5'),
    tools,
    prompt: 'List my published TokPortal bundles and their video counts.',
  });
  console.log(text);
} finally {
  await mcpClient.close();
}

On AI SDK 5 the import is import { experimental_createMCPClient as createMCPClient } from 'ai'; the rest is identical.

Snippet status: verified against Vercel AI SDK'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

Region on TikTok is decided at account creation and reinforced by where the app is used afterwards; an account created abroad and driven through a VPN is the classic recipe for reduced reach and shadow restrictions. TokPortal removes the problem at the source. The country you pass is not a targeting flag on the post — it selects the human manager, their SIM, their residential IP and their device. The account is US-native for its whole life because the person operating it is in the US.

The flow from Vercel AI SDK is the standard bundle flow: list_countries to confirm US is open, create_bundle (platform: tiktok, country: US, videos_quantity), configure_bundle_account with a handle and bio written for a US audience, then videos with configure_bundle_video or batch_configure_bundle_videos, publish_bundle, and later list_accounts filtered on country=US. Add Advanced Warming terms in US English (generate_warming_terms writes them from a niche description) so the manager's warming sessions teach the algorithm the account is a US viewer of that niche before you post.

Two things are worth telling the agent explicitly. First, TokPortal does not promise reach — it promises a real US account operated by a US manager; the content still has to be good. Second, if the client wants to eventually own the account, reveal_account_credentials is possible but breaks the "operated from the US" property the moment the client logs in from abroad; the recommended pattern is to keep the account managed and use videos_only bundles for every new batch of posts.

Run it from Vercel AI SDK

With Vercel AI SDK the sequence is driven by your code: give the agent the tools from the TokPortal MCP server and the prompt below as the user message (or split it into tasks). Log every tokportal_* call and its arguments in development — the tool list is large (91 tools), so consider filtering to the ones this job needs.

Tool sequence

  1. tokportal_list_countries — Confirm US is in the new-account list (and in videos_only_countries for reuse).
  2. tokportal_get_credit_costs — Quote setup + slots + warming before creating.
  3. tokportal_create_bundleplatform: tiktok, country: US, bundle_type: account_and_videos, videos_quantity, optional wants_advanced_warming.
  4. tokportal_generate_warming_terms — Turn a niche description into US-English search terms (count multiple of 3).
  5. tokportal_configure_bundle_account — US-flavoured username, visible_name, biography, link_in_bio.
  6. tokportal_configure_bundle_video — One call per slot: description, target_publish_date, video_url (max 3/day).
  7. tokportal_publish_bundle — Order goes to a US manager.
  8. tokportal_list_accountsplatform=tiktok&country=US to retrieve profile_url and status.
  9. tokportal_get_account_analytics — Views, followers and per-video numbers of the delivered US account.

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. I am based outside the US and want a US TikTok account for a home-fitness brand.
Check list_countries for US, generate 6 US-English warming terms with generate_warming_terms
(platform tiktok, text: "home workouts for busy parents"), then create the bundle
(account_and_videos, country US, 15 videos, advanced warming with those terms),
simulate configuring @liftwithmara and report credits_would_charge from creation.

Use maxSteps/stopWhen so the model can chain several tokportal_* calls in one generateText run.

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":"tiktok","country":"US","videos_quantity":15,
       "wants_advanced_warming":true,
       "advanced_warming_terms":["home workout no equipment","protein snacks","gym tok"]}'

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":"liftwithmara","visible_name":"Mara | Home Gym","biography":"30-min workouts, zero excuses"}'

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","description":"Day 1: the only 3 moves you need #homeworkout","target_publish_date":"2026-09-02","video_url":"https://.../day1.mp4"}'

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

ParameterValuesNotes
countryUSSelects a US-based manager, device and network; not a post-level flag.
platformtiktokSame flow works for instagram.
videos_quantity0–5003 per day max per bundle; 15 videos ≈ 5 posting days.
advanced_warming_terms3–30 US-English terms5 credits each; recorded and verified per term.
biography≤80 charsWrite for a US reader; managers do not rewrite copy.
link_in_bioURIOptional; use a US-reachable landing page.

Full schemas: OpenAPI reference · openapi.json.

Example configurations

US account, 15 posts, warmed

{"bundle_type":"account_and_videos","platform":"tiktok","country":"US","videos_quantity":15,
 "wants_advanced_warming":true,"advanced_warming_terms_count":6}

More posts on the delivered US account

{"bundle_type":"videos_only","account_id":"ACCOUNT_UUID","videos_quantity":30,"title":"October US drop"}

Bulk US fleet for an agency

{"platforms":["tiktok"],"country":"US","accounts_count":20,"videos_per_account":10,"wants_advanced_warming":true,"advanced_warming_terms_count":3}

Credits

A warmed US account with 15 posts is 32 (setup) + 15 × 2 (slots) + 3 × 5 (warming targets) = 77 credits at standard rates; credits are charged on real bundle creation. A dry run charges 0 and returns credits_would_charge. Verify with get_credit_costs — see Credits & Pricing.

Why not the official API

The official Content Posting API cannot make an account American: it posts to whatever account the user authorized, from wherever that account lives, and only after your app is audited (unaudited apps post privately) and the user grants video.publish per account. Geo is a property of the account and its operator, which is what TokPortal's country field controls by putting a US human behind the 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

Do I need a VPN or a US phone number?

No. The manager supplies the US device, SIM and network. Your API calls come from anywhere; only the account itself is US-based.

Will the account be shadow-banned because I am abroad?

Your location never touches the account — you send instructions to TokPortal, the manager acts in the US. Region signals come from the operator, not from the API caller.

Can I log in from my country later?

You can reveal credentials (428 policy preview + acknowledgment), but a login from abroad changes the account's signals and ends TokPortal management. Keep it managed and post via videos_only bundles instead.

Which other countries work the same way?

list_countries returns the live list (UK, France, Germany, Spain, Brazil, Mexico, UAE and more open regularly). The mechanism — local manager, local device — is identical.

Also works with

All 25 agents for "Run US TikTok accounts from abroad"

Other jobs with Vercel AI SDK