Skip to main content

A Grok Bot Webhook guide covers Python dispatch and the 300-runs-per-hour limit

egachan.netegachan.net永上裕之(egachan.net)2026-11-19

Code and reposGetting startedTutorial or promotionRead first
egachan.netegachan.net永上裕之(egachan.net)2026-11-19

Open original

Overview

A Japanese blogger explains separate API and subscription billing, then shows how to dispatch work to Grok Bot from a script through a Webhook Routine.

Workflow

  1. Trigger: Three related names with separate billing. X API, Grok API and Grok Bot each have separate billing and a separate management screen. The author checked prices against the official pages on 2026-11-19.
  2. By hand: Add a Webhook trigger to a Routine. Ask the target bot to add a Webhook trigger to a Routine. The Routine screen shows the POST destination URL and key. On desktop, copy the POST address, key and request header from that page.
  3. By hand: POST from a script. Put the key in the Authorization header and JSON in the body. The author gives a Python example and reads the key from an environment variable instead of putting it in code. No official JSON field names are specified. Clearly state what the bot should do.
  4. Bot: Execute the request and return results to chat. When you POST JSON with the key in the Authorization header, the bot receives the body alongside the Routine instructions. A 200 means it was accepted. Results appear in the bot chat. To pass results out, tell the Routine to deliver them to an app such as Slack.
  5. Check: The source has no results from the author's own run. The tutorial says to use a 200 response to tell whether the request was accepted. For a non-200 response, check whether the Routine is paused and whether the key is current.

Key points and results

  • The subscription has no documented API allowance. The author suggests budgeting separately. There is also no officially documented way to call Grok Bot itself from outside as an MCP server or API. The official entry point for scripts to request work is a Routine Webhook.
  • Webhooks have rate limits. The limit is 300 runs an hour across all Routines and 200 an hour for one Routine. Above that, runs fail with 「Automation run rate limit exceeded」 and do not retry automatically.
  • Test also uses allowance. It does the same real work as a production run.
  • Routines have their own limits. Up to 50 Routines per bot, with the last 20 runs retained per Routine. The minimum scheduled interval is five minutes.

Source

Platform
Blog
Author
永上裕之(egachan.net)
Published
Categories
Code and repos, Getting started

What this evidence label means

Tutorial or promotion

This is a tutorial, or the content includes promotion. Examples in a tutorial are not a results report.

Read the editorial and evidence policy

Other cases in this scenario

This unofficial community project is independent of xAI. xAI has neither approved nor endorsed it. No sign-up. The methods and figures come from the original authors.