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.
Seconds without activity before a persistent machine pauses, or never to disable idle pause. Persistent machines default to 900 seconds; numeric values must be 300–86400. May be null. Accepts integer or string (“never”).
Lifetime policy: temporary expires at its timeout; persistent retains state until explicit deletion or the end of credit grace. Allowed values: "temporary", "persistent".
Current lifecycle state including running, idle-paused, waking, credit-grace, lost, or deleted. Allowed values: "running", "idle-paused", "waking", "credit-grace", "lost", "deleted".
Invalid request values, unsupported bounds, or malformed JSON.
401
Authentication credential is missing or rejected.
402
Insufficient prepaid credit (insufficient_credit) to fund the requested machine attempts.
403
The credential lacks the required scope.
404
The requested resource does not exist or is outside your organization.
409
Request key reused with a different body (idempotency_request_mismatch), or resource ownership/state conflicts.
413
Request body exceeds the route limit.
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.
503
Service or persistence is temporarily unavailable.
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"bead","description":"Use an AI sandbox on bead to run Linux commands, coding agents, and cloud desktops. Manage sandboxes and cloud computers for AI agents.","colors":{"primary":"#2f5bea","light":"#5c80f7","dark":"#2f5bea"},"logo":{"light":"https://mintcdn.com/bead/7Pxa91TEzFoZEuvc/logo/lockup-light.png?fit=max\u0026auto=format\u0026n=7Pxa91TEzFoZEuvc\u0026q=85\u0026s=4d9c8c2e9c62621757663297696c959f","dark":"https://mintcdn.com/bead/7Pxa91TEzFoZEuvc/logo/lockup-dark.png?fit=max\u0026auto=format\u0026n=7Pxa91TEzFoZEuvc\u0026q=85\u0026s=f27f1ef0c544e795b5933424bd38cf35","href":"https://bead.run"},"favicon":"https://mintcdn.com/bead/bVnIRMm_e46JvcOR/logo/avatar-blue.png?fit=max\u0026auto=format\u0026n=bVnIRMm_e46JvcOR\u0026q=85\u0026s=e6f271db80b85ddb58a869cfbf79acb0","api":{"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"},"server":"https://api.bead.run"}},"background":{"color":{"light":"#fffdf8","dark":"#15171c"}},"navbar":{"links":[{"href":"/installation","label":"Install"}],"primary":{"type":"button","label":"Go to dashboard","href":"https://app.bead.run"}},"footer":{"socials":{"x":"https://x.com/mintlify","github":"https://github.com/mintlify","linkedin":"https://linkedin.com/company/mintlify"}},"seo":{"indexing":"navigable"},"fonts":{"heading":{"family":"Archivo","weight":600}},"styling":{"eyebrows":"section","codeblocks":{"theme":{"light":"github-light","dark":"github-dark-default"}},"latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bead","hasAudioNarration":false,"actualSubdomain":"bead","customDomains":["docs.bead.run"],"gitSource":{"type":"artifacts","owner":"prod","repo":"6af6041987ef92cc9fe8f054","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6af6043595c07efc9ea91b6d"},"entitlements":{},"buildId":"6af64cb540eede45dc5a24af","clientVersion":"0.0.4117","searchFilterCounts":[{"language":"default","tag":"Guides","count":56},{"language":"default","tag":"API reference","count":40},{"language":"default","tag":"Endpoints","count":38},{"language":"default","tag":"Platform","count":15},{"language":"default","tag":"Worktrees","count":10},{"language":"default","tag":"CLI reference","count":8},{"language":"default","tag":"CLI","count":8},{"language":"default","tag":"Get started","count":6},{"language":"default","tag":"Help","count":6},{"language":"default","tag":"Billing and credit","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/endpoints/post-sandboxes-id-fork","slug":"/api-reference/endpoints/post-sandboxes-id-fork","pageMetadata":{"title":"Fork a machine","description":"Capture a running machine and create ordered children from its memory snapshot.","keywords":["bead fork a machine endpoint"],"api":"POST https://api.bead.run/sandboxes/{id}/fork","href":"/api-reference/endpoints/post-sandboxes-id-fork"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Capture a running machine and create ordered children from its memory snapshot.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField,Table}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`Send your scoped bearer token in the `,_jsx(_components.code,{children:`Authorization: Bearer \u003cBEAD_TOKEN>`}),` header, or send your API key in `,_jsx(_components.code,{children:`X-API-Key`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsx(ParamField,{path:`id`,type:`string`,required:true,id:`param-id`,children:`Machine identifier returned by creation.`}),`\n`,_jsxs(ParamField,{header:`Idempotency-Key`,type:`string`,required:true,id:`param-idempotency-key`,children:[`Caller-generated durable retry key: lowercase ASCII letters, digits, and hyphens only. Reuse the same key and body after a connection failure. Minimum length: `,_jsx(_components.code,{children:`1`}),`. Maximum length: `,_jsx(_components.code,{children:`255`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request body`}),`\n`,_jsx(_components.p,{children:`The JSON body is required.`}),`\n`,_jsxs(ParamField,{body:`count`,type:`integer`,required:true,id:`param-count`,children:[`Number of child machines to create. Minimum: `,_jsx(_components.code,{children:`1`}),`. Maximum: `,_jsx(_components.code,{children:`20`}),`.`]}),`\n`,_jsxs(ParamField,{body:`timeout`,type:`integer`,default:300,id:`param-timeout`,children:[`Funded execution timeout per child in seconds. Minimum: `,_jsx(_components.code,{children:`1`}),`. Maximum: `,_jsx(_components.code,{children:`86400`}),`.`]}),`\n`,_jsx(ParamField,{body:`inheritCredentials`,type:`boolean`,default:false,id:`param-inherit-credentials`,children:`Must be false; fork does not inherit credential profiles. Use a consented snapshot to copy them.`}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`202`,children:`202`}),`\n`,_jsx(_components.p,{children:`Fork capture or one or more children are pending.`}),`\n`,_jsx(ResponseField,{name:`operationID`,type:`string`,required:true,id:`param-operation-id`,children:`Fork batch UUID to poll.`}),`\n`,_jsx(ResponseField,{name:`snapshotID`,type:`string`,required:true,id:`param-snapshot-id`,children:`Snapshot shared by the fork children.`}),`\n`,_jsxs(ResponseField,{name:`capture`,type:`object | null`,required:true,id:`param-capture`,children:[_jsxs(_components.p,{children:[`Memory capture result and source recovery details. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`sourcePreserved`,type:`boolean`,required:true,id:`param-source-preserved`,children:`Whether the source was preserved for recovery.`}),_jsxs(ResponseField,{name:`sourceBilling`,type:`string`,required:true,id:`param-source-billing`,children:[`Who pays for the source after capture. Allowed values: `,_jsx(_components.code,{children:`\"platform\"`}),`, `,_jsx(_components.code,{children:`\"tenant\"`}),`.`]}),_jsx(ResponseField,{name:`capturedAtMs`,type:`integer`,required:true,id:`param-captured-at-ms`,children:`Capture timestamp in Unix milliseconds.`}),_jsx(ResponseField,{name:`freezeNanos`,type:`integer`,required:true,id:`param-freeze-nanos`,children:`Source freeze duration in nanoseconds.`}),_jsx(ResponseField,{name:`sourceResumed`,type:`boolean`,required:true,id:`param-source-resumed`,children:`Whether the source resumed after capture.`}),_jsxs(ResponseField,{name:`timing`,type:`object`,required:true,id:`param-timing`,children:[_jsx(_components.p,{children:`Time spent in each capture stage.`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`incremental`,type:`boolean`,required:true,id:`param-incremental`,children:`Whether this capture used an incremental memory dump.`}),_jsx(ResponseField,{name:`dirtyMemoryBytes`,type:`integer`,required:true,id:`param-dirty-memory-bytes`,children:`Allocated memory dump bytes before flattening.`}),_jsx(ResponseField,{name:`totalNanos`,type:`integer`,required:true,id:`param-total-nanos`,children:`Total capture time in nanoseconds.`}),_jsx(ResponseField,{name:`pauseNanos`,type:`integer`,required:true,id:`param-pause-nanos`,children:`Pause time in nanoseconds.`}),_jsx(ResponseField,{name:`dumpNanos`,type:`integer`,required:true,id:`param-dump-nanos`,children:`Memory dump time in nanoseconds.`}),_jsx(ResponseField,{name:`diskReflinkNanos`,type:`integer`,required:true,id:`param-disk-reflink-nanos`,children:`Disk clone time in nanoseconds.`}),_jsx(ResponseField,{name:`adoptNanos`,type:`integer`,required:true,id:`param-adopt-nanos`,children:`Snapshot adoption time in nanoseconds.`}),_jsx(ResponseField,{name:`cleanupNanos`,type:`integer`,required:true,id:`param-cleanup-nanos`,children:`Cleanup time in nanoseconds.`}),_jsx(ResponseField,{name:`resumeNanos`,type:`integer`,required:true,id:`param-resume-nanos`,children:`Source resume time in nanoseconds.`}),_jsx(ResponseField,{name:`publicationNanos`,type:`integer`,required:true,id:`param-publication-nanos`,children:`Publication time in nanoseconds.`})]})]})]})]}),`\n`,_jsxs(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:[`Whether any children are still pending. Allowed values: `,_jsx(_components.code,{children:`\"pending\"`}),`, `,_jsx(_components.code,{children:`\"completed\"`}),`.`]}),`\n`,_jsxs(ResponseField,{name:`results`,type:`object[]`,required:true,id:`param-results`,children:[_jsx(_components.p,{children:`Ordered child results; a failed child has its own error response.`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`index`,type:`integer`,required:true,id:`param-index`,children:`Zero-based request index.`}),_jsx(ResponseField,{name:`status`,type:`integer`,required:true,id:`param-status-1`,children:`HTTP status for this member; 202 means it is still pending.`}),_jsx(ResponseField,{name:`operationID`,type:`string`,id:`param-operation-id-1`,children:`Operation UUID for a pending member.`}),_jsxs(ResponseField,{name:`response`,type:`object`,id:`param-response`,children:[_jsxs(_components.p,{children:[`Machine connection fields on success, or an error body on failure. Accepts `,_jsx(_components.code,{children:`object`}),` or `,_jsx(_components.code,{children:`object`}),` or `,_jsx(_components.code,{children:`object`}),`.`]}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`alias`,type:`string`,id:`param-alias`,children:`Alias of the template`}),_jsx(ResponseField,{name:`clientID`,type:`string`,deprecated:true,id:`param-client-id`,children:`Identifier of the client`}),_jsxs(ResponseField,{name:`domain`,type:`string | null`,id:`param-domain`,children:[`Base domain where the sandbox traffic is accessible May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsx(ResponseField,{name:`envdAccessToken`,type:`string`,id:`param-envd-access-token`,children:`Access token used for envd communication`}),_jsx(ResponseField,{name:`envdVersion`,type:`string`,id:`param-envd-version`,children:`Version of the envd running in the sandbox`}),_jsxs(ResponseField,{name:`grace_deadline`,type:`string | null`,id:`param-grace-deadline`,children:[`End of the credit grace period as an RFC 3339 timestamp, or null when funded. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(ResponseField,{name:`idle_timeout`,type:`integer | string | null`,id:`param-idle-timeout`,children:[`Seconds without activity before a persistent machine pauses, or never to disable idle pause. Persistent machines default to 900 seconds; numeric values must be 300–86400. May be `,_jsx(_components.code,{children:`null`}),`. Accepts `,_jsx(_components.code,{children:`integer`}),` or `,_jsx(_components.code,{children:`string`}),` (“never”).`]}),_jsxs(ResponseField,{name:`kind`,type:`string`,id:`param-kind`,children:[`Lifetime policy: temporary expires at its timeout; persistent retains state until explicit deletion or the end of credit grace. Allowed values: `,_jsx(_components.code,{children:`\"temporary\"`}),`, `,_jsx(_components.code,{children:`\"persistent\"`}),`.`]}),_jsxs(ResponseField,{name:`last_activity`,type:`string | null`,id:`param-last-activity`,children:[`Most recent activity as an RFC 3339 timestamp, or null when no activity was recorded. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(ResponseField,{name:`machine_state`,type:`string`,id:`param-machine-state`,children:[`Current lifecycle state including running, idle-paused, waking, credit-grace, lost, or deleted. Allowed values: `,_jsx(_components.code,{children:`\"running\"`}),`, `,_jsx(_components.code,{children:`\"idle-paused\"`}),`, `,_jsx(_components.code,{children:`\"waking\"`}),`, `,_jsx(_components.code,{children:`\"credit-grace\"`}),`, `,_jsx(_components.code,{children:`\"lost\"`}),`, `,_jsx(_components.code,{children:`\"deleted\"`}),`.`]}),_jsxs(ResponseField,{name:`paused_at`,type:`string | null`,id:`param-paused-at`,children:[`Time the machine last paused as an RFC 3339 timestamp, or null when it has not paused. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsx(ResponseField,{name:`sandboxID`,type:`string`,id:`param-sandbox-id`,children:`Identifier of the sandbox`}),_jsx(ResponseField,{name:`templateID`,type:`string`,id:`param-template-id`,children:`Identifier of the template from which is the sandbox created`}),_jsxs(ResponseField,{name:`trafficAccessToken`,type:`string | null`,id:`param-traffic-access-token`,children:[`Token required for accessing sandbox via proxy. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(ResponseField,{name:`wake_reason`,type:`string | null`,id:`param-wake-reason`,children:[`Reason for the last wake or lifecycle transition, or null when none is recorded. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(ResponseField,{name:`warnings`,type:`object[]`,id:`param-warnings`,children:[`Lifecycle or credit grace warnings attached to this machine. Additional keys accept `,_jsx(_components.code,{children:`any`}),` values.`]}),_jsx(ResponseField,{name:`code`,type:`integer`,id:`param-code`,children:`HTTP status code.`}),_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:`Explanation of the failed request.`}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code`,children:`Stable error identifier when supplied; use it to decide how to recover.`}),_jsxs(ResponseField,{name:`limit`,type:`object`,id:`param-limit`,children:[_jsx(_components.p,{children:`The resource limit that blocked the request.`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`limit`,type:`string`,required:true,id:`param-limit-1`,children:`Name of the exhausted resource.`}),_jsx(ResponseField,{name:`maximum`,type:`integer`,required:true,id:`param-maximum`,children:`Allowed amount of this resource.`}),_jsx(ResponseField,{name:`usage`,type:`integer`,required:true,id:`param-usage`,children:`Current usage counted against the limit.`}),_jsx(ResponseField,{name:`next_action`,type:`string`,required:true,id:`param-next-action`,children:`Action you can take to proceed.`}),_jsx(ResponseField,{name:`reset_at`,type:`integer`,id:`param-reset-at`,children:`Unix time in seconds when this time window resets.`})]})]}),_jsx(ResponseField,{name:`operationID`,type:`string`,id:`param-operation-id-2`,children:`Operation UUID.`}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status-2`,children:`Current operation state.`})]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`207`,children:`207`}),`\n`,_jsx(_components.p,{children:`All child attempts finished; inspect each member status.`}),`\n`,_jsx(_components.p,{children:`The response fields are the same as the success body above.`}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`Invalid request values, unsupported bounds, or malformed JSON.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:`Authentication credential is missing or rejected.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`402`}),_jsxs(_components.td,{children:[`Insufficient prepaid credit (`,_jsx(_components.code,{children:`insufficient_credit`}),`) to fund the requested machine attempts.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:`The credential lacks the required scope.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`The requested resource does not exist or is outside your organization.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsxs(_components.td,{children:[`Request key reused with a different body (`,_jsx(_components.code,{children:`idempotency_request_mismatch`}),`), or resource ownership/state conflicts.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:`Request body exceeds the route limit.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsxs(_components.td,{children:[`Request or resource admission limit exceeded (`,_jsx(_components.code,{children:`admission_limit`}),`; trial capacity can return `,_jsx(_components.code,{children:`free_capacity_full`}),`). Follow limit.next_action and Retry-After when present.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:`Service or persistence is temporarily unavailable.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark-default"}},"config":{},"pageMetadata":{"title":"Fork a machine","description":"Capture a running machine and create ordered children from its memory snapshot.","keywords":["bead fork a machine endpoint"],"api":"POST https://api.bead.run/sandboxes/{id}/fork","href":"/api-reference/endpoints/post-sandboxes-id-fork"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`Send your scoped bearer token in the `,_jsx(_components.code,{children:`Authorization: Bearer \u003cBEAD_TOKEN>`}),` header, or send your API key in `,_jsx(_components.code,{children:`X-API-Key`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsx(ParamField,{path:`id`,type:`string`,required:true,id:`param-id`,children:`Machine identifier returned by creation.`}),`\n`,_jsxs(ParamField,{header:`Idempotency-Key`,type:`string`,required:true,id:`param-idempotency-key`,children:[`Caller-generated durable retry key: lowercase ASCII letters, digits, and hyphens only. Reuse the same key and body after a connection failure. Minimum length: `,_jsx(_components.code,{children:`1`}),`. Maximum length: `,_jsx(_components.code,{children:`255`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request body`}),`\n`,_jsx(_components.p,{children:`The JSON body is required.`}),`\n`,_jsxs(ParamField,{body:`count`,type:`integer`,required:true,id:`param-count`,children:[`Number of child machines to create. Minimum: `,_jsx(_components.code,{children:`1`}),`. Maximum: `,_jsx(_components.code,{children:`20`}),`.`]}),`\n`,_jsxs(ParamField,{body:`timeout`,type:`integer`,default:300,id:`param-timeout`,children:[`Funded execution timeout per child in seconds. Minimum: `,_jsx(_components.code,{children:`1`}),`. Maximum: `,_jsx(_components.code,{children:`86400`}),`.`]}),`\n`,_jsx(ParamField,{body:`inheritCredentials`,type:`boolean`,default:false,id:`param-inherit-credentials`,children:`Must be false; fork does not inherit credential profiles. Use a consented snapshot to copy them.`}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark-default`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0d1117`,color:`#24292e`,\"--shiki-dark\":`#e6edf3`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFA657`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:` --request`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:` POST`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:` --url`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:` \"https://api.bead.run/sandboxes/`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:`$SANDBOX_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:`/fork\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:` --header`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:`$BEAD_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:` --header`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:` 'Idempotency-Key: 48fcb7cf-0f9e-4612-bd37-4c66171c2aae'`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:` --header`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:` @-`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#FF7B72`},children:` \u003c\u003c`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#E6EDF3`},children:`'JSON'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:` \"count\": 2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:` \"timeout\": 300`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#A5D6FF`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#E6EDF3`},children:`JSON`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark-default`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0d1117`,color:`#24292e`,\"--shiki-dark\":`#e6edf3`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#8B949E`},children:`# sandbox is returned by Sandbox.create or Sandbox.connect.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:`children `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#FF7B72`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:` sandbox.fork(`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFA657`},children:`n`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#FF7B72`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:`2`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFA657`},children:`timeout`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#FF7B72`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:`300`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`2`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark-default`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0d1117`,color:`#24292e`,\"--shiki-dark\":`#e6edf3`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#8B949E`},children:`// sandbox is returned by Sandbox.create or Sandbox.connect.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#FF7B72`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:` children`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#FF7B72`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#FF7B72`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:` sandbox.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#D2A8FF`},children:`fork`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:`(`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:`2`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79C0FF`},children:`300`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E6EDF3`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`202`,children:`202`}),`\n`,_jsx(_components.p,{children:`Fork capture or one or more children are pending.`}),`\n`,_jsx(ResponseField,{name:`operationID`,type:`string`,required:true,id:`param-operation-id`,children:`Fork batch UUID to poll.`}),`\n`,_jsx(ResponseField,{name:`snapshotID`,type:`string`,required:true,id:`param-snapshot-id`,children:`Snapshot shared by the fork children.`}),`\n`,_jsxs(ResponseField,{name:`capture`,type:`object | null`,required:true,id:`param-capture`,children:[_jsxs(_components.p,{children:[`Memory capture result and source recovery details. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`sourcePreserved`,type:`boolean`,required:true,id:`param-source-preserved`,children:`Whether the source was preserved for recovery.`}),_jsxs(ResponseField,{name:`sourceBilling`,type:`string`,required:true,id:`param-source-billing`,children:[`Who pays for the source after capture. Allowed values: `,_jsx(_components.code,{children:`\"platform\"`}),`, `,_jsx(_components.code,{children:`\"tenant\"`}),`.`]}),_jsx(ResponseField,{name:`capturedAtMs`,type:`integer`,required:true,id:`param-captured-at-ms`,children:`Capture timestamp in Unix milliseconds.`}),_jsx(ResponseField,{name:`freezeNanos`,type:`integer`,required:true,id:`param-freeze-nanos`,children:`Source freeze duration in nanoseconds.`}),_jsx(ResponseField,{name:`sourceResumed`,type:`boolean`,required:true,id:`param-source-resumed`,children:`Whether the source resumed after capture.`}),_jsxs(ResponseField,{name:`timing`,type:`object`,required:true,id:`param-timing`,children:[_jsx(_components.p,{children:`Time spent in each capture stage.`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`incremental`,type:`boolean`,required:true,id:`param-incremental`,children:`Whether this capture used an incremental memory dump.`}),_jsx(ResponseField,{name:`dirtyMemoryBytes`,type:`integer`,required:true,id:`param-dirty-memory-bytes`,children:`Allocated memory dump bytes before flattening.`}),_jsx(ResponseField,{name:`totalNanos`,type:`integer`,required:true,id:`param-total-nanos`,children:`Total capture time in nanoseconds.`}),_jsx(ResponseField,{name:`pauseNanos`,type:`integer`,required:true,id:`param-pause-nanos`,children:`Pause time in nanoseconds.`}),_jsx(ResponseField,{name:`dumpNanos`,type:`integer`,required:true,id:`param-dump-nanos`,children:`Memory dump time in nanoseconds.`}),_jsx(ResponseField,{name:`diskReflinkNanos`,type:`integer`,required:true,id:`param-disk-reflink-nanos`,children:`Disk clone time in nanoseconds.`}),_jsx(ResponseField,{name:`adoptNanos`,type:`integer`,required:true,id:`param-adopt-nanos`,children:`Snapshot adoption time in nanoseconds.`}),_jsx(ResponseField,{name:`cleanupNanos`,type:`integer`,required:true,id:`param-cleanup-nanos`,children:`Cleanup time in nanoseconds.`}),_jsx(ResponseField,{name:`resumeNanos`,type:`integer`,required:true,id:`param-resume-nanos`,children:`Source resume time in nanoseconds.`}),_jsx(ResponseField,{name:`publicationNanos`,type:`integer`,required:true,id:`param-publication-nanos`,children:`Publication time in nanoseconds.`})]})]})]})]}),`\n`,_jsxs(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:[`Whether any children are still pending. Allowed values: `,_jsx(_components.code,{children:`\"pending\"`}),`, `,_jsx(_components.code,{children:`\"completed\"`}),`.`]}),`\n`,_jsxs(ResponseField,{name:`results`,type:`object[]`,required:true,id:`param-results`,children:[_jsx(_components.p,{children:`Ordered child results; a failed child has its own error response.`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`index`,type:`integer`,required:true,id:`param-index`,children:`Zero-based request index.`}),_jsx(ResponseField,{name:`status`,type:`integer`,required:true,id:`param-status-1`,children:`HTTP status for this member; 202 means it is still pending.`}),_jsx(ResponseField,{name:`operationID`,type:`string`,id:`param-operation-id-1`,children:`Operation UUID for a pending member.`}),_jsxs(ResponseField,{name:`response`,type:`object`,id:`param-response`,children:[_jsxs(_components.p,{children:[`Machine connection fields on success, or an error body on failure. Accepts `,_jsx(_components.code,{children:`object`}),` or `,_jsx(_components.code,{children:`object`}),` or `,_jsx(_components.code,{children:`object`}),`.`]}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`alias`,type:`string`,id:`param-alias`,children:`Alias of the template`}),_jsx(ResponseField,{name:`clientID`,type:`string`,deprecated:true,id:`param-client-id`,children:`Identifier of the client`}),_jsxs(ResponseField,{name:`domain`,type:`string | null`,id:`param-domain`,children:[`Base domain where the sandbox traffic is accessible May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsx(ResponseField,{name:`envdAccessToken`,type:`string`,id:`param-envd-access-token`,children:`Access token used for envd communication`}),_jsx(ResponseField,{name:`envdVersion`,type:`string`,id:`param-envd-version`,children:`Version of the envd running in the sandbox`}),_jsxs(ResponseField,{name:`grace_deadline`,type:`string | null`,id:`param-grace-deadline`,children:[`End of the credit grace period as an RFC 3339 timestamp, or null when funded. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(ResponseField,{name:`idle_timeout`,type:`integer | string | null`,id:`param-idle-timeout`,children:[`Seconds without activity before a persistent machine pauses, or never to disable idle pause. Persistent machines default to 900 seconds; numeric values must be 300–86400. May be `,_jsx(_components.code,{children:`null`}),`. Accepts `,_jsx(_components.code,{children:`integer`}),` or `,_jsx(_components.code,{children:`string`}),` (“never”).`]}),_jsxs(ResponseField,{name:`kind`,type:`string`,id:`param-kind`,children:[`Lifetime policy: temporary expires at its timeout; persistent retains state until explicit deletion or the end of credit grace. Allowed values: `,_jsx(_components.code,{children:`\"temporary\"`}),`, `,_jsx(_components.code,{children:`\"persistent\"`}),`.`]}),_jsxs(ResponseField,{name:`last_activity`,type:`string | null`,id:`param-last-activity`,children:[`Most recent activity as an RFC 3339 timestamp, or null when no activity was recorded. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(ResponseField,{name:`machine_state`,type:`string`,id:`param-machine-state`,children:[`Current lifecycle state including running, idle-paused, waking, credit-grace, lost, or deleted. Allowed values: `,_jsx(_components.code,{children:`\"running\"`}),`, `,_jsx(_components.code,{children:`\"idle-paused\"`}),`, `,_jsx(_components.code,{children:`\"waking\"`}),`, `,_jsx(_components.code,{children:`\"credit-grace\"`}),`, `,_jsx(_components.code,{children:`\"lost\"`}),`, `,_jsx(_components.code,{children:`\"deleted\"`}),`.`]}),_jsxs(ResponseField,{name:`paused_at`,type:`string | null`,id:`param-paused-at`,children:[`Time the machine last paused as an RFC 3339 timestamp, or null when it has not paused. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsx(ResponseField,{name:`sandboxID`,type:`string`,id:`param-sandbox-id`,children:`Identifier of the sandbox`}),_jsx(ResponseField,{name:`templateID`,type:`string`,id:`param-template-id`,children:`Identifier of the template from which is the sandbox created`}),_jsxs(ResponseField,{name:`trafficAccessToken`,type:`string | null`,id:`param-traffic-access-token`,children:[`Token required for accessing sandbox via proxy. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(ResponseField,{name:`wake_reason`,type:`string | null`,id:`param-wake-reason`,children:[`Reason for the last wake or lifecycle transition, or null when none is recorded. May be `,_jsx(_components.code,{children:`null`}),`.`]}),_jsxs(ResponseField,{name:`warnings`,type:`object[]`,id:`param-warnings`,children:[`Lifecycle or credit grace warnings attached to this machine. Additional keys accept `,_jsx(_components.code,{children:`any`}),` values.`]}),_jsx(ResponseField,{name:`code`,type:`integer`,id:`param-code`,children:`HTTP status code.`}),_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:`Explanation of the failed request.`}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code`,children:`Stable error identifier when supplied; use it to decide how to recover.`}),_jsxs(ResponseField,{name:`limit`,type:`object`,id:`param-limit`,children:[_jsx(_components.p,{children:`The resource limit that blocked the request.`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ResponseField,{name:`limit`,type:`string`,required:true,id:`param-limit-1`,children:`Name of the exhausted resource.`}),_jsx(ResponseField,{name:`maximum`,type:`integer`,required:true,id:`param-maximum`,children:`Allowed amount of this resource.`}),_jsx(ResponseField,{name:`usage`,type:`integer`,required:true,id:`param-usage`,children:`Current usage counted against the limit.`}),_jsx(ResponseField,{name:`next_action`,type:`string`,required:true,id:`param-next-action`,children:`Action you can take to proceed.`}),_jsx(ResponseField,{name:`reset_at`,type:`integer`,id:`param-reset-at`,children:`Unix time in seconds when this time window resets.`})]})]}),_jsx(ResponseField,{name:`operationID`,type:`string`,id:`param-operation-id-2`,children:`Operation UUID.`}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status-2`,children:`Current operation state.`})]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`207`,children:`207`}),`\n`,_jsx(_components.p,{children:`All child attempts finished; inspect each member status.`}),`\n`,_jsx(_components.p,{children:`The response fields are the same as the success body above.`}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`Invalid request values, unsupported bounds, or malformed JSON.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsx(_components.td,{children:`Authentication credential is missing or rejected.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`402`}),_jsxs(_components.td,{children:[`Insufficient prepaid credit (`,_jsx(_components.code,{children:`insufficient_credit`}),`) to fund the requested machine attempts.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`403`}),_jsx(_components.td,{children:`The credential lacks the required scope.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`The requested resource does not exist or is outside your organization.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsxs(_components.td,{children:[`Request key reused with a different body (`,_jsx(_components.code,{children:`idempotency_request_mismatch`}),`), or resource ownership/state conflicts.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`413`}),_jsx(_components.td,{children:`Request body exceeds the route limit.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`429`}),_jsxs(_components.td,{children:[`Request or resource admission limit exceeded (`,_jsx(_components.code,{children:`admission_limit`}),`; trial capacity can return `,_jsx(_components.code,{children:`free_capacity_full`}),`). Follow limit.next_action and Retry-After when present.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`503`}),_jsx(_components.td,{children:`Service or persistence is temporarily unavailable.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark-default"}},"config":{},"pageMetadata":{"title":"Fork a machine","description":"Capture a running machine and create ordered children from its memory snapshot.","keywords":["bead fork a machine endpoint"],"api":"POST https://api.bead.run/sandboxes/{id}/fork","href":"/api-reference/endpoints/post-sandboxes-id-fork"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Request body","slug":"request-body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"202","slug":"202","depth":3,"children":[]},{"title":"207","slug":"207","depth":3,"children":[]}]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark-default\" style=\"background-color:#fff;--shiki-dark-bg:#0d1117;color:#24292e;--shiki-dark:#e6edf3\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#6F42C1;--shiki-dark:#FFA657\">curl\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\"> --request\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\"> POST\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#FF7B72\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\"> --url\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\"> \"https://api.bead.run/sandboxes/\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\">$SANDBOX_ID\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\">/fork\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#FF7B72\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\"> --header\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\"> \"X-API-Key: \u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\">$BEAD_API_KEY\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\">\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#FF7B72\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\"> --header\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\"> 'Idempotency-Key: 48fcb7cf-0f9e-4612-bd37-4c66171c2aae'\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#FF7B72\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\"> --header\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#FF7B72\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\"> --data-binary\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\"> @-\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#FF7B72\"> \u0026#x3C;\u0026#x3C;\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#E6EDF3\">'JSON'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\"> \"count\": 2,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\"> \"timeout\": 300\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#A5D6FF\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#E6EDF3\">JSON\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark-default\" style=\"background-color:#fff;--shiki-dark-bg:#0d1117;color:#24292e;--shiki-dark:#e6edf3\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#8B949E\"># sandbox is returned by Sandbox.create or Sandbox.connect.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\">children \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#FF7B72\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\"> sandbox.fork(\u003c/span>\u003cspan style=\"color:#E36209;--shiki-dark:#FFA657\">n\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#FF7B72\">=\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\">2\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\">, \u003c/span>\u003cspan style=\"color:#E36209;--shiki-dark:#FFA657\">timeout\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#FF7B72\">=\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\">300\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\">)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"TypeScript","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark-default\" style=\"background-color:#fff;--shiki-dark-bg:#0d1117;color:#24292e;--shiki-dark:#e6edf3\" language=\"typescript\">\u003ccode language=\"typescript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#6A737D;--shiki-dark:#8B949E\">// sandbox is returned by Sandbox.create or Sandbox.connect.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#FF7B72\">const\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\"> children\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#FF7B72\"> =\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#FF7B72\"> await\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\"> sandbox.\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#D2A8FF\">fork\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\">(\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\">2\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\">, \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79C0FF\">300\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E6EDF3\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Fork a machine","path":"/sandboxes/{id}/fork","servers":[{"url":"https://api.bead.run"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"Idempotency-Key":{"schema":[{"type":"string","description":"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` .","required":true}]}},"cookie":{},"path":{"id":{"schema":[{"type":"string","description":"Machine identifier returned by creation.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"count":[{"type":"integer","description":"Number of child machines to create. Minimum: `1` . Maximum: `20` .","required":true}],"timeout":[{"type":"integer","description":"Funded execution timeout per child in seconds. Minimum: `1` . Maximum: `86400` ."}],"inheritCredentials":[{"type":"boolean","description":"Must be false; fork does not inherit credential profiles. Use a consented snapshot to copy them."}]}}],"examples":{"example":{"value":{"count":123,"timeout":123,"inheritCredentials":true}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"operationID":[{"type":"string","description":"Fork batch UUID to poll.","required":true}],"snapshotID":[{"type":"string","description":"Snapshot shared by the fork children.","required":true}],"capture":[{"type":"object","properties":{"sourcePreserved":[{"type":"boolean","description":"Whether the source was preserved for recovery.","required":true}],"sourceBilling":[{"type":"string","description":"Who pays for the source after capture. Allowed values: `\"platform\"` , `\"tenant\"` .","required":true}],"capturedAtMs":[{"type":"integer","description":"Capture timestamp in Unix milliseconds.","required":true}],"freezeNanos":[{"type":"integer","description":"Source freeze duration in nanoseconds.","required":true}],"sourceResumed":[{"type":"boolean","description":"Whether the source resumed after capture.","required":true}],"timing":[{"type":"object","properties":{"incremental":[{"type":"boolean","description":"Whether this capture used an incremental memory dump.","required":true}],"dirtyMemoryBytes":[{"type":"integer","description":"Allocated memory dump bytes before flattening.","required":true}],"totalNanos":[{"type":"integer","description":"Total capture time in nanoseconds.","required":true}],"pauseNanos":[{"type":"integer","description":"Pause time in nanoseconds.","required":true}],"dumpNanos":[{"type":"integer","description":"Memory dump time in nanoseconds.","required":true}],"diskReflinkNanos":[{"type":"integer","description":"Disk clone time in nanoseconds.","required":true}],"adoptNanos":[{"type":"integer","description":"Snapshot adoption time in nanoseconds.","required":true}],"cleanupNanos":[{"type":"integer","description":"Cleanup time in nanoseconds.","required":true}],"resumeNanos":[{"type":"integer","description":"Source resume time in nanoseconds.","required":true}],"publicationNanos":[{"type":"integer","description":"Publication time in nanoseconds.","required":true}]},"description":"Time spent in each capture stage.","required":true}]},"description":"Memory capture result and source recovery details. May be `null` .","required":true}],"status":[{"type":"string","description":"Whether any children are still pending. Allowed values: `\"pending\"` , `\"completed\"` .","required":true}],"results":[{"type":"array","items":[{"type":"object","properties":{"index":[{"type":"integer","description":"Zero-based request index.","required":true}],"status":[{"type":"integer","description":"HTTP status for this member; 202 means it is still pending.","required":true}],"operationID":[{"type":"string","description":"Operation UUID for a pending member."}],"response":[{"type":"object","properties":{"alias":[{"type":"string","description":"Alias of the template"}],"clientID":[{"type":"string","description":"Identifier of the client","deprecated":true}],"domain":[{"type":"object","properties":{},"description":"Base domain where the sandbox traffic is accessible May be `null` ."}],"envdAccessToken":[{"type":"string","description":"Access token used for envd communication"}],"envdVersion":[{"type":"string","description":"Version of the envd running in the sandbox"}],"grace_deadline":[{"type":"object","properties":{},"description":"End of the credit grace period as an RFC 3339 timestamp, or null when funded. May be `null` ."}],"idle_timeout":[{"type":"object","properties":{},"description":"Seconds without activity before a persistent machine pauses, or never to disable idle pause. Persistent machines default to 900 seconds; numeric values must be 300–86400. May be `null` . Accepts `integer` or `string` (“never”)."}],"kind":[{"type":"string","description":"Lifetime policy: temporary expires at its timeout; persistent retains state until explicit deletion or the end of credit grace. Allowed values: `\"temporary\"` , `\"persistent\"` ."}],"last_activity":[{"type":"object","properties":{},"description":"Most recent activity as an RFC 3339 timestamp, or null when no activity was recorded. May be `null` ."}],"machine_state":[{"type":"string","description":"Current lifecycle state including running, idle-paused, waking, credit-grace, lost, or deleted. Allowed values: `\"running\"` , `\"idle-paused\"` , `\"waking\"` , `\"credit-grace\"` , `\"lost\"` , `\"deleted\"` ."}],"paused_at":[{"type":"object","properties":{},"description":"Time the machine last paused as an RFC 3339 timestamp, or null when it has not paused. May be `null` ."}],"sandboxID":[{"type":"string","description":"Identifier of the sandbox"}],"templateID":[{"type":"string","description":"Identifier of the template from which is the sandbox created"}],"trafficAccessToken":[{"type":"object","properties":{},"description":"Token required for accessing sandbox via proxy. May be `null` ."}],"wake_reason":[{"type":"object","properties":{},"description":"Reason for the last wake or lifecycle transition, or null when none is recorded. May be `null` ."}],"warnings":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Lifecycle or credit grace warnings attached to this machine. Additional keys accept `any` values."}],"code":[{"type":"integer","description":"HTTP status code."}],"message":[{"type":"string","description":"Explanation of the failed request."}],"error_code":[{"type":"string","description":"Stable error identifier when supplied; use it to decide how to recover."}],"limit":[{"type":"object","properties":{"limit":[{"type":"string","description":"Name of the exhausted resource.","required":true}],"maximum":[{"type":"integer","description":"Allowed amount of this resource.","required":true}],"usage":[{"type":"integer","description":"Current usage counted against the limit.","required":true}],"next_action":[{"type":"string","description":"Action you can take to proceed.","required":true}],"reset_at":[{"type":"integer","description":"Unix time in seconds when this time window resets."}]},"description":"The resource limit that blocked the request."}],"operationID":[{"type":"string","description":"Operation UUID."}],"status":[{"type":"string","description":"Current operation state."}]},"description":"Machine connection fields on success, or an error body on failure. Accepts `object` or `object` or `object` ."}]}}],"description":"Ordered child results; a failed child has its own error response.","required":true}]}}],"examples":{"example":{"value":{"operationID":"\u003cstring>","snapshotID":"\u003cstring>","capture":{"sourcePreserved":true,"sourceBilling":"\u003cstring>","capturedAtMs":123,"freezeNanos":123,"sourceResumed":true,"timing":{"incremental":true,"dirtyMemoryBytes":123,"totalNanos":123,"pauseNanos":123,"dumpNanos":123,"diskReflinkNanos":123,"adoptNanos":123,"cleanupNanos":123,"resumeNanos":123,"publicationNanos":123}},"status":"\u003cstring>","results":[{"index":123,"status":123,"operationID":"\u003cstring>","response":{"alias":"\u003cstring>","clientID":"\u003cstring>","domain":{},"envdAccessToken":"\u003cstring>","envdVersion":"\u003cstring>","grace_deadline":{},"idle_timeout":{},"kind":"\u003cstring>","last_activity":{},"machine_state":"\u003cstring>","paused_at":{},"sandboxID":"\u003cstring>","templateID":"\u003cstring>","trafficAccessToken":{},"wake_reason":{},"warnings":[{}],"code":123,"message":"\u003cstring>","error_code":"\u003cstring>","limit":{"limit":"\u003cstring>","maximum":123,"usage":123,"next_action":"\u003cstring>","reset_at":123},"operationID":"\u003cstring>","status":"\u003cstring>"}}]}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"bead","siteName":"bead","title":"Fork a machine - bead","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T23:33:13.516Z","originalFileLocation":"api-reference/endpoints/post-sandboxes-id-fork.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Capture a running machine and create ordered children from its memory snapshot.\">\u003cmeta data-mint-head name=\"application-name\" content=\"bead\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Fork a machine - bead\">\u003cmeta data-mint-head property=\"og:description\" content=\"Capture a running machine and create ordered children from its memory snapshot.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"bead\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bead.mintlify.site/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Fork+a+machine\u0026amp;description=Capture+a+running+machine+and+create+ordered+children+from+its+memory+snapshot.\u0026amp;theme=9a5935325eff0f99c973e9ca\u0026amp;signature=b3c2cf5f84006aeab06206532b632022df813e8e118d97bc223ebabef46d91f4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Fork a machine - bead\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Capture a running machine and create ordered children from its memory snapshot.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bead.mintlify.site/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Fork+a+machine\u0026amp;description=Capture+a+running+machine+and+create+ordered+children+from+its+memory+snapshot.\u0026amp;theme=9a5935325eff0f99c973e9ca\u0026amp;signature=b3c2cf5f84006aeab06206532b632022df813e8e118d97bc223ebabef46d91f4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/bead/zXj6o7lskazJJaOS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"bead\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2f5bea\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoints/post-sandboxes-id-fork.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.bead.run/#organization\",\"name\":\"bead\",\"url\":\"https://docs.bead.run\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/bead/7Pxa91TEzFoZEuvc/logo/lockup-light.png?fit=max\u0026auto=format\u0026n=7Pxa91TEzFoZEuvc\u0026q=85\u0026s=4d9c8c2e9c62621757663297696c959f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.bead.run#website\",\"name\":\"bead\",\"url\":\"https://docs.bead.run\",\"publisher\":{\"@id\":\"https://docs.bead.run/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork#webpage\",\"url\":\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork\",\"name\":\"Fork a machine\",\"description\":\"Capture a running machine and create ordered children from its memory snapshot.\",\"dateModified\":\"2026-11-12T23:33:13.516Z\",\"isPartOf\":{\"@id\":\"https://docs.bead.run#website\"},\"breadcrumb\":{\"@id\":\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.bead.run/api-reference/endpoints/get-credential-profiles\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fork a machine\",\"item\":\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork#apireference\",\"headline\":\"Fork a machine\",\"name\":\"Fork a machine\",\"description\":\"Capture a running machine and create ordered children from its memory snapshot.\",\"url\":\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork\",\"mainEntityOfPage\":{\"@id\":\"https://docs.bead.run/api-reference/endpoints/post-sandboxes-id-fork#webpage\"},\"dateModified\":\"2026-11-12T23:33:13.516Z\",\"keywords\":\"bead fork a machine endpoint\",\"publisher\":{\"@id\":\"https://docs.bead.run/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.bead.run#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"bead\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"bead\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoints/post-sandboxes-id-fork.md","siteName":"bead","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/platform/estimates"}]},{"tab":"CLI reference","pages":[{"title":"CLI reference","href":"/cli/overview"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/python/quickstart"}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/connect"}]},{"tab":"API reference","groups":[{"group":"Start here","pages":[{"title":"API overview","href":"/api-reference/introduction"},{"title":"Authentication","sidebarTitle":"API authentication","href":"/api-reference/authentication"}]},{"group":"Endpoints","pages":[{"title":"List credential profiles","api":"GET https://api.bead.run/credential-profiles","href":"/api-reference/endpoints/get-credential-profiles"},{"title":"Delete a credential profile","api":"DELETE https://api.bead.run/credential-profiles/{id}","href":"/api-reference/endpoints/delete-credential-profiles-id"},{"title":"Save a credential profile","api":"PUT https://api.bead.run/credential-profiles/{id}","href":"/api-reference/endpoints/put-credential-profiles-id"},{"title":"Revoke a credential profile","api":"POST https://api.bead.run/credential-profiles/{id}/revoke","href":"/api-reference/endpoints/post-credential-profiles-id-revoke"},{"title":"List default templates","api":"GET https://api.bead.run/default-templates","href":"/api-reference/endpoints/get-default-templates"},{"title":"Get fork progress","api":"GET https://api.bead.run/forks/{id}","href":"/api-reference/endpoints/get-forks-id"},{"title":"Get deletion progress","api":"GET https://api.bead.run/operations/{id}","href":"/api-reference/endpoints/get-operations-id"},{"title":"List running machines","api":"GET https://api.bead.run/sandboxes","href":"/api-reference/endpoints/get-sandboxes"},{"title":"Create a machine (legacy)","api":"POST https://api.bead.run/sandboxes","href":"/api-reference/endpoints/post-sandboxes"},{"title":"Get conversation state","api":"GET https://api.bead.run/sandboxes/{id}/conversation","href":"/api-reference/endpoints/get-sandboxes-id-conversation"},{"title":"Get machine cost","api":"GET https://api.bead.run/sandboxes/{id}/cost","href":"/api-reference/endpoints/get-sandboxes-id-cost"},{"title":"Read agent events","description":"Read a cursor page of native agent events for a machine conversation.","api":"GET https://api.bead.run/sandboxes/{id}/events","href":"/api-reference/endpoints/get-sandboxes-id-events"},{"title":"Fork a machine","api":"POST https://api.bead.run/sandboxes/{id}/fork","href":"/api-reference/endpoints/post-sandboxes-id-fork"},{"title":"Send an agent prompt","description":"Queue a prompt in a machine conversation with an optional credential profile.","api":"POST https://api.bead.run/sandboxes/{id}/prompt","href":"/api-reference/endpoints/post-sandboxes-id-prompt"},{"title":"Capture a snapshot","api":"POST https://api.bead.run/sandboxes/{id}/snapshots","href":"/api-reference/endpoints/post-sandboxes-id-snapshots"},{"title":"Delete a machine","api":"DELETE https://api.bead.run/sandboxes/{sandboxID}","href":"/api-reference/endpoints/delete-sandboxes-sandboxid"},{"title":"Get machine details","api":"GET https://api.bead.run/sandboxes/{sandboxID}","href":"/api-reference/endpoints/get-sandboxes-sandboxid"},{"title":"Connect to a machine (legacy)","api":"POST https://api.bead.run/sandboxes/{sandboxID}/connect","href":"/api-reference/endpoints/post-sandboxes-sandboxid-connect"},{"title":"Pause a machine","api":"POST https://api.bead.run/sandboxes/{sandboxID}/pause","href":"/api-reference/endpoints/post-sandboxes-sandboxid-pause"},{"title":"Resume a machine","api":"POST https://api.bead.run/sandboxes/{sandboxID}/resume","href":"/api-reference/endpoints/post-sandboxes-sandboxid-resume"},{"title":"Set machine timeout","api":"POST https://api.bead.run/sandboxes/{sandboxID}/timeout","href":"/api-reference/endpoints/post-sandboxes-sandboxid-timeout"},{"title":"Delete a snapshot","api":"DELETE https://api.bead.run/snapshots/{id}","href":"/api-reference/endpoints/delete-snapshots-id"},{"title":"Get snapshot details","api":"GET https://api.bead.run/snapshots/{id}","href":"/api-reference/endpoints/get-snapshots-id"},{"title":"Set snapshot retention","api":"POST https://api.bead.run/snapshots/{id}/extend","href":"/api-reference/endpoints/post-snapshots-id-extend"},{"title":"Start a swarm","api":"POST https://api.bead.run/swarms","href":"/api-reference/endpoints/post-swarms"},{"title":"Get swarm progress","api":"GET https://api.bead.run/swarms/{id}","href":"/api-reference/endpoints/get-swarms-id"},{"title":"Cancel a swarm","api":"POST https://api.bead.run/swarms/{id}/cancel","href":"/api-reference/endpoints/post-swarms-id-cancel"},{"title":"Download swarm results","api":"GET https://api.bead.run/swarms/{id}/results","href":"/api-reference/endpoints/get-swarms-id-results"},{"title":"List templates","api":"GET https://api.bead.run/templates","href":"/api-reference/endpoints/get-templates"},{"title":"Read account limits","api":"GET https://api.bead.run/v1/limits","href":"/api-reference/endpoints/get-v1-limits"},{"title":"Read pricing","api":"GET https://api.bead.run/v1/pricing","href":"/api-reference/endpoints/get-v1-pricing"},{"title":"Estimate machine cost","api":"POST https://api.bead.run/v1/pricing/estimate","href":"/api-reference/endpoints/post-v1-pricing-estimate"},{"title":"List machines","api":"GET https://api.bead.run/v2/sandboxes","href":"/api-reference/endpoints/get-v2-sandboxes"},{"title":"Create a machine","api":"POST https://api.bead.run/v2/sandboxes","href":"/api-reference/endpoints/post-v2-sandboxes"},{"title":"Create a fleet","api":"POST https://api.bead.run/v2/sandboxes/fleet","href":"/api-reference/endpoints/post-v2-sandboxes-fleet"},{"title":"Get fleet results","api":"GET https://api.bead.run/v2/sandboxes/fleets/{id}","href":"/api-reference/endpoints/get-v2-sandboxes-fleets-id"},{"title":"Connect to a machine","api":"POST https://api.bead.run/v2/sandboxes/{sandboxID}/connect","href":"/api-reference/endpoints/post-v2-sandboxes-sandboxid-connect"},{"title":"List templates with pagination","api":"GET https://api.bead.run/v2/templates","href":"/api-reference/endpoints/get-v2-templates"}]}]}]},"basePath":"","title":"Fork a machine - bead","buildId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","deploymentId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","dynamics":["c2aa737661","b0f84f53ff","2b790eda92"],"chunks":["OpenApiReferenceProvider-DDP9JXtj.js","utils-8yQyvEtx.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CBCFR8Sn.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-rQaXkUHa.js","snippetPresets-J5KpBTgV.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","Page-DTNSD-0M.js","ApiExamples-BVxVH4Cj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BxdQ2vIi.js","shallow-BjV2tFiD.js","getApiPlaygroundDisplay-C_55tL4O.js","CodeSnippet-C0JpiCOC.js","CodeSnippets-w9Ps7djG.js","getPastedJson-BDfB-H8d.js","icon-g-kUkkO9.js","MethodPill-v4l6fq0h.js","DuplicateIcon-CvLo-CfU.js","createIcon-165clrrV.js","DynamicMarkdown-D3RQ-fEj.js","SectionHeading-vvo-3yLf.js","axios-vUo_bRtp.js"]}