# Getting started

Four steps, all in the app at `/app` or with the command line.

## 1. An organization

Sign in and create an organization, or pick one with the switcher in the top
bar. Everything in Artifacts belongs to one organization: its connections,
locations, artifacts and API keys. Every member sees all of it.

## 2. A fallback location

An organization takes writes once it has a **fallback**: the location every
write goes to when nothing nearer matches. Any S3 endpoint works, Tigris or R2
for example; so does a bucket the app creates in a connected cloud.

- **Locations → Add an S3 endpoint**, tick _fallback_. See
  [S3 endpoints](https://artifacts.041.io/docs/s3-endpoints.md).
- Or **Connections → Connect AWS, GCP or Azure**, run the generated script,
  paste back what it prints, then **Locations → Create a bucket**. See
  [Connecting clouds](https://artifacts.041.io/docs/connecting-clouds.md).

Add a location in each region your GPUs run in, and writes from there stay in
the region. See [Locations and placement](https://artifacts.041.io/docs/placement.md).

## 3. An API key

**API keys → Create**. The secret is shown once. Boxes and scripts send it as a
Bearer token; the crate and SexpGPU read it from `O41_ARTIFACTS_API_KEY`.

```bash
export O41_ARTIFACTS_API_KEY=ak_…
```

## 4. Point a run at o41://

> SexpGPU takes `o41://` from its release with o41-checkpoint, which is in
> review. Until then, use the [o41-checkpoint](https://artifacts.041.io/docs/o41-checkpoint.md) crate, the
> [CLI](https://artifacts.041.io/docs/cli.md) or the [HTTP API](https://artifacts.041.io/docs/api.md).

```bash
SEXPGPU_CHECKPOINT_DIR=o41://experiments/run-1234 \
  sexpgpu run train.sx --resume latest
```

The first launch finds nothing and starts fresh; every relaunch after a
preemption continues from the latest checkpoint, wherever it lands. See
[Checkpointing a run](https://artifacts.041.io/docs/checkpointing.md).

Or with plain HTTP, from anything that speaks it:

```bash
curl -H "Authorization: Bearer $O41_ARTIFACTS_API_KEY" \
  "https://artifacts.041.io/api/v1/artifacts/list?under=experiments/"
```

---

Artifacts by 041 documentation. Every page: https://artifacts.041.io/llms.txt
