> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# interact_execute

> Execute Python, Node, or bash code in an interact session.

<div className="tool-route"><span className="tool-row-method" data-method="POST">POST</span><code>{"https://api.firecrawl.dev/v2/interact/{sessionId}/execute"}</code></div>

```python firecrawl_interact_execute.py theme={null}
from charter.packs import firecrawl

result = await firecrawl.interact_execute.ainvoke({"sessionId": ..., "code": ...})
```

## Path parameters

<div className="reference-table">
  | Field                                                             | Type     | Description             |
  | ----------------------------------------------------------------- | -------- | ----------------------- |
  | `sessionId` <span className="required" title="required">\*</span> | `string` | The interact session ID |
</div>

## Body

<div className="reference-table">
  | Field                                                        | Type                           | Description                                                                                                       |
  | ------------------------------------------------------------ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
  | `code` <span className="required" title="required">\*</span> | `string`                       | Code to execute in the browser sandbox <span className="field-constraints">min length 1; max length 100000</span> |
  | `language`                                                   | `"python" \| "node" \| "bash"` | Language of the code to execute. The server applies 'node' when this is absent.                                   |
  | `timeout`                                                    | `integer`                      | Execution timeout in seconds <span className="field-constraints">≥ 1; ≤ 300</span>                                |
</div>
