---
title: "Generate a square audiobook version of a cover (async)"
method: POST
path: "/api/v1/covers/{coverId}/audiobook-cover"
tags: ["Covers"]
---

# Generate a square audiobook version of a cover (async)

`POST /api/v1/covers/{coverId}/audiobook-cover`

## Request

- Base URL: `https://beyourcover.com`
- URL: `https://beyourcover.com/api/v1/covers/{coverId}/audiobook-cover`
- Auth: HTTP bearer

Produces the `audiobook_preview` asset from the cover's preview image. Costs 1 credit, or 0 for the book's first audiobook cover when its marketing kit was opened in the app this billing period: the `202` then says `credits_reserved: 0` and `included_format: true`, and a failed job does not give that included render back. Returns `409 asset_already_exists` when the cover already has the asset, unless the body sends `regenerate: true`. The request body is optional (a missing/invalid JSON body is treated as `{}`).

## Path parameters

- `coverId` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `regenerate` boolean: Set `true` to replace an existing `audiobook_preview` asset with a new run, as the app does. Charged as a new run: 1 credit, or 0 only when the book's included render is still unused. Clears the old `audiobook_full` upscale. Without it, an existing asset returns `409 asset_already_exists`.
  - `external_ref` string: Optional caller-supplied reference. (Length/type limits are not enforced on this endpoint in code.)
  - `webhookUrl` string: Optional per-job webhook URL. (Length/type limits are not enforced on this endpoint in code.)

## Response `200`

Idempotent replay of an existing job with the same `Idempotency-Key`.

- JobReplay: 200 envelope returned when an Idempotency-Key matches an existing job. Unlike the fresh 202, `status` reflects the job's current state and `operation` is always present.
  - `jobId` string, uuid, required
  - `status` 'queued' | 'processing' | 'completed' | 'failed', required: Current status of the previously created job.
  - `operation` 'generate' | 'variation' | 'edit_image' | 'upscale' | 'audiobook_cover' | 'remove_text' | 'generate_reference' | 'wrap' | 'wrap_extend_front', required
  - `credits_reserved` integer: What the ORIGINAL job reserved. Returned by the variations, edit-image, upscale, audiobook-cover, remove-text, wraps and extend-front endpoints when the job recorded it.
  - `included_format` boolean: true when the book's marketing kit paid for the ORIGINAL job instead of credits. Returned by the edit-image, upscale, audiobook-cover, remove-text, wraps and extend-front endpoints.
  - `external_ref` string, nullable, required: The external_ref stored on the ORIGINAL job.
  - `created_at` string, date-time, required
  - `poll_url` string, required

## Other responses

- `202`: Job accepted and queued. `operation` is `audiobook_cover`.
- `400`: `code` is one of: `missing_cover_image` (the cover has no preview image), `invalid_regenerate` (`regenerate` is not a boolean).
- `401`: Missing/malformed API key, unknown or inactive key, or inactive subscription detected during credit checks. `code`: `unauthorized`.
- `402`: Not enough credits (monthly + overage) for the requested operation. `code`: `insufficient_credits`.
- `403`: The API key is valid but its owner has no active enterprise subscription. `code`: `forbidden`.
- `404`: Cover not found or not owned by this API key's user. `code`: `cover_not_found`.
- `409`: `code` is one of: `asset_already_exists` (the target asset already exists for this cover; send `regenerate: true` to replace it), `operation_in_progress` (an identical job for this cover is already queued or processing — poll it instead of starting another; a second run would charge again and overwrite the first result).
- `429`: The subscription's concurrent-job limit is reached (jobs with status `queued` or `processing` count). `code`: `concurrency_limit`.
- `500`: Server error. `code` is `job_creation_failed` or `internal_error`. The reserved credit is refunded.

---

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