Log inStart Free Trial
easyCoexistence Official APIs

AI replies to TikTok comments

A business's own AI can reply to TikTok comments in public through TikTok's API for Business, which reports new comments by webhook within five minutes and posts replies through /business/comment/reply/create/. On easyCoexistence, an automation triggered by comment_received writes the reply with the business's own Anthropic, OpenAI or OpenRouter key and instructions, then posts it under the comment in up to 150 characters.

5 min

Time within which TikTok's comment.update webhook reports a new comment on an owned photo post or public video.

1,200

Characters TikTok's reply endpoint takes in a reply's text, counted in UTF-8.

150

Characters easyCoexistence's automations allow in a TikTok reply; longer AI or webhook text is cut at a word.

Similar text

TikTok can flag many largely similar comments posted in a short time as spam and hide them.

50 rules

Comment rules each TikTok account can hold on easyCoexistence; when several match, the oldest answers.

How does an AI reply reach a TikTok comment?

In public, under the comment, in a few steps that run with no chat open. TikTok reports the new comment to easyCoexistence, an automation on the account picks it up, the business's model writes the text, and the reply is posted as the TikTok account:

1CommentA viewer comments on a public video or photo post
2comment.updateTikTok reports it within five minutes
3Automationcomment_received, on any comment or a keyword
4AI replyYour model, your key, your instructions
5Public replyPosted under the comment, up to 150 characters

How do you set one up?

In the dashboard under Automations, or by asking Claude or ChatGPT, which call create_automation with the account_id from list_social_accounts as connection_id. The trigger is comment_received, on any comment or on keywords matched anywhere in it, at its start or exactly, for one video by its item_id or the whole account. The ai_reply step names the provider, the model's ID and a prompt about the business, and the provider key is saved in the dashboard, never in a chat. test_automation then runs it on a sample comment and posts nothing:

An AI reply automation through MCP
create_automation {
  "connection_id": "<ACCOUNT_ID>",
  "name": "Answer questions on TikTok",
  "trigger": { "type": "comment_received", "match": "keyword", "keywords": ["price", "ship"] },
  "steps": [
    {
      "type": "ai_reply",
      "provider": "anthropic",
      "model": "<MODEL_ID>",
      "prompt": "You answer for Acme Coffee. Orders ship in 2 days; the price list is at acme.example/prices."
    }
  ]
}

What does the AI see, and what does it write?

The comment's text and the business's prompt, with a note from easyCoexistence that the reply is posted publicly under a TikTok video in at most 150 characters. Each comment runs on its own, without earlier conversation, and a reply that still runs long is cut at a word, with an ellipsis. By default an automation sends up to 10 AI replies an hour to the same person, a cap set from 1 to 60, and the model's output stops at 600 tokens unless the step sets another limit.

How long can a reply be?

Shorter on easyCoexistence's automatic routes than TikTok's API allows. The reply endpoint documents up to 1,200 characters, while automations keep TikTok replies to 150 and comment rules to 500, and a reply sent with reply_to_comment goes out as written. Route by route:

TikTok's reply endpointUp to 1,200 characters of text, counted in UTF-8, or an image
Automation, fixed replyUp to 150 characters; a longer one cannot be saved
Automation, AI or webhook replyCut at a word to 150 characters, with an ellipsis
Comment ruleIts public_reply, kept to the first 500 characters
reply_to_commentYour text as written, within TikTok's own limit

How do keyword rules and AI replies work together?

Rules reply first. A comment rule, created with create_comment_rule, posts a fixed public reply when a new comment contains one of its keywords, whatever the case, or replies to any new comment when it has none; an account holds up to 50, and the oldest matching rule replies. A comment a rule replied to goes no further. Otherwise one automation replies to it: one set on that video before one for every video, then keyword automations before catch-all ones, and the oldest first. Both reply to new top-level comments, not to replies, and skip the account's own.

How does your own agent answer instead?

Through a call_webhook step, or through MCP. A call_webhook step POSTs the comment to your system, signed in X-EC-Signature with the automation's secret, and when your system answers with a reply field, easyCoexistence posts that text under the comment, cut to 150 characters. Claude, ChatGPT or another MCP client can also read comments with list_social_comments and reply with reply_to_comment when you ask, within a chat, since MCP works by request and response.

What a call_webhook step sends, and the answer that becomes the reply
POST https://agent.example.com/tiktok
X-EC-Event: automation.step
X-EC-Signature: t=<unix>,v1=<hex>

{
  "event": "automation.step",
  "dry_run": false,
  "automation": { "id": "<AUTOMATION_ID>", "name": "Answer questions on TikTok" },
  "run_id": "<RUN_ID>",
  "channel": { "type": "tiktok", "channel_id": "<ACCOUNT_ID>", "username": "<USERNAME>", "external_id": "<OPEN_ID>" },
  "contact": { "id": "<COMMENTER_ID>", "name": "<NAME>" },
  "comment": { "id": "<COMMENT_ID>", "post_id": "<ITEM_ID>", "text": "Do you ship to Canada?", "at": "<ISO_TIME>" },
  "history": []
}

// Your system's answer
{ "reply": "Yes, we ship to Canada in 5 to 7 days." }

What does TikTok watch for in automated replies?

Repetition. TikTok's reply reference asks apps not to post a high volume of comments with largely similar content in a short time, since its system can flag them as spam and hide them, and a flagged reply never gets the set_to_public event. AI replies can vary their wording, where one fixed text repeated on a busy video cannot. Replies are public, so they should carry nothing meant for one person; TikTok keeps direct messages in its separate Business Messaging API.

What does easyCoexistence keep?

Only what an automation needs, for a limited time. With an automation on the account, a new comment's text, the commenter's name and the video ID are kept for 7 days to run it, and list_automation_runs shows each run's steps, output and errors for 30 days. Without an automation, no comment text is kept: rules reply as events arrive, and forwarding passes events on without a copy.

Common mistakes

  • Saving a fixed TikTok reply over 150 characters. easyCoexistence refuses it at save; only AI and webhook replies are cut to fit.
  • Pasting the AI provider's key into a chat. Keys are saved in the dashboard, and no MCP tool takes or returns one.
  • Expecting rules to reply to replies. Rules and automations act on new top-level comments and skip the account's own comments.
  • Answering a busy video with one fixed text. TikTok can hide largely similar comments posted close together as spam.
Doing this with EasyCoexistence

easyCoexistence replies to TikTok comments in public with the business's own AI: automations reply on their own with your Anthropic, OpenAI or OpenRouter key, comment rules post fixed replies, and Claude or ChatGPT reply when you ask, with each connection watched around the clock. US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.

easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.

Frequently asked questions

Can ChatGPT or Claude reply to TikTok comments automatically?

Within a chat, yes, with reply_to_comment through the easyCoexistence connector. Replies with no chat open come from an automation, which can run on an OpenAI or Anthropic key of your own.

Which AI models can write the replies?

A model from Anthropic, OpenAI or OpenRouter, named by its model ID and run on the business's own key, saved in the easyCoexistence dashboard.

Can an AI reply to TikTok comments by DM?

No. Through easyCoexistence, TikTok comments get public replies; direct messages belong to TikTok's separate Business Messaging API.

How do I test an AI reply before it goes live?

Run test_automation, or Try it in the dashboard, with a sample comment: the AI step really runs and shows its reply, and nothing is posted on TikTok.

Keep reading

Connect your first channel in two minutes.

No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.

  • 3 days free
  • Cancel any time
  • Official APIs only
  • Monitored 24/7

Verified on