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

# API reference overview

> Endpoint conventions for the Porn Factory AI v1 API.

The Porn Factory AI API is a JSON-over-HTTPS API rooted at:

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

All requests require `Authorization: Bearer pfai_...`. Generation submissions
also require `Content-Type: application/json` and an `Idempotency-Key` header.

<CardGroup cols={2}>
  <Card title="Authentication" icon="https://mintcdn.com/pornfactoryai/zZG5Uyui4X47TSMK/icons/heroicons/key.svg?fit=max&auto=format&n=zZG5Uyui4X47TSMK&q=85&s=d78e75aeb81ca40ca6fc140da038522e" href="/authentication" width="24" height="24" data-path="icons/heroicons/key.svg">
    Create scoped keys and store one-time secrets safely.
  </Card>

  <Card title="Request lifecycle" 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">
    Understand idempotency, polling, and terminal statuses.
  </Card>
</CardGroup>

## Versioning

The current contract is `v1`. Backward-compatible fields may be added without
changing the version. Breaking request or response changes will use a new API
version.

## Timestamps and IDs

* Timestamps are ISO 8601 strings in UTC.
* API request IDs begin with `req_`.
* API keys begin with `pfai_`.
* Webhook secrets begin with `whsec_`.
* Generated-library source IDs are UUIDs owned by the authenticated account.

## Public data boundary

The API returns only fields needed to select a catalog entry, budget and submit
a generation, and retrieve its result. It does not return account user IDs,
private media locations, model file locations, provider details, infrastructure
metadata, internal registry state, prompts from other users, or moderation
evidence.

Catalog IDs are opaque public selectors. Do not infer storage, provider, or
routing behavior from them, and do not depend on their format beyond what the
reference documents.
