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

# API reference

> Interactive reference for all Phota API endpoints

The API reference is auto-generated from the Phota API's
[OpenAPI specification](https://api.photalabs.com/v1/phota/openapi.json). Use the
sidebar to browse individual endpoints, view request and response schemas, and try requests directly from the docs.

## Authentication

All endpoints require an API key passed in the `X-API-Key` header:

```bash theme={null}
curl https://api.photalabs.com/v1/phota/profiles/ids \
  -H "X-API-Key: YOUR_API_KEY"
```

See the [Authentication guide](/api/authentication) for details on obtaining and managing keys.

## Endpoints overview

### Studio

The image endpoints also support an [asynchronous mode](/api/async-requests) for
long-running requests — submit with `async: true`, then poll the job endpoint below.

| Endpoint                   | Method | Description                                                     |
| -------------------------- | ------ | --------------------------------------------------------------- |
| `/v1/phota/edit`           | POST   | Edit images using a text prompt and optional profile references |
| `/v1/phota/generate`       | POST   | Generate new images from a text prompt (no input image)         |
| `/v1/phota/enhance`        | POST   | Automatically enhance a photo without a text prompt             |
| `/v1/phota/remix`          | POST   | Restyle an image to match a reference image                     |
| `/v1/phota/jobs/{job_id}`  | GET    | Poll the status and result of an asynchronous job               |
| `/v1/phota/webhook-secret` | GET    | Fetch your per-account secret for verifying callback signatures |

### Profiles

| Endpoint                                          | Method | Description                                          |
| ------------------------------------------------- | ------ | ---------------------------------------------------- |
| `/v1/phota/profiles/add`                          | POST   | Create a new profile and start asynchronous training |
| `/v1/phota/profiles/ids`                          | GET    | List all profiles for the authenticated account      |
| `/v1/phota/profiles/{profile_id}/status`          | GET    | Check the training status of a profile               |
| `/v1/phota/profiles/{profile_id}/profile_picture` | GET    | Retrieve the profile picture as a JPEG image         |
| `/v1/phota/profiles/{profile_id}`                 | DELETE | Permanently delete a profile and all associated data |

## Guides

For a guided walkthrough, start with the [Quickstart](/api/quickstart). For conceptual background, see:

* [Profiles guide](/guides/profiles) -- identity preservation, lifecycle, and prompt syntax
* [Use cases](/guides/use-cases) -- visual examples of edit, generate, enhance, and remix
* [Remix guide](/guides/remix) -- restyle a photo to match a reference image
