remote_code_execution
Execute Python code remotely in xAI's server-side sandbox, leveraging Grok to solve tasks securely without local execution.
Instructions
Solve a task by letting Grok write and run Python in xAI's server-side sandbox.
Renamed from code_executor — it invokes xAI's remote code_execution
tool; no code runs on this machine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| max_turns | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Structured payload for web_search / x_search / code_execution. | |
| text | No | Human-formatted output (includes footers, citations, cost summary). | |
| model | Yes | Actual executing model ID (e.g. 'grok-4.5'). | |
| plane | No | API | |
| route | Yes | High-level route (fast/agentic/research/etc.). | |
| tokens | No | Total tokens consumed. | |
| profile | No | Internal routing profile. | |
| cost_usd | No | Exact USD cost from xAI billing metadata. | |
| response | Yes | Raw model output or primary content. | |
| citations | No | Native xAI/X citations with URL + snippet. | |
| latency_sec | No | ||
| finish_reason | No | unknown | |
| reasoning_effort | No | Grok 4.5+ native reasoning level. |