Skip to content

Document custom images and the TypeScript SDK for sandboxes (backend#8563) - #61

Merged
ats3v merged 2 commits into
mainfrom
docs/sandboxes-custom-images
Dec 3, 2026
Merged

ats3v merged 2 commits into
mainfrom
docs/sandboxes-custom-images

Conversation

@ats3v

@ats3v ats3v commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Documents sandbox custom images (deepinfra/backend#8735, part of deepinfra/backend#8563) and the TypeScript SDK on sandboxes/overview.mdx.

Merge after deepinfra 0.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

  • New Custom images section: the image parameter (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, no ENTRYPOINT/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).
  • New TypeScript SDK section, taken from @mmilutinovic371's Document the TypeScript SDK's Sandbox support #29 and updated for 2.3.0 (image, failReason, execStream(), AbortSignal). The Quickstart gets Python and TypeScript tabs.
  • Corrections to existing text:
    • fail_reason is now exposed by both SDKs (the warning said the Python SDK didn't have it).
    • The disk outside /workspace is 20 GB, not "a couple GB"; filling it fails writes without stopping the sandbox.
    • Bandwidth: downloads into a sandbox 1 Gbit/s, uploads out 200 Mbit/s (was "200 Mbit/s each way").
    • start() boots from the sandbox's image, not "the base image".
  • Errors table: a 400 row for refused images, the custom-image 503 causes, and the SDK exceptions now cover both SDKs.
  • HTTP API: image on create and a full GET response with image and fail_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.com on 2026-12-02, with the SDK branches from #25 and #72:

  • TypeScript: the Quickstart tab, execStream(), the large-script example, stop/start with /workspace kept, and try/finally. All passed.
  • Python and TypeScript image="python:3.12-slim": sb.image printed docker.io/library/python:3.12-slim@sha256:…. An image without a shell raised SandboxFailedError with its fail_reason.
  • cURL create with "image": the GET response had exactly the fields and order shown.
  • cURL catalog with no key: 200 with the plan list.

Supersedes #29.

@ats3v ats3v mentioned this pull request Dec 2, 2026
2 tasks done
@ats3v
ats3v merged commit b6142d5 into main Dec 3, 2026
1 check passed
@ats3v
ats3v deleted the docs/sandboxes-custom-images branch December 3, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants