Repository navigation
Document custom images and the TypeScript SDK for sandboxes (backend#8563) - #61
Merged
Merged
Conversation
2 tasks done
ZharaskhanAman
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents sandbox custom images (deepinfra/backend#8735, part of deepinfra/backend#8563) and the TypeScript SDK on
sandboxes/overview.mdx.Merge after
deepinfra0.4.0 is on PyPI (deepinfra/deepinfra-python#25) and 2.3.0 is on npm (deepinfra/deepinfra-node#72): the page names those versions.Changes
imageparameter (Python, TypeScript, cURL), what an image must be (registries, amd64, 4 GiB compressed / 127 layers / 20 GB unpacked,/bin/sh), pinning to a digest at create, how it runs (root, noENTRYPOINT/CMD), first-start times and wait windows, and what happens when an image is refused (400), can't start (failed+fail_reason) or the registry is down (503).image,failReason,execStream(),AbortSignal). The Quickstart gets Python and TypeScript tabs.fail_reasonis now exposed by both SDKs (the warning said the Python SDK didn't have it)./workspaceis 20 GB, not "a couple GB"; filling it fails writes without stopping the sandbox.start()boots from the sandbox's image, not "the base image".400row for refused images, the custom-image503causes, and the SDK exceptions now cover both SDKs.imageon create and a fullGETresponse withimageandfail_reason. The catalog example no longer sends an API key, since the endpoint is public (checked: 200 without one). FAQ: "Can I use my own image?".Verification
Every changed example was run as written against
api.deepinfra.comon 2026-12-02, with the SDK branches from #25 and #72:execStream(), the large-script example, stop/start with/workspacekept, andtry/finally. All passed.image="python:3.12-slim":sb.imageprinteddocker.io/library/python:3.12-slim@sha256:…. An image without a shell raisedSandboxFailedErrorwith itsfail_reason."image": theGETresponse had exactly the fields and order shown.Supersedes #29.