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

# Artifacts

> View metadata and download files referenced in an agent's event log

The event log stays lightweight because it never embeds file bytes. Whenever media enters the conversation — an image you attach to an input, a PDF a tool produces, a chart the model generates — the bytes are stored as an **artifact** (`art_…`) and the event carries a `media_ref` block pointing at it:

```json theme={null}
{ "type": "media_ref", "artifact_id": "art_z3jehcyd5n6a2bfgik7mv4qtrw" }
```

In the dashboard, artifacts appear as downloadable attachment chips on the conversation timeline; rendering your own timeline means resolving each `media_ref` with the two endpoints on this page.

```bash theme={null}
export BASE="$OMNARA_API/orgs/$ORG/projects/$PROJ"
export AGENT="agt_v4qtrwz3jehcyd5n6a2bfgik7m"
```

## Get artifact metadata

Fetch the descriptor first when you need to decide how to render or whether to download:

```bash theme={null}
curl "$BASE/agents/$AGENT/artifacts/art_z3jehcyd5n6a2bfgik7mv4qtrw" \
  -H "Authorization: Bearer $OMNARA_TOKEN"
```

```json theme={null}
{
  "id": "art_z3jehcyd5n6a2bfgik7mv4qtrw",
  "org_id": "org_k7mv4qtrwz3jehcyd5n6a2bfgi",
  "project_id": "proj_7mv4qtrwz3jehcyd5n6a2bfgik",
  "agent_id": "agt_v4qtrwz3jehcyd5n6a2bfgik7m",
  "content_type": "application/pdf",
  "filename": "eu-ai-act-summary.pdf",
  "digest": "sha256:9f2ab8…",
  "size_bytes": 482133,
  "created_at": "2026-08-03T19:15:40Z"
}
```

`digest` is a content hash — useful for caching and deduplication on your side: if you've already stored that digest, skip the download.

<Info>
  Full schema and playground: [Get artifact](/api-reference/endpoints/events/get-artifact).
</Info>

## Download the content

The content endpoint returns the raw bytes with the artifact's content type:

```bash theme={null}
curl -o eu-ai-act-summary.pdf \
  "$BASE/agents/$AGENT/artifacts/art_z3jehcyd5n6a2bfgik7mv4qtrw/content" \
  -H "Authorization: Bearer $OMNARA_TOKEN"
```

Content is immutable — the same artifact ID always yields the same bytes, so responses are safe to cache indefinitely.

<Info>
  Full schema and playground: [Get artifact content](/api-reference/endpoints/events/get-artifact-content).
</Info>

## Where artifacts come from

| Source                                                                                                                       | What happens                                                                 |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| Inline `media` block on an [input](/events/sending-input#attach-files-and-images)                                            | Persisted as an artifact; the stored event shows a `media_ref`.              |
| Inline `media` block on a [custom tool result](/api-reference/endpoints/agents/submit-a-result-for-a-ready-custom-tool-call) | Same conversion — submission accepts bytes, the timeline stores a reference. |
| Built-in tools that fetch or produce files                                                                                   | The tool result references the artifact.                                     |
| Model output with media                                                                                                      | The `model_output` event references it.                                      |

There's no endpoint to create an artifact directly — they exist only as a side effect of the conversation, which keeps every artifact traceable to the event that introduced it.

## Next

<CardGroup cols={2}>
  <Card title="Streaming events" icon="tower-broadcast" href="/events/streaming">
    Where media\_ref blocks appear in each event kind
  </Card>

  <Card title="Sending input" icon="paper-plane" href="/events/sending-input">
    Attach files to your messages
  </Card>
</CardGroup>
