# Artifacts by 041

> Checkpoints next to your GPUs, resumable anywhere. Your own buckets in AWS, GCP, Azure or any S3 endpoint, as one global store of versioned file sets. Every write lands in the writer's region.

Documentation: https://artifacts.041.io/docs/index.md. Every page on this site as markdown: https://artifacts.041.io/llms.txt.

## In numbers

- **$0** per GB written to a bucket in the box's region
- **≈ $2** to resume a 20 GB checkpoint across clouds
- **≈ $700** the same week of writes, sent out of the cloud

## Writes are the volume

| Where the writes go | Per GB | For the run |
|---|---|---|
| A bucket in the box's own region | $0 | $0 |
| Same cloud, another region | ≈ $0.02 | ≈ $130 |
| Out of the cloud: another cloud, Tigris, R2 | ≈ $0.08–0.12 | ≈ $550–800 |

One run: a 20 GB checkpoint, weights plus Adam state, every 30 minutes for a week on spot boxes. 336 checkpoints, about 6.7 TB written. One cross-cloud resume of the latest costs about $2; ten of them, $20.

## Checkpointing, the worked example

- **aws us-east-1**, step 100 … 500: Writes to S3 in us-east-1. Preempted.
- **gcp europe-west4**, step 510 … 900: Reads step 500 once, across clouds. Writes to GCS in europe-west4.
- **azure westeurope**, step 910 …: Reads step 900 once. Writes to Blob in westeurope.

```console
# From SexpGPU's release with o41-checkpoint, in review.
# The only change to a run: the location string.
$ export O41_ARTIFACTS_API_KEY=ak_…
$ SEXPGPU_CHECKPOINT_DIR=o41://experiments/run-1234 \
    sexpgpu run train.sx --resume latest
# Preempted; SkyPilot brings it back on GCP. Same command.
resumed step-00000500 from aws us-east-1 (cross-cloud)
saved step-00000510 to gcp europe-west4 (region)
```

## O41-CHECKPOINT · RUST

```rust
use o41_checkpoint::{open, step_name, Config};

let checkpoints =
    open("o41://experiments/run-1234", Config::from_env()?).await?;

// The latest, or None on an empty artifact, and the one writer.
let (resumed, mut writer) = checkpoints.resume().await?;
if let Some(at) = &resumed {
    let state = at.file("state.json")?.bytes().await?;
}

writer
    .save(&step_name(510), files, meta)  // lands in this box's region
    .await?;
```

## CLI · @O41/ARTIFACTS

```bash
npx @o41/artifacts login
npx @o41/artifacts ls experiments/
npx @o41/artifacts versions experiments/run-1234
npx @o41/artifacts get o41://experiments/run-1234/latest ./ckpt
```

## HTTP · ANY LANGUAGE

```bash
curl -H "Authorization: Bearer $O41_ARTIFACTS_API_KEY" \
  "https://artifacts.041.io/api/v1/versions/read?artifact=experiments/run-1234&version=latest&urls=1"
# → { "version": "step-00000900", "transfer": "cross-cloud",
#     "files": [{ "name": "params.safetensors", "url": "https://…" }] }
```

## Principles

- **Your buckets, your bill.** Bytes never pass through us. Boxes PUT and GET straight against S3, GCS, Azure Blob or any S3 endpoint with URLs signed for one object.
- **No cloud keys to leak.** Clouds connect by OIDC federation: the app is an issuer your account trusts for one subject. Revoking is deleting a role.
- **Training continues.** A region without a bucket writes to its cloud's default, then to your fallback, with a warning. A cache miss, never an error.
- **Self-describing buckets.** Every version ends with `_manifest.json` beside its files. Read your own bucket with your own keys if we are ever down.

## Start

Bring your buckets. Connect a cloud, pick a fallback, point a run at o41://. Questions: info@041.io
