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

# Agent Skills

> Install the 9Pic skill for coding agents, or connect AI assistants to your 9Pic account

## Overview

There are two ways to put an AI agent to work on 9Pic:

* **Write code against the 9Pic API.** Agent Skills are instruction files your coding agent loads while it writes a 9Pic integration. 9Pic publishes one skill, `9pic-integration`. Install it into Cursor, Claude Code, Codex, or any other tool that supports the skills CLI.
* **Run your 9Pic account from an assistant.** Connect the [9Pic AI MCP server](https://docs.9pic.ai/integrations/ai-assistants.md) to ChatGPT, Claude, Grok, Cursor, VS Code or Codex and ask it to work on your events.

The skill names the [API Reference](https://docs.9pic.ai/api-reference.md) page for each job. The API key stays on your backend, FaceFind searches reuse one `request_id`, and guests see watermarked previews until you unlock originals.

> [card] [9Pic Integration](https://docs.9pic.ai/integrations/agent-skills/9pic-integration.md)
>
> API keys, FaceFind, BibTrack, gallery, Motion clips, selling originals through your own checkout, and a review of the app you built.

> [card] [AI Assistants (MCP)](https://docs.9pic.ai/integrations/ai-assistants.md)
>
> Connect ChatGPT, Claude, Grok, Cursor and other apps to your 9Pic account.

## Install

**1. Create an API key**

Create a token in [Developer Zone](https://docs.9pic.ai/integrations/developer-zone.md). Developer Zone is open on **Business**, **Custom**, **Enterprise** and during **Trial**; keys stop working on Pay As You Go and Pro. Send the key as `X-API-Key` as described in [Authentication](https://docs.9pic.ai/api-reference/authentication.md).

**2. Install the skill**

From the repository where the agent will write code:

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

That installs `9pic-integration`.

**3. Describe the integration**

Tell the agent what you are building: a guest gallery, selfie search, bib search, clips, or paid originals. Paths, fields, and examples come from the linked API Reference pages.

**4. Review the result**

Ask the agent to review your 9Pic integration. It writes `9pic-review.md` with **Must have** and **Good to have** fixes, then asks before changing code. See [Review Your App](https://docs.9pic.ai/integrations/agent-skills/9pic-integration.md#review-your-app).

> [!NOTE]
>
> Installed skills do not update on their own. After we publish a change, run `npx skills update -y` or re-run the add command. If you installed the older `9pic-api`, `9pic-client` or `9pic-media-sell` skills, remove them and install `9pic-integration`; it replaces all three.

> [!TIP]
>
> If the `npx skills` CLI is not available, the discovery index is at `https://docs.9pic.ai/.well-known/skills/index.json`.

Agents that fetch [9pic.ai/llms.txt](https://9pic.ai/llms.txt) get a short product brief and the same install command. The [install guide](https://9pic.ai/blog/9pic-agent-skills/) walks through the CLI.

> [!WARNING]
>
> Treat the API key as a server secret. Send `X-API-Key` only from your backend. Do not put the token in client-side code, a mobile binary, or a public repository.

## Common Questions

> [accordion] Which skill should I install?
>
> There is one: `9pic-integration`. It covers any call to `api.9pic.ai`, guest-facing galleries and search, and selling originals through your own checkout. The agent follows only the sections your job needs.

> [accordion] Can the skill check an app I already built?
>
> Yes. Ask your agent to review your 9Pic integration. It checks security, privacy and correctness (**Must have**) and parity with the 9Pic gallery (**Good to have**), writes `9pic-review.md`, and asks before fixing anything. See [Review Your App](https://docs.9pic.ai/integrations/agent-skills/9pic-integration.md#review-your-app).

> [accordion] Do I still need the API Reference?
>
> Yes. Paths, request bodies, pagination limits, and response shapes live in the [API Reference](https://docs.9pic.ai/api-reference.md). Skills point the agent at those pages.

> [accordion] Can I sell photos through my own checkout?
>
> Yes. Guests see thumbnails and watermarked images until you record a successful sale. Your backend then calls [Download Originals](https://docs.9pic.ai/api-reference/download-original-photos.md). See [Sell Originals](https://docs.9pic.ai/integrations/agent-skills/9pic-integration.md#sell-originals).

> [accordion] Does this cover import, process, or go-live?
>
> No. Those are organiser pipeline endpoints. Start from [Memories](https://docs.9pic.ai/api-reference/memories.md) if you need them.

## Next Steps

> [card] [Authentication](https://docs.9pic.ai/api-reference/authentication.md)
>
> Create a token and send `X-API-Key`.

> [card] [API Reference](https://docs.9pic.ai/api-reference.md)
>
> Endpoints, conventions, models, and errors.

> [card] [Developer Zone](https://docs.9pic.ai/integrations/developer-zone.md)
>
> Where Business, Custom, Enterprise and Trial organisations create API keys.

> [card] [Conventions](https://docs.9pic.ai/api-reference/conventions.md)
>
> Base URL, identifiers, envelope, and pagination.


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