Endpoint
Request
Headers
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Code to execute |
language | string | No | Language (default: python) |
timeout | integer | No | Max execution time in seconds (default: 300) |
working_dir | string | No | Working directory |
env | object | No | Environment variables |
name | string | No | Process name for identification |
Example Request
Response
Success (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
process_id | string | Process ID (use to check status or kill) |
execution_id | string | Execution ID |
status | string | Initial status (queued or running) |
Status Codes
| Code | Description |
|---|---|
| 200 | Process started |
| 400 | Invalid request |
| 401 | Unauthorized |
| 500 | Failed to start process |
Check Process Status
Use the List Processes endpoint to check status:Kill Background Process
Use the Kill Process endpoint to terminate:Use Cases
Long-Running Data Processing
Model Training
Monitoring Background Process
Parallel Execution
Related
- SDK: sandbox.run_code_background() - Python SDK method
- CLI Code Execution - Execute code from CLI
Next Steps
- List Processes - Check background process status
- Kill Process - Terminate a background process
- Async Execution - Execute with webhook callbacks

