> ## Documentation Index
> Fetch the complete documentation index at: https://aegean.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Public artifacts bucket — Cloudflare R2

> Where website-embedded videos and Rerun recordings live, and how to publish them.

The eaia website embeds public binary assets — Rerun `.rrd` recordings, manim mp4s, demo previews — from `https://artifacts.aegeanai.com`, a public Cloudflare R2 bucket (`auraison-artifacts`) with a custom domain binding.

## Canonical setup + automation

The full bucket setup (custom domain, CORS, Cloudflare Access bypass, API tokens) and the production upload helper live in the **auraison** repo. Don't re-derive them here.

* [Serve Rerun recordings publicly with Cloudflare R2](https://github.com/aegean-ai/auraison/blob/main/docs/management-plane/rerun-r2-public-viewer/index.mdx) — 8-step bucket setup
* `auraison/data-plane/lakehouse/artifacts.py` — `upload_artifact()` for lakehouse-registered, lineage-tracked uploads (archival MinIO + R2 + DuckLake catalog in one call)
* R2 credentials are in `auraison/data-plane/.env` as `R2_ENDPOINT`, `R2_ACCESS_KEY`, `R2_SECRET_KEY`, `R2_PUBLIC_DOMAIN`

For Cloudflare-aware Claude Code sessions, install the official skill package:

```
/plugin install cloudflare@cloudflare
```

That gives Claude the `cloudflare` and `wrangler` skills — covering R2 buckets, Workers, KV, D1, and the `wrangler r2 object put` upload path.

## One-off uploads of website media (manim mp4s, preview images)

For media that's purely a docs-site asset (no lakehouse lineage needed), use [wrangler](https://developers.cloudflare.com/workers/wrangler/) directly:

```bash theme={null}
wrangler r2 object put auraison-artifacts/manim/brownian-motion/BrownianMotion.mp4 \
  --file ./videos/BrownianMotion.mp4 \
  --content-type video/mp4 \
  --remote
```

The `--remote` flag is required to write to the real bucket (without it, wrangler writes to a local simulator).

### Key-naming convention

Public URL is `https://artifacts.aegeanai.com/<key>`. Keep the `<type>/<topic>/<filename>` shape:

| Prefix           | Purpose                    | Example key                                |
| ---------------- | -------------------------- | ------------------------------------------ |
| `rerun/<demo>/`  | Rerun recordings (`.rrd`)  | `rerun/visdrone/uav0000009_03358_v.rrd`    |
| `manim/<topic>/` | Manim mp4 outputs          | `manim/brownian-motion/BrownianMotion.mp4` |
| `demos/<demo>/`  | Static demo assets         | `demos/sports-analytics/clip-01.mp4`       |
| `images/<demo>/` | Demo thumbnails / previews | `images/sports-analytics/preview.jpg`      |

Lowercase, kebab-case for path segments. Filenames may follow the generator's convention (PascalCase manim Scene class names, etc.).

## Embedding in MDX

### Manim mp4

```mdx theme={null}
<video
  src="https://artifacts.aegeanai.com/manim/brownian-motion/BrownianMotion.mp4"
  controls
  loop
  muted
  playsInline
  width="100%"
  style={{ borderRadius: 8 }}
/>
```

`muted` + `playsInline` are required for any mobile-browser auto-play. Drop both for narrated full-frame demos.

### Rerun recording

```mdx theme={null}
<iframe
  src="https://app.rerun.io/version/0.29.2/index.html?url=https%3A%2F%2Fartifacts.aegeanai.com%2Frerun%2Fvisdrone%2Fuav0000009_03358_v.rrd"
  width="100%"
  height="600px"
  style={{ border: "none", borderRadius: 8 }}
  allow="fullscreen"
  loading="lazy"
/>
```

Pin the viewer version (`/version/0.29.2/`) to the Rerun SDK that wrote the recording — newer `.rrd` files won't load in older viewers (lz4 decode error). See the [auraison doc](https://github.com/aegean-ai/auraison/blob/main/docs/management-plane/rerun-r2-public-viewer/index.mdx) Step 7 for the exact symptom and fix.

## Cache invalidation

Wrangler defaults set R2 objects with a long max-age. Treat artifacts as **content-addressed**: re-rendering a manim scene should land under a *new* key (version suffix or new topic) rather than overwriting. The Cloudflare edge will keep stale copies of overwritten keys for hours-to-a-day. If you must overwrite, follow up with a cache purge from the Cloudflare dashboard or `wrangler cache purge`.

***

<Callout icon="pen-to-square" iconType="regular">
  [Edit this page on GitHub](https://github.com/aegean-ai/eaia/edit/main/src/products/auraison/r2-artifacts.mdx) or [file an issue](https://github.com/aegean-ai/eaia/issues/new/choose).
</Callout>
