Mental model
Core nouns
Tenant
Tenant
An isolated account. All artifacts, API keys, and usage belong to exactly one tenant. Created automatically when you sign up. Think of it as your project or team.
Artifact
Artifact
The core object. A single uploaded file with metadata. Has a stable ID (
art_ + 16 alphanumeric chars), a filename, content type, metadata, and belongs to a tenant. Every upload creates a new artifact — no implicit versioning.Session
Session
An optional, user-defined string grouping artifacts from the same run or workflow. Example:
"pipeline_run_42". Not managed by Artifacta — just a label. Sessions can be sealed to prevent late uploads.Agent ID
Agent ID
An optional, user-defined string identifying which agent produced an artifact. Example:
"earnings_analyst". Just a label — not managed server-side.Metadata
Metadata
A JSON object of key-value pairs attached at upload time. Max 8 KB. Keys must match
^[a-zA-Z][a-zA-Z0-9_-]{0,63}$ — no dots allowed. Filterable via the API (one key-value exact match per query).Content hash
Content hash
SHA-256 hash of file contents. Used for blob-level deduplication within a tenant. Two artifacts with the same content share one blob in storage — invisible to you, saves space.
TTL
TTL
Time-to-live. Default: 30 days. Can be overridden per artifact (
--ttl 7d, --ttl 90d, --ttl never). Can be extended via extend-ttl. The only mutable field on an artifact.Download link
Download link
A temporary, unauthenticated URL (
https://dl.artifacta.dev/lnk_xxx) for sharing artifacts with humans. Default: 7 days. Max: 30 days.Key design decisions
Every upload creates a new artifact. Uploading
report.pdf twice produces two distinct artifacts with two IDs. No implicit versioning.Artifact content and metadata are immutable. Once uploaded, you cannot change content, filename, or metadata. To correct something, upload a new artifact. Exception:
expires_at is mutable via extend-ttl.Sessions are labels, not managed objects. There is no
POST /v1/sessions. A session exists when at least one artifact references that session_id. Sealing is the only explicit session operation.Artifact lifecycle
- Soft delete:
DELETEsetsdeleted_at. Artifact disappears from listings and downloads immediately. - Hard delete: Background job removes the Postgres row and R2 blob 30 days after soft delete.
- Expiration: Artifacts past their
expires_atreturn410 Gone. Garbage collected automatically.
Deduplication
Two separate mechanisms:| Layer | Mechanism | What it does |
|---|---|---|
| Blob storage | Content-hash (SHA-256) per tenant | Two artifacts with identical content share one blob in R2. Saves storage. Invisible to you. |
| API | Idempotency key (24h TTL) | Same Idempotency-Key header within 24h returns the original response. No content comparison. Prevents duplicate artifacts on retry. |