twitter_grok_chat
Ask X's Grok a question as your authenticated account and receive a structured reply with cited sources, summaries of tweet URLs, and support for multi-turn conversations.
Instructions
Ask X's own Grok a question AS your authenticated account, and get ONE complete JSON reply with the answer plus the sources it cited. Unlike a general LLM, Grok reads X in real time, so it can answer about what is being said right now, and passing a bare tweet or status URL as the message returns a structured summary of that post. Returns answer text, citations (url, title, snippet) merged and de-duplicated across every search Grok ran, the searches themselves, and the model that ACTUALLY answered (which can differ from the one you asked for). Buffered, not streamed. STATELESS: nothing is stored, so to continue a conversation pass the prior turns back in messages[] along with conversation_id. Requires an authenticated session for the acting account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ct0 | No | Optional. The account's ct0 cookie, paired with auth_token. Sent as the x-ct0 header. | |
| mode | No | Which Grok to use: 'auto' (default, balanced), 'fast' (quicker, less thorough) or 'expert' (slowest, most thorough). The response reports the model that actually answered, which can differ from the mode requested. | |
| message | No | The prompt, for a single-turn question. A bare tweet or status URL is a first-class input and comes back as a summary of that post. Provide either this or messages[]. | |
| messages | No | Prior turns for a multi-turn conversation, oldest first, each { role: 'user' | 'grok', content: '...' }. The endpoint stores nothing, so the full history you want Grok to see must travel in this array. Provide either this or message. | |
| proxy_url | No | Optional. Residential proxy URL to egress this call through. Recommended for writes: X soft-blocks writes from datacenter IPs as automated. Sent as the x-proxy-url header. | |
| auth_token | No | Optional. The account's auth_token cookie, to act AS that account for this call (must be paired with ct0). Sent as the x-auth-token header; never placed in the URL. | |
| user_agent | No | Optional. User-Agent string to send for this session. Sent as the x-user-agent header. | |
| image_count | No | How many images Grok may generate if the prompt calls for one. Defaults to the value X's own client sends. Set 0 for a text-only answer. | |
| conversation_id | No | Conversation id returned by a previous call. Omit on the first turn and one is created for you. |