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

# Memories

> Photo gallery, BIB and selfie search, video clipping, and download endpoints

## Overview

The Memories endpoints cover everything you need to render a participant's gallery of photos and videos, run searches, generate personalised video clips, and produce presigned download links. All endpoints are event-scoped and require an `X-API-Key` header — see [Conventions](/api-reference/conventions) for the shared response envelope and identifier rules.

The endpoints surface four 9Pic AI products through the API:

| Product           | What it does                                                   | Endpoint                                                                                               |
| ----------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| **9Pic BibTrack** | Marathon BIB number recognition.                               | [BIB Search](/api-reference/bib-search)                                                                |
| **9Pic FaceFind** | AI face recognition photo search.                              | [Face Search](/api-reference/face-search)                                                              |
| **9Pic Motion**   | Selfie + BIB-driven video clipping.                            | [Video Clipping Search](/api-reference/video-clipping-search)                                          |
| **9Pic Stamp**    | Watermarked previews; originals are unwatermarked on download. | [All Photos](/api-reference/all-photos), [Download Originals](/api-reference/download-original-photos) |

## Endpoints

<CardGroup cols={2}>
  <Card title="All Photos" icon="images" href="/api-reference/all-photos">
    `GET /event/{event_id}/images` — full paginated photo gallery for an event, ordered by capture timestamp.
  </Card>

  <Card title="BIB Search" icon="hashtag" href="/api-reference/bib-search">
    `GET /event/{event_id}/bibs/{bib}` — photos tagged with a participant's BIB number, powered by **9Pic BibTrack**.
  </Card>

  <Card title="Face Search" icon="user-magnifying-glass" href="/api-reference/face-search">
    `POST /event/{event_id}/faces` — upload a selfie and get matching photos via **9Pic FaceFind**. Reuse the returned `request_id` for cached pagination and downloads.
  </Card>

  <Card title="Photo Timeline" icon="clock" href="/api-reference/photo-timeline">
    `GET /event/{event_id}/timeline/days` and `GET /event/{event_id}/timeline/images` — browse photos by capture time with day/hour buckets and windowed pagination.
  </Card>

  <Card title="Video Clipping Search" icon="film" href="/api-reference/video-clipping-search">
    `POST /event/{event_id}/video-clipping/search-by-selfie` — async **9Pic Motion** pipeline that returns short MP4 clips of moments where the participant appears.
  </Card>

  <Card title="Download Originals" icon="cloud-arrow-down" href="/api-reference/download-original-photos">
    `POST /event/{event_id}/original-photos` — presigned URLs for unwatermarked originals, keyed by BIB or selfie `request_id`.
  </Card>
</CardGroup>

## Recommended Flow

1. Confirm the event has the right discovery features enabled with [Event Details](/api-reference/event-details).
2. Render the gallery with [All Photos](/api-reference/all-photos).
3. Offer [BIB Search](/api-reference/bib-search) (9Pic BibTrack) for runners who know their bib, and [Face Search](/api-reference/face-search) (9Pic FaceFind) for selfie-based discovery.
4. Optionally start [Video Clipping Search](/api-reference/video-clipping-search) (9Pic Motion) using the same `request_id` returned by Face Search to power photo *and* video discovery from a single selfie upload.
5. When the participant is ready to download, hand the `request_id` (with `method: "selfie"`) or BIB number (with `method: "bib"`) to [Download Originals](/api-reference/download-original-photos).
