> ## 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.

# Media Selling

> Show previews, take payment yourself, then unlock original photos

## Overview

Use `9pic-media-sell` when you take payment yourself and 9Pic supplies the photos. Guests see thumbnails and watermarked images. After you confirm a sale in your system, your backend calls [Download Originals](/api-reference/download-original-photos).

Payment stays in your checkout. 9Pic does not process the card, create the order, or send the receipt.

Also install [API Skill](/agent-skills/9pic-api) and [Participant App](/agent-skills/9pic-client).

## Install

```bash theme={null}
npx skills add https://docs.9pic.ai --skill 9pic-media-sell
```

To install every 9Pic skill, see [Agent Skills](/agent-skills).

## Call Path

The browser never holds `X-API-Key` and never fetches originals until your backend has recorded a paid order.

```mermaid theme={null}
sequenceDiagram
  participant Guest
  participant App as Partner app
  participant Pay as Partner payment
  participant Backend as Partner backend
  participant Pic as 9Pic API

  Guest->>App: Search or browse
  App->>Backend: Search request (no API key)
  Backend->>Pic: FaceFind, BibTrack, or gallery
  Pic-->>Backend: thumbnail_url and img_url
  Backend-->>App: Previews only
  App-->>Guest: Grid and watermarked viewer

  Guest->>Pay: Pay (partner checkout)
  Pay-->>Backend: Payment confirmed
  Backend->>Backend: Store purchase locally

  Backend->>Pic: Download Originals
  Pic-->>Backend: Presigned original URLs
  Backend-->>App: Originals for this purchase
  App-->>Guest: Unwatermarked files
```

## Workflow

<Steps>
  <Step title="Find photos">
    Follow [Participant App](/agent-skills/9pic-client): Event Details flags, then [Face Search](/api-reference/face-search) and/or [BIB Search](/api-reference/bib-search). Persist bib or `request_id`.
  </Step>

  <Step title="Show previews only">
    Grid: `thumbnail_url`. Large view: `img_url` (watermarked). See the [Image model](/api-reference/models/image). Do not send unwatermarked files to an unpaid guest.
  </Step>

  <Step title="Take payment">
    Your checkout, your provider, your receipts. 9Pic is not involved in this step.
  </Step>

  <Step title="Store the purchase">
    Persist order id, buyer, and which bib / `request_id` / image ids were sold — in your system.
  </Step>

  <Step title="Unlock originals">
    Your backend calls [Download Originals](/api-reference/download-original-photos) using the identifier on that page. Generate presigned URLs on demand; do not cache them past expiry.
  </Step>
</Steps>

## API Pages

| When you need                    | Read                                                          |
| -------------------------------- | ------------------------------------------------------------- |
| Auth                             | [API Skill](/agent-skills/9pic-api)                           |
| Find photos                      | [Participant App](/agent-skills/9pic-client)                  |
| Preview vs original fields       | [Image model](/api-reference/models/image)                    |
| Unwatermarked files after a sale | [Download Originals](/api-reference/download-original-photos) |
| Face / bib / gallery             | [Memories](/api-reference/memories)                           |

## Integration Notes

* Originals only after you have confirmed the sale. The API key stays on your backend.
* Until then, guests get `thumbnail_url` and `img_url`.
* Import, process, and go-live are organiser pipeline endpoints — see [Memories](/api-reference/memories).
* **Flow**, **Certify**, and **Buzz** have no public `/ext/` API.

## Related

<CardGroup cols={2}>
  <Card title="Participant App" icon="images" href="/agent-skills/9pic-client">
    Search and preview gallery before a sale.
  </Card>

  <Card title="Download Originals" icon="cloud-arrow-down" href="/api-reference/download-original-photos">
    Presigned unwatermarked files after a confirmed sale.
  </Card>

  <Card title="API Skill" icon="code" href="/agent-skills/9pic-api">
    Auth, envelope, backend-for-frontend.
  </Card>

  <Card title="Image model" icon="image" href="/api-reference/models/image">
    `thumbnail_url`, `img_url`, `original_url`.
  </Card>
</CardGroup>
