---
title: "Generate AI book cover (Pro only)"
method: POST
path: "/generate-cover"
---

# Generate AI book cover (Pro only)

`POST /generate-cover`

## Request

- Base URL: `https://epublys.com/v1`
- URL: `https://epublys.com/v1/generate-cover`
- Auth: HTTP bearer

Generates a book cover image using FLUX from a description or a title (either is sufficient). Pro tier required — free-tier keys receive 403. Returns a base64-encoded JPEG.

## Request body

- object
  - `description` string: Visual description of the cover (subject, mood, style)
  - `title` string
  - `author` string
  - `genre` 'fantasy' | 'romance' | 'thriller' | 'sci-fi' | 'literary' | 'non-fiction' | 'horror' | 'children' | 'poetry' | 'minimalist': Book genre — affects style and composition
  - `seed` integer: Optional seed for reproducible output

## Response `200`

Generated cover + monthly quota state

- object
  - `success` boolean
  - `image` string: Base64-encoded JPEG
  - `contentType` string
  - `used` integer
  - `cap` integer
  - `remaining` integer

## Other responses

- `400`: Invalid input — human message in `error`, machine category in `code`
- `401`: Missing or invalid API key
- `403`: Pro tier required
- `413`: Upload exceeds the per-request total cap
- `429`: Rate limited
- `500`: Processing failure

---

[API](https://skmtc.dev/epublys/apis/epublys-api.md) · [All operations](https://skmtc.dev/epublys/apis/epublys-api/llms.txt) · [OpenAPI document](https://skmtc.dev/epublys/apis/epublys-api/revisions/b705f822c814?raw)
