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

# Set machine timeout

> Replace the machine’s execution timeout measured from the current request.

## Authentication

Send your scoped bearer token in the `Authorization: Bearer <BEAD_TOKEN>` header, or send your API key in `X-API-Key`.

## Parameters

**sandboxID** `string` *required*

Machine identifier returned by creation.

**Idempotency-Key** `string`

Caller-generated durable retry key: lowercase ASCII letters, digits, and hyphens only. Reuse the same key and body after a connection failure. Minimum length: `1`. Maximum length: `255`.

## Request body

The JSON body is optional.

**timeout** `integer` *required*

Timeout in seconds from the current time after which the sandbox should expire Format: `int32`. Minimum: `0`. Maximum: `86400`.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl --request POST \
  --url "https://api.bead.run/sandboxes/$SANDBOX_ID/timeout" \
  --header "X-API-Key: $BEAD_API_KEY" \
  --header 'Idempotency-Key: 48fcb7cf-0f9e-4612-bd37-4c66171c2aae' \
  --header "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "timeout": 600
}
JSON
```

## Response

### 204

Successfully set the sandbox timeout.

No response body.

## Errors

| Status | Meaning |
| - | - |
| 400 | Invalid request values, unsupported bounds, or malformed JSON. |
| 401 | Authentication credential is missing or rejected. |
| 402 | Insufficient prepaid credit (`insufficient_credit`) for the requested execution window. |
| 403 | The credential lacks the required scope. |
| 404 | The requested resource does not exist or is outside your organization. |
| 409 | Ownership/state conflict or request is already active (`idempotency_in_progress`, `idempotency_request_mismatch`). An expired execution attempt returns `execution_expired`. |
| 410 | Execution memory was lost (`machine_lost`); create a new machine or explicitly recover a checkpoint. |
| 413 | Request body exceeds the route limit. |
| 422 | The prior operation outcome is unknown (`idempotency_outcome_unknown`), or the JSON body does not match the request contract. |
| 429 | Request or resource admission limit exceeded (`admission_limit`; trial capacity can return `free_capacity_full`). Follow limit.next\_action and Retry-After when present. |
| 500 | Machine operation failed (`execution_failed`), or a capture was preserved for recovery (`snapshot_preserved`). Inspect the machine before issuing another operation. |
| 501 | This request selects a feature this deployment does not support (`unsupported_feature`). |
| 503 | Service or persistence is temporarily unavailable. |
| 504 | Machine acknowledgement deadline exceeded; inspect state before retrying the same request key. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.