HTTP API

Checkpoints and resume

15 routes your API key can call. Each says who may call it; every example assumes KEY is your API key. What only the dashboard does (signing in, making API keys, connecting accounts) isn't listed here: it's in the full OpenAPI spec.

POST/v1/workspaces/{wid}/sandboxes/{id}/checkpoints

Checkpoint a running sandbox, so its task can resume on any provider

People and API keys

Answers 202 at once with the checkpoint queued; a worker then captures it. Follow it on …/events or poll GET …/checkpoints/{ckp} until status is stored or failed. It saves the files under root (by default /workspace, else the home folder) and leaves out folders that can be rebuilt (node_modules, .venv, venv, __pycache__, .pytest_cache, .mypy_cache, .tox, target, .gradle, .next, .cache, and .git/objects over 256 MiB) plus anything in exclude; what was left out is listed in excluded. Files are copied one after another, not at one instant, so pause writes while it runs; files still changing are listed in changed. Running programs, memory and secrets are never saved. After a workspace's first checkpoint only pieces of files it doesn't already hold are sent. One checkpoint or resume runs per sandbox at a time: another is 409. Idempotency-Key works as for creating a sandbox. Dependency folders that are left out but have a lockfile next to them (node_modules, .venv) are saved to the workspace's dependency cache, once per lockfile, path, platform and runtime; they are listed in cached.

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
idInpathTypestringAbout
Idempotency-Key?InheaderTypestringAbout

Body

  • rootstring

    Absolute folder, not /; leave out for /workspace, or the home folder when there is none

  • excludestring[]

    More to leave out: a name ("data", "*.log") anywhere, or a path from root ("logs/old")

  • recipeRecipe

    How to rebuild the environment on resume; checkpoints keep the sandbox's unless given their own

    • imagestring | null

      Kept, not yet used: no provider starts from an image through Annex yet

    • setupstring[]

      Run in order on resume before the files come back, e.g. "apt-get install -y ffmpeg"

    • startstring | null

      Started after the files are back and left running, e.g. "npm run dev"

  • notestring

    Where the work stands; kept in the task's journal

Answer · 200

  • checkpointCheckpointrequired
    • idstring
    • taskstring
    • sandboxstring
    • status"queued" | "capturing" | "stored" | "failed"
    • rootstring | null

      The folder saved

    • excludedstring[]

      Left out to rebuild, relative to root (at most 1000)

    • changedstring[]

      Files still changing while they were copied

    • recipeRecipe

      How to rebuild the environment on resume; checkpoints keep the sandbox's unless given their own

    • notestring | null
    • filesinteger
    • bytes_totalinteger

      Bytes in the files saved

    • bytes_newinteger

      Bytes stored for this checkpoint; the rest was already stored

    • chunks_newinteger
    • cachedCacheHit[]

      Dependency folders saved to the cache (new) or found there already

    • created_atstring
    • finished_atstring | null
    • errorstring | null
    • autoboolean

      Taken by Annex's automatic schedule (auto_checkpoint_minutes), not asked for

Terminal
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/checkpoints' \
  -H 'Authorization: Bearer anx_live_…' \
  -H 'Content-Type: application/json' \
  -d '{"root":"…","exclude":["…"]}'
GET/v1/workspaces/{wid}/sandboxes/{id}/checkpoints

One page of the sandbox's checkpoints, newest first

People and API keys

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
idInpathTypestringAbout
page?InqueryTypeintegerAboutA missing or invalid page is 1
perPage?InqueryTypeintegerAboutHeld between 1 and 100

Answer · 200

  • checkpointsCheckpoint[]required
    • idstring
    • taskstring
    • sandboxstring
    • status"queued" | "capturing" | "stored" | "failed"
    • rootstring | null

      The folder saved

    • excludedstring[]

      Left out to rebuild, relative to root (at most 1000)

    • changedstring[]

      Files still changing while they were copied

    • recipeRecipe

      How to rebuild the environment on resume; checkpoints keep the sandbox's unless given their own

    • notestring | null
    • filesinteger
    • bytes_totalinteger

      Bytes in the files saved

    • bytes_newinteger

      Bytes stored for this checkpoint; the rest was already stored

    • chunks_newinteger
    • cachedCacheHit[]

      Dependency folders saved to the cache (new) or found there already

    • created_atstring
    • finished_atstring | null
    • errorstring | null
    • autoboolean

      Taken by Annex's automatic schedule (auto_checkpoint_minutes), not asked for

  • metaMetarequired
    • pageinteger
    • totalinteger

      Items matching, across all pages

    • pageCountinteger

      ceil(total / perPage)

    • perPageinteger
Terminal
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/checkpoints' \
  -H 'Authorization: Bearer anx_live_…'
GET/v1/workspaces/{wid}/sandboxes/{id}/checkpoints/{ckp}

People and API keys

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
idInpathTypestringAbout
ckpInpathTypestringAboutCheckpoint id

Answer · 200

  • checkpointCheckpointrequired
    • idstring
    • taskstring
    • sandboxstring
    • status"queued" | "capturing" | "stored" | "failed"
    • rootstring | null

      The folder saved

    • excludedstring[]

      Left out to rebuild, relative to root (at most 1000)

    • changedstring[]

      Files still changing while they were copied

    • recipeRecipe

      How to rebuild the environment on resume; checkpoints keep the sandbox's unless given their own

    • notestring | null
    • filesinteger
    • bytes_totalinteger

      Bytes in the files saved

    • bytes_newinteger

      Bytes stored for this checkpoint; the rest was already stored

    • chunks_newinteger
    • cachedCacheHit[]

      Dependency folders saved to the cache (new) or found there already

    • created_atstring
    • finished_atstring | null
    • errorstring | null
    • autoboolean

      Taken by Annex's automatic schedule (auto_checkpoint_minutes), not asked for

Terminal
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/checkpoints/ckp' \
  -H 'Authorization: Bearer anx_live_…'
GET/v1/workspaces/{wid}/sandboxes/{id}/checkpoints/{ckp}/events

A checkpoint's progress as Server-Sent Events

People and API keys

"progress" events ({stage, files, bytes, chunks}; stages queued, capturing, scanning, storing), then one "done" or "failed" event whose data is the Checkpoint as it ended, and the stream closes. A finished checkpoint sends its last event at once. Lines starting with ":" are keep-alives. Reconnect with Last-Event-ID to resume after the last event you got.

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
idInpathTypestringAbout
ckpInpathTypestringAboutCheckpoint id
Last-Event-ID?InheaderTypestringAbout

Answer · 200

event: progress, data: {"stage":"capturing","files":0,"bytes":0,"chunks":0} … event: done, data: {Checkpoint}

Terminal
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/checkpoints/ckp/events' \
  -H 'Authorization: Bearer anx_live_…'
POST/v1/workspaces/{wid}/checkpoints/{ckp}/resume

Start a stored checkpoint on a new sandbox, on any provider

People and API keys

Answers 202 at once with the resume queued; follow it on /v1/workspaces/{wid}/resumes/{rsm}/events or poll it. A worker starts a new sandbox routed like POST …/sandboxes (failover as usual), runs the recipe's setup commands, copies the files back and checks each piece against its hash, then runs the recipe's start command. The new sandbox joins the checkpoint's task. It costs money from when it starts until it is stopped; a resume that fails stops it. Send an Idempotency-Key: a retry with it never starts a second machine. 409 if the checkpoint isn't stored; 422 no_provider if no connected provider fits.

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
ckpInpathTypestringAboutCheckpoint id
Idempotency-Key?InheaderTypestringAbout

Body

  • routestring

    "cheapest", "fastest", or a provider name; left out, the workspace's default_route (422 when there is none)

  • regionstring

    One of us-east, us-west, eu-west, eu-central, ap-southeast, ap-northeast, sa-east, us-california, us-chicago, us-dallas, ca-toronto, eu-london, eu-paris, eu-amsterdam, eu-stockholm, eu-helsinki, eu-milan, eu-madrid, me-dubai, af-johannesburg, ap-mumbai, ap-hongkong, ap-seoul, ap-sydney, or auto (Cloudflare's: it places the container itself) (422 validation_error otherwise); left out for anywhere. A region nothing on the route serves is 422 no_provider, saying so

  • vcpuinteger

    The checkpointed sandbox's when left out

  • memory_gibinteger

    The checkpointed sandbox's when left out

  • regionsAllowRegions

    Only these regions (Annex region codes, or areas: us, americas, eu, europe, apac, me, af, each any region in it, including ones added later), within the workspace's allowed_regions (422 validation_error naming the workspace's list otherwise). An account serving several is asked for the first listed; an account that says nowhere where it runs is left out. A region given too must be one of them. Left out: whatever the workspace allows. Nothing connected left: 422 no_provider naming the lists. A resume left without them keeps the checkpointed sandbox's, and carrying a lost sandbox on keeps its own.

  • providersAllowProviders

    Only these providers (such as selfhost, daytona), within the workspace's allowed_providers. Left out, whatever the workspace allows.

  • ignoreIgnore

    Providers never to use for this one, added to the workspace's denied_providers (never removed from it). It wins over route, order and providers.

  • orderOrder

    Providers to try first, in this order; the rest follow as the route ranks them. Left out, the workspace's default_order. 422 while the workspace's route is locked.

  • fallbacksboolean

    false: try only the first account that fits, with no failover (the error says the others weren't tried); true or left out: move on when one can't start it. 422 while the workspace's route is locked

Answer · 200

  • resumeResumerequired
    • idstring
    • checkpointstring
    • taskstring
    • sandboxstring | null

      The new sandbox

    • status"queued" | "restoring" | "ready" | "failed"
    • routestring
    • regionstring | null
    • vcpuinteger
    • memory_gibinteger
    • filesinteger
    • bytesinteger
    • restored_from_cacheCacheHit[]

      Dependency folders put back from the cache

    • cache_missesCacheMiss[]

      Dependency folders the cache had no exact match for: reinstall them

    • memoriesobject[]

      Up to 5 memories of the task and workspace, closest first, recalled when it was ready (searched with the checkpoint's note, else the task's newest notes). Empty without a memory connection, or if Supermemory failed or took over 5 s: memory never holds up a resume.

    • created_atstring
    • finished_atstring | null
    • errorstring | null
Terminal
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/checkpoints/ckp/resume' \
  -H 'Authorization: Bearer anx_live_…' \
  -H 'Content-Type: application/json' \
  -d '{"route":"…","region":"…"}'
DELETE/v1/workspaces/{wid}/checkpoints/{ckp}

Delete a stored or failed checkpoint

People and API keys

Its stored pieces are deleted about an hour later, unless another checkpoint of the workspace holds them too. 409 while it is still being made.

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
ckpInpathTypestringAboutCheckpoint id

Answer · 204

Deleted

Terminal
curl -X DELETE 'https://annex.eversonder.com/v1/workspaces/wsp_…/checkpoints/ckp' \
  -H 'Authorization: Bearer anx_live_…'
GET/v1/workspaces/{wid}/resumes/{rsm}

People and API keys

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
rsmInpathTypestringAboutResume id

Answer · 200

  • resumeResumerequired
    • idstring
    • checkpointstring
    • taskstring
    • sandboxstring | null

      The new sandbox

    • status"queued" | "restoring" | "ready" | "failed"
    • routestring
    • regionstring | null
    • vcpuinteger
    • memory_gibinteger
    • filesinteger
    • bytesinteger
    • restored_from_cacheCacheHit[]

      Dependency folders put back from the cache

    • cache_missesCacheMiss[]

      Dependency folders the cache had no exact match for: reinstall them

    • memoriesobject[]

      Up to 5 memories of the task and workspace, closest first, recalled when it was ready (searched with the checkpoint's note, else the task's newest notes). Empty without a memory connection, or if Supermemory failed or took over 5 s: memory never holds up a resume.

    • created_atstring
    • finished_atstring | null
    • errorstring | null
Terminal
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/resumes/rsm' \
  -H 'Authorization: Bearer anx_live_…'
GET/v1/workspaces/{wid}/resumes/{rsm}/events

A resume's progress as Server-Sent Events

People and API keys

Like a checkpoint's events. Stages: queued, starting a sandbox, setup N of M, uploading, unpacking, "restoring <folder> from the cache"; then "done" or "failed" with the Resume.

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
rsmInpathTypestringAboutResume id
Last-Event-ID?InheaderTypestringAbout

Answer · 200

event: progress … event: done, data: {Resume}

Terminal
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/resumes/rsm/events' \
  -H 'Authorization: Bearer anx_live_…'
GET/v1/workspaces/{wid}/tasks/{tid}/checkpoints

One page of a task's checkpoints, from all its sandboxes, newest first

People and API keys

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
tidInpathTypestringAboutTask id
page?InqueryTypeintegerAboutA missing or invalid page is 1
perPage?InqueryTypeintegerAboutHeld between 1 and 100

Answer · 200

  • checkpointsCheckpoint[]required
    • idstring
    • taskstring
    • sandboxstring
    • status"queued" | "capturing" | "stored" | "failed"
    • rootstring | null

      The folder saved

    • excludedstring[]

      Left out to rebuild, relative to root (at most 1000)

    • changedstring[]

      Files still changing while they were copied

    • recipeRecipe

      How to rebuild the environment on resume; checkpoints keep the sandbox's unless given their own

    • notestring | null
    • filesinteger
    • bytes_totalinteger

      Bytes in the files saved

    • bytes_newinteger

      Bytes stored for this checkpoint; the rest was already stored

    • chunks_newinteger
    • cachedCacheHit[]

      Dependency folders saved to the cache (new) or found there already

    • created_atstring
    • finished_atstring | null
    • errorstring | null
    • autoboolean

      Taken by Annex's automatic schedule (auto_checkpoint_minutes), not asked for

  • metaMetarequired
    • pageinteger
    • totalinteger

      Items matching, across all pages

    • pageCountinteger

      ceil(total / perPage)

    • perPageinteger
Terminal
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/tasks/tid/checkpoints' \
  -H 'Authorization: Bearer anx_live_…'
POST/v1/workspaces/{wid}/sandboxes/{id}/cache/save

Save a running sandbox's dependency folders to the workspace's cache

People and API keys

Answers 202 with a cache job; a worker then finds each lockfile under root (3 folders deep: package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockb → node_modules; uv.lock, poetry.lock, Pipfile.lock, requirements*.txt → .venv or venv) and saves each built folder not cached yet. The key is a sha256 of the lockfile, the folder's absolute path, the platform (os/arch, and musl) and what node --version or python3 --version says in the sandbox, so a different runtime or machine is a miss, never a wrong restore. Entries are sealed per workspace like checkpoints and share their stored pieces. A checkpoint does this on its own. One checkpoint, resume or cache job runs per sandbox at a time (409).

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
idInpathTypestringAbout

Body

  • rootstring

    Where to look; leave out for /workspace, or the home folder

Answer · 202

  • cache_jobCacheJobrequired
    • idstring
    • sandboxstring
    • kind"save" | "restore"
    • status"queued" | "capturing" | "stored" | "restoring" | "ready" | "failed"

      save: queued, capturing, stored; restore: queued, restoring, ready; or failed

    • cachedCacheHit[]
    • restored_from_cacheCacheHit[]
    • cache_missesCacheMiss[]
    • created_atstring
    • finished_atstring | null
    • errorstring | null
Terminal
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/cache/save' \
  -H 'Authorization: Bearer anx_live_…' \
  -H 'Content-Type: application/json' \
  -d '{"root":"…"}'
POST/v1/workspaces/{wid}/sandboxes/{id}/cache/restore

Put cached dependency folders back into a running sandbox

People and API keys

Like save, the other way: each lockfile whose folder is missing and has an exact cache match gets it back, checked byte for byte. A resume does this on its own. The job lists restored_from_cache and cache_misses (reinstall those, then save).

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
idInpathTypestringAbout

Body

  • rootstring

Answer · 202

  • cache_jobCacheJobrequired
    • idstring
    • sandboxstring
    • kind"save" | "restore"
    • status"queued" | "capturing" | "stored" | "restoring" | "ready" | "failed"

      save: queued, capturing, stored; restore: queued, restoring, ready; or failed

    • cachedCacheHit[]
    • restored_from_cacheCacheHit[]
    • cache_missesCacheMiss[]
    • created_atstring
    • finished_atstring | null
    • errorstring | null
Terminal
curl -X POST 'https://annex.eversonder.com/v1/workspaces/wsp_…/sandboxes/id/cache/restore' \
  -H 'Authorization: Bearer anx_live_…' \
  -H 'Content-Type: application/json' \
  -d '{"root":"…"}'
GET/v1/workspaces/{wid}/cache/jobs/{cid}

People and API keys

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
cidInpathTypestringAboutCache job id (cch_…)

Answer · 200

  • cache_jobCacheJobrequired
    • idstring
    • sandboxstring
    • kind"save" | "restore"
    • status"queued" | "capturing" | "stored" | "restoring" | "ready" | "failed"

      save: queued, capturing, stored; restore: queued, restoring, ready; or failed

    • cachedCacheHit[]
    • restored_from_cacheCacheHit[]
    • cache_missesCacheMiss[]
    • created_atstring
    • finished_atstring | null
    • errorstring | null
Terminal
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/cache/jobs/cid' \
  -H 'Authorization: Bearer anx_live_…'
GET/v1/workspaces/{wid}/cache/jobs/{cid}/events

A cache job's progress as Server-Sent Events, like a checkpoint's; ends with "done" or "failed" and the CacheJob

People and API keys

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
cidInpathTypestringAbout
Last-Event-ID?InheaderTypestringAbout

Answer · 200

event: progress … event: done, data: {CacheJob}

Terminal
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/cache/jobs/cid/events' \
  -H 'Authorization: Bearer anx_live_…'
GET/v1/workspaces/{wid}/cache

One page of the workspace's dependency cache, most recently used first

People and API keys

Each workspace keeps ANNEX_CACHE_MAX_BYTES of folders (10 GiB by default); past it the least recently used go first. Their stored pieces are deleted an hour later, and never one a checkpoint still needs.

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
page?InqueryTypeintegerAboutA missing or invalid page is 1
perPage?InqueryTypeintegerAboutHeld between 1 and 100

Answer · 200

  • cache_entriesCacheEntry[]required
    • keystring
    • pathstring

      The absolute folder

    • lockfilestring
    • platformstring
    • runtimestring

      "" when the runtime was not installed

    • filesinteger
    • bytesinteger

      File bytes; counted against the workspace cap (ANNEX_CACHE_MAX_BYTES, 10 GiB by default)

    • hitsinteger

      Restores from it

    • created_atstring
    • last_used_atstring

      Saved, found or restored; the least recently used go first past the cap

  • metaMetarequired
    • pageinteger
    • totalinteger

      Items matching, across all pages

    • pageCountinteger

      ceil(total / perPage)

    • perPageinteger
Terminal
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/cache' \
  -H 'Authorization: Bearer anx_live_…'
DELETE/v1/workspaces/{wid}/cache/{key}

Drop one cache entry now; the next save makes it again

People and API keys

ParameterInTypeAbout
widInpathTypestringAboutWorkspace id
keyInpathTypestringAbout

Answer · 204

Deleted

Terminal
curl -X DELETE 'https://annex.eversonder.com/v1/workspaces/wsp_…/cache/key' \
  -H 'Authorization: Bearer anx_live_…'