---
title: "Identify a book cover"
method: POST
path: "/api/photo/cover"
tags: ["photo"]
---

# Identify a book cover

`POST /api/photo/cover`

## Request

- Base URL: `https://leafle.org` (the document declares no server; this is the origin it was published from)
- URL: `https://leafle.org/api/photo/cover`
- Auth: HTTP bearer

**Access: write token.**

Upload an image in multipart field `file` to identify candidate books. Nothing is marked read; confirm a chosen book with `/api/reads`. Pass `reader_id` in the query string.

## Query parameters

- `reader_id` integer, nullable

## Response `200`

Successful Response

- PhotoCoverResult: POST /api/photo/cover — grounded candidates for the read+react confirm.
  - `books` PhotoBook[], required
    - `title` string
    - `author` string
    - `isbn` string
    - `cover_url` string, nullable
    - `year` union
      - integer
      - string
    - `confidence` string

## Other responses

- `400`: Invalid input; see detail for the reason.
- `401`: Missing or unusable credential.
- `403`: Insufficient token scope or the reader is outside your account.
- `413`: The uploaded file exceeds this deployment's size limit.
- `422`: Validation Error
- `429`: Request or usage limit reached. Wait before retrying.
- `502`: The image recognition provider could not read the photo.
- `503`: Capacity is unavailable or the service is restarting. Honour Retry-After when present.

---

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