# tinker_cookbook.sandbox.SandboxFusionClient

## _class_ [**tinker_cookbook.sandbox.SandboxFusionClient**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/sandbox/sandboxfusion.py#L23)()

Async HTTP client for SandboxFusion code execution.

**Usage:**
```python
client = SandboxFusionClient()
success, response = await client.run(
    code="print('hello')",
    files={"data.txt": "some content"},
    timeout=30,
)
await client.close()
```

### [**run**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/sandbox/sandboxfusion.py#L67)( _code_, _files_, _timeout_, _language_)

Execute code with supporting files in the sandbox.

**Parameters:**

- [**code**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/sandbox/sandboxfusion.py#L69) ( _str_) – Main code to execute (entry point)
- [**files**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/sandbox/sandboxfusion.py#L70) ( _dict[str, str]_) – Additional files to include {filename: content}
- [**timeout**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/sandbox/sandboxfusion.py#L71) ( _float_) – Execution timeout in seconds
- [**language**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/sandbox/sandboxfusion.py#L72) ( _str_) – Programming language (default: python)

**Returns:** Tuple of (success: bool, response: dict) - success is True only if status == "Success" - response contains the full API response or error details

### [**close**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/sandbox/sandboxfusion.py#L117)()

Close the HTTP session and release resources.

**Returns:** _None_
