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

# Porn Factory AI API

> One API for catalog-backed image and video generation.

Build image and video workflows with generator-ready checkpoints and LoRAs,
predictable credit accounting, stable request IDs, polling, and signed
webhooks.

<CardGroup cols={2}>
  <Card title="Make your first request" icon="https://mintcdn.com/pornfactoryai/zZG5Uyui4X47TSMK/icons/heroicons/play.svg?fit=max&auto=format&n=zZG5Uyui4X47TSMK&q=85&s=6d6a7143621cb7252d0596b2f7700901" href="/quickstart" width="24" height="24" data-path="icons/heroicons/play.svg">
    Create an API key, select a catalog model, and submit a generation.
  </Card>

  <Card title="Explore the reference" icon="https://mintcdn.com/pornfactoryai/zZG5Uyui4X47TSMK/icons/heroicons/code-bracket.svg?fit=max&auto=format&n=zZG5Uyui4X47TSMK&q=85&s=b1a3c84f942b5510f876ad50fd7b1d1d" href="/api-reference/overview" width="24" height="24" data-path="icons/heroicons/code-bracket.svg">
    Inspect endpoint parameters and try authenticated requests in the API playground.
  </Card>

  <Card title="Understand request IDs" icon="https://mintcdn.com/pornfactoryai/zZG5Uyui4X47TSMK/icons/heroicons/clipboard-document.svg?fit=max&auto=format&n=zZG5Uyui4X47TSMK&q=85&s=9c57c989be5a1f3d9f3bf1f34d947b4b" href="/concepts/requests" width="24" height="24" data-path="icons/heroicons/clipboard-document.svg">
    Build reliable workflows with idempotency, polling, and stable request IDs.
  </Card>

  <Card title="Receive webhooks" icon="https://mintcdn.com/pornfactoryai/zZG5Uyui4X47TSMK/icons/heroicons/envelope.svg?fit=max&auto=format&n=zZG5Uyui4X47TSMK&q=85&s=7ca6acfd5a90033ba97a5fc90e30e4ec" href="/guides/webhooks" width="24" height="24" data-path="icons/heroicons/envelope.svg">
    Verify signed terminal events and handle at-least-once delivery safely.
  </Card>
</CardGroup>

## What you can build

* Text-to-image and generated-library image workflows
* Text-to-video and generated-library image-to-video workflows
* Catalog discovery for generator-ready checkpoints and LoRAs
* Credit-aware generation with idempotent submission
* Polling and signed webhook completion flows

<Info>
  Source media must come from the authenticated account's completed generated
  library. Browser uploads and arbitrary remote media URLs are not accepted by
  the developer API.
</Info>

## Base URL

```text theme={"system"}
https://pornfactoryai.com/api/v1
```

All v1 endpoints use HTTPS and JSON. Authenticate with a Bearer API key that
starts with `pfai_`.

<Card title="Create an API key" icon="https://mintcdn.com/pornfactoryai/zZG5Uyui4X47TSMK/icons/heroicons/key.svg?fit=max&auto=format&n=zZG5Uyui4X47TSMK&q=85&s=d78e75aeb81ca40ca6fc140da038522e" href="https://pornfactoryai.com/account?tab=developer" width="24" height="24" data-path="icons/heroicons/key.svg">
  Open your Porn Factory AI account, create a scoped key, and copy the key and
  webhook secret while they are visible.
</Card>
