Ask Grok
Automatically ask Grok on grok.com. Open a new Grok conversation, send one question, wait until Grok has finished answering, and return the conversation id, the answer as Grok wrote it (Markdown), and the web sources the answer cites (empty when it cites none). A signed-out browser fails with a signed-out error asking to sign in to grok.com. If Grok does not finish an answer (for example when the account has reached its usage limit), the run fails with an error instead of returning part of an answer.
Input
question requiredThe question to ask Grok
Output
answer requiredThe assistant's answer text
sources requiredInline-cited web sources referenced in the answer, if any (empty when Grok answered without citing sources)
conversationId requiredThe Grok conversation id, from the resulting /c/<id> URL
FAQ
ngrok login (Google SSO)
Sign in to ngrok with a Google account and return the signed-in ngrok account. Returns at once when already signed in. Needs the paired browser, which holds the Google session. Pass email to pick an account; it fails by name when that account is not signed in to Google, when Google asks for a password, 2FA or passkey check (clear it once by hand, then re-run), or when the Google account has no ngrok account.
List Grok Chats
List recent Grok conversations (newest first): id, title, and a human-readable last-activity label as Grok itself displays it. A signed-out browser fails with a signed-out error asking to sign in at grok.com.
Grok whoami
Report which Grok account this browser is signed in as: the account email and name. When the browser is signed out of Grok, the run fails with a signed-out error asking you to sign in to grok.com.
