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

# API Skill

> API keys, identifiers, the response envelope, pagination, and errors

## Overview

`9pic-api` is the base skill for any call to `https://api.9pic.ai`. It covers how to create and send an API key, how organisation and event IDs work, and how to read the shared response envelope, pagination, and errors.

If you are building a guest-facing gallery, also install [Participant App](/agent-skills/9pic-client). If you sell photos through your own checkout, also install [Media Selling](/agent-skills/9pic-media-sell).

## Install

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

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

## Call Path

The guest app never sends `X-API-Key`. Your frontend talks to your backend; your backend talks to 9Pic.

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

  Guest->>App: User action
  App->>Backend: App request (no API key)
  Backend->>Pic: HTTP with X-API-Key
  Pic-->>Backend: Envelope in data
  Backend-->>App: Safe payload for the UI
```

## API Pages

| When you need                                     | Read                                              |
| ------------------------------------------------- | ------------------------------------------------- |
| Create and send the key                           | [Authentication](/api-reference/authentication)   |
| Base URL, IDs, envelope, pagination, `request_id` | [Conventions](/api-reference/conventions)         |
| Status codes and retries                          | [Errors](/api-reference/errors)                   |
| A first live call                                 | [Ping](/api-reference/ping)                       |
| Discover `event_id` values                        | [List Events](/api-reference/list-events)         |
| Feature flags before search                       | [Event Details](/api-reference/event-details)     |
| Shared models                                     | [API Models](/api-reference/models)               |
| Tokens in the dashboard                           | [Developer Zone](/dashboard-guide/developer-zone) |

<Note>
  Developer Zone is **Enterprise** only. Trial, Pay As You Go, and Pro organisations cannot create API keys.
</Note>

## Integration Notes

* Keep `X-API-Key` on your backend. Never ship it to a browser, mobile app, or public repository.
* If an older snippet disagrees with an API Reference page, follow the page.
* Handle `429` as documented on [Errors](/api-reference/errors). Current rate-limit numbers come from support.

## Related

<CardGroup cols={2}>
  <Card title="Participant App" icon="images" href="/agent-skills/9pic-client">
    Guest-facing search, gallery, and clips.
  </Card>

  <Card title="Media Selling" icon="cart-shopping" href="/agent-skills/9pic-media-sell">
    Your checkout, then original photos after a sale.
  </Card>

  <Card title="Authentication" icon="key" href="/api-reference/authentication">
    How to send `X-API-Key`.
  </Card>

  <Card title="Conventions" icon="compass" href="/api-reference/conventions">
    Envelope, identifiers, pagination, `request_id`.
  </Card>
</CardGroup>
