Create an upload context for a job
Reserve a presigned upload for large bytes (over write_file's 4 MiB, up to 10 GiB): a job build context, or any input that exists only in your sandbox (a prepared dataset, an eval set, a wheel you built) headed for a node. Returns a context_id plus either a single PUT url or multipart part urls; tar a folder (tar -c . | zstd), upload the bytes STRAIGHT to object storage with curl -T (never through MCP), call finalize_context, then submit_job with context_id - or get_context for a download url to curl onto a node. One finalized upload serves both. The urls point at the object store's own hostname (currently fly.storage.tigris.dev), NOT the API's: an egress allowlist that only permits the API host 403s the PUT at your own proxy - allow the storage host too. For builds, tar determinism is yours: sorted paths and fixed mtimes hit the cache; a sloppy re-tar merely misses it. context_id composes with an inline context (inline overlays the tar, inline wins), so upload gigabytes once and iterate on the Dockerfile inline.
Request
- Base URL: https://autoresearch.sfcompute.com
- URL: https://autoresearch.sfcompute.com/preview/contexts
- Auth: HTTP bearer
Query parameters
Act in this workspace (its slug). Omitted: the token's bound workspace, then the organization's default. Never ambient - there is no switch-workspace mutation on this door.
Request body
Response
The capability's JSON result.
Changes
No recorded changes to this operation across all 1 revision of this API.