> ## 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, search, video clipping, downloads, and pipeline endpoints

## Overview

The Memories surface is the event-scoped photo and video API. Endpoints are grouped by use:

| Group | Use | Endpoints |
| - | - | - |
| **Browse Photos** | Full gallery, single image lookup, time-based browsing | [All Photos](/api-reference/all-photos), [Image Details](/api-reference/image-details), [Photo Timeline](/api-reference/photo-timeline) |
| **Search** | Find photos by BIB or selfie | [BIB Search](/api-reference/bib-search), [Face Search](/api-reference/face-search) |
| **Video** | Personalised clips from a selfie | [Video Clipping Search](/api-reference/video-clipping-search) |
| **Downloads** | Presigned links for unwatermarked originals | [Download Originals](/api-reference/download-original-photos) |
| **Pipeline (photos)** | Import, process, publish, and poll status | [Import](/api-reference/pipeline/photos/import), [Process](/api-reference/pipeline/photos/process), [Go Live](/api-reference/pipeline/photos/go-live), [Unpublish](/api-reference/pipeline/photos/unpublish), [Status](/api-reference/pipeline/photos/status) |

All endpoints require an `X-API-Key` header — see [Conventions](/api-reference/conventions) for the shared response envelope and identifier rules.

The consumer-facing endpoints surface four 9Pic AI products:

| 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-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) |

## Browse Photos

Render the full event gallery or jump to a specific image without filtering by BIB or selfie.

<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="Image Details" icon="image" href="/api-reference/image-details">
    `GET /event/{event_id}/images/{image_id}` — one photo and its curated metadata by image ID.
  </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>
</CardGroup>

## Search

Participant discovery by BIB number (**9Pic BibTrack**) or selfie (**9Pic FaceFind**).

<CardGroup cols={2}>
  <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.
  </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. Reuse the returned `request_id` for cached pagination and downloads.
  </Card>
</CardGroup>

## Video

Personalised video clips powered by **9Pic Motion**.

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

## Downloads

Presigned URLs for original (unwatermarked) files — the download side of **9Pic Stamp**.

<CardGroup cols={1}>
  <Card title="Download Originals" icon="cloud-arrow-down" href="/api-reference/download-original-photos">
    `POST /event/{event_id}/original-photos` — presigned URLs keyed by BIB, selfie `request_id`, single `image_id`, or a list of image IDs.
  </Card>
</CardGroup>

## Pipeline (photos)

Organiser-side import → process → publish workflow. Trigger stages, then poll status until each completes.

<CardGroup cols={2}>
  <Card title="Pipeline Status" icon="arrows-rotate" href="/api-reference/pipeline/photos/status">
    `GET /event/{event_id}/pipeline/photos/status` — poll import, processing, and go-live stage status.
  </Card>

  <Card title="Import Photos" icon="cloud-arrow-down" href="/api-reference/pipeline/photos/import">
    `POST /event/{event_id}/pipeline/photos/import` — import photos from configured sources (step 1).
  </Card>

  <Card title="Process Photos" icon="wand-magic-sparkles" href="/api-reference/pipeline/photos/process">
    `POST /event/{event_id}/pipeline/photos/process` — run AI processing (step 2).
  </Card>

  <Card title="Go Live" icon="rocket" href="/api-reference/pipeline/photos/go-live">
    `POST /event/{event_id}/pipeline/photos/go-live` — publish processed photos to the public gallery (step 3).
  </Card>

  <Card title="Unpublish" icon="eye-slash" href="/api-reference/pipeline/photos/unpublish">
    `POST /event/{event_id}/pipeline/photos/unpublish` — move a live gallery back to draft (OAuth only).
  </Card>
</CardGroup>

## Recommended Flow

### Participant-facing app

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), or time-based discovery with [Photo Timeline](/api-reference/photo-timeline).
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).

### Pipeline (organiser automation)

1. [Import](/api-reference/pipeline/photos/import) to import from configured sources.
2. Poll [Pipeline Status](/api-reference/pipeline/photos/status) until import is complete.
3. [Process](/api-reference/pipeline/photos/process) to run watermarking, BIB detection, and face indexing.
4. Poll until processing is complete, then [Go Live](/api-reference/pipeline/photos/go-live) to publish.
5. Poll until go-live is complete (`is_live: true`) before relying on browse, search, or download endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.