Warm TikTok & Instagram accounts with Vercel AI SDK
Warm accounts on niche search terms from Vercel AI SDK: generate_warming_terms → configure_bundle_warming_terms / rewarm_account, verified sessions, war…
Warming from Vercel AI SDK means asking TokPortal's manager to spend real, recorded sessions on the account — open the profile, search a niche term, watch and engage with results, leave a comment — one session per term, verified by TokPortal before the manager is paid. The agent generates the terms with generate_warming_terms, attaches them at creation (wants_advanced_warming + advanced_warming_terms) or later (configure_bundle_warming_terms), and re-warms delivered accounts with rewarm_account; list_account_warming_sessions returns the proof. Nothing comparable exists in an official API, which has no notion of an account's behavioral history.
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. Every tool runs as your TokPortal account and spends your credits; read-only tools (get_*, list_*, export_*) never do.
How it works
Advanced Niche Warming is billed per target (search term), 5 credits each at the standard rate, bought 3 to 30 at a time in multiples of 3 — never per day. Each target becomes a screen-recorded session: the manager opens the account, searches the term, watches videos from the results, likes/saves and comments. TokPortal verifies every recording (an AI pass plus checks) before paying the manager, and exposes the outcome as a warming session with per-term status, so your agent can read the report rather than trust a promise. Webhooks warming.session_started, warming.term_verified and warming.session_completed fire along the way.
From Vercel AI SDK there are three entry points. At creation: create_bundle with wants_advanced_warming: true and either the terms (advanced_warming_terms) or just a count (advanced_warming_terms_count) to be filled later. Later on a bundle: configure_bundle_warming_terms sets exactly the purchased number of terms once (one-shot) and, if the manager already holds the order, warming starts immediately. On a delivered account: rewarm_account with 3–30 search_terms starts a fresh cycle — useful before a campaign or after a pause. generate_warming_terms (text, platform, count) writes terms in the same language as the description, which is what you want for a Spanish account in Mexico or an English one in the US.
Good terms are what a real viewer of that niche would type: "air fryer recipes", "gym tok", "skincare routine oily skin" — not brand names, not hashtags. Warming does not guarantee reach; it gives the account a coherent behavioral profile before you post, and a verifiable record you can show a client.
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
tokportal_get_credit_costs— Live per-target price and any allowance.tokportal_generate_warming_terms—text(niche description),platform,count(multiple of 3) → suggested terms.tokportal_create_bundle—wants_advanced_warming: truewithadvanced_warming_termsoradvanced_warming_terms_count.tokportal_configure_bundle_warming_terms— Set the terms later on a count-only purchase (exactly the purchased number, one-shot).tokportal_rewarm_account— New warming cycle on a delivered account:search_terms(3–30).tokportal_list_account_warming_sessions— Sessions per account with per-term verification status.tokportal_get_warming_session— Detail of one session (terms, verification, timestamps).tokportal_create_webhook_endpoint—warming.session_started,warming.term_verified,warming.session_completed.
Prompt to paste
Use the TokPortal MCP tools. For account ACCOUNT_ID (TikTok), call generate_warming_terms with
text "budget K-beauty and skincare for oily skin", platform tiktok, count 6. Show me the terms,
let me edit them, then call rewarm_account with the final list and report the credits charged
and the new session id from list_account_warming_sessions.
Use maxSteps/stopWhen so the model can chain several tokportal_* calls in one generateText run.
REST equivalent (same operations, X-API-Key header, base URL https://app.tokportal.com/api/ext)
# Generate 6 terms
curl -X POST https://app.tokportal.com/api/ext/warming/generate-terms \
-H "X-API-Key: sk_..." -H "Content-Type: application/json" \
-d '{"text":"skincare for oily skin, budget K-beauty","platform":"tiktok","count":6}'
# Re-warm a delivered account
curl -X POST https://app.tokportal.com/api/ext/accounts/ACCOUNT_ID/rewarm \
-H "X-API-Key: sk_..." -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{"search_terms":["oily skin routine","niacinamide serum","kbeauty haul","sunscreen for acne","double cleansing","drugstore skincare"]}'
# Read the proof
curl https://app.tokportal.com/api/ext/accounts/ACCOUNT_ID/warming-sessions -H "X-API-Key: sk_..."
Key parameters
| Parameter | Values | Notes |
|---|---|---|
wants_advanced_warming | boolean | Mandatory alongside the terms or the count — never inferred. Sending targets without it is refused with ADVANCED_WARMING_FLAG_REQUIRED, not charged and dropped. TikTok and Instagram only. |
advanced_warming_terms | 3–30 strings, 2–50 chars, count multiple of 3 | Or advanced_warming_terms_count to configure later — one or the other, and a count that disagrees with the list fails with ADVANCED_WARMING_COUNT_MISMATCH. Send distinct terms: anything dropped as a duplicate or for its length fails the call with ADVANCED_WARMING_TERMS_REJECTED rather than shrinking what you buy. |
advanced_warming_terms_count | 3–30, multiple of 3 | Unconfigured purchases auto-cancel and refund after 14 days. |
search_terms (rewarm_account) | 3–30, multiple of 3 | One recorded, verified session per term. |
generate_warming_terms.text | ≤1000 chars | Terms come back in the same language. |
Full schemas: OpenAPI reference · openapi.json.
Example configurations
Warmed Instagram account
{"bundle_type":"account_only","platform":"instagram","country":"FR","wants_advanced_warming":true,
"advanced_warming_terms":["recette healthy","batch cooking","déjeuner rapide"]}
Count now, terms later
{"bundle_type":"account_and_videos","platform":"tiktok","country":"US","videos_quantity":9,
"wants_advanced_warming":true,"advanced_warming_terms_count":9}
Rewarm before a campaign
{"search_terms":["running shoes review","marathon training","couch to 5k"]}
Credits
5 credits per target at the standard rate, minimum 3 targets (15 credits), maximum 30 per purchase; billed per target, never per day. Contract allowances may lower it — read get_credit_costs. See Credits & Pricing and Advanced Niche Warming.
Why not the official API
Official platform APIs expose no way to build an account's viewing history: there is no endpoint to search, watch or engage as the account. Warming only exists because a human holds the device. TokPortal makes that human step orderable, priced per term and verifiable through recorded sessions.
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
How do I know warming actually happened?
Every term produces a screen recording that TokPortal verifies before paying the manager; list_account_warming_sessions / get_warming_session expose the per-term status, and warming.term_verified fires as each one is checked.
How many terms should I buy?
6–9 for a focused niche is typical; use generate_warming_terms and remove anything a real viewer would not type. More terms means more sessions, not longer ones.
Can I warm an account that TokPortal did not create?
No — warming needs the manager to hold the account. Order a new managed account or use videos_only bundles on delivered ones.
What happened to deep warming?
wants_deep_warming is discontinued; new orders are rejected with DEEP_WARMING_DEPRECATED. Use wants_advanced_warming.
Related
Also works with
- Warm TikTok & Instagram accounts with Hermes Agent
- Warm TikTok & Instagram accounts with Gemini CLI
- Warm TikTok & Instagram accounts with Goose
- Warm TikTok & Instagram accounts with Perplexity
- Warm TikTok & Instagram accounts with Microsoft Copilot Studio
- Warm TikTok & Instagram accounts with Factory Droid
All 25 agents for "Warm TikTok & Instagram accounts"
Other jobs with Vercel AI SDK
- Create TikTok accounts with Vercel AI SDK
- Post 100 TikTok videos a day with Vercel AI SDK
- Run US TikTok accounts from abroad with Vercel AI SDK
- Run a faceless TikTok channel with Vercel AI SDK
- Seed UGC across many accounts with Vercel AI SDK
- Seed a music sound on TikTok with Vercel AI SDK
- Launch an app with persona accounts with Vercel AI SDK
- Run multi-client agency operations with Vercel AI SDK
- Get ban alerts via webhooks with Vercel AI SDK
- Pull analytics across all accounts with Vercel AI SDK
- Create Instagram accounts with Vercel AI SDK