Список книг
Все книги: главы, сколько озвучено, длина звука.
GET /books · чтение
Книги из корзины в список не входят.
Что в ответе
| Поле | Что это |
|---|---|
id |
Id книги |
title / author |
Название и автор |
chapters_total / chapters_ready |
Глав всего / озвучено |
duration_s |
Звука готово, секунд |
chars |
Знаков текста в книге |
audio_est_s |
Сколько примерно будет звука, секунд |
chapters_active / chapters_failed |
Глав в работе / с ошибкой |
series |
Цикл: {id, title, no} или null |
curl "https://golosar-kniga.tech/api/v1/books" \
-H "x-api-key: $KEY"
import os, requests
API = "https://golosar-kniga.tech/api/v1"
H = {"x-api-key": os.environ["GOLOSAR_KEY"]}
r = requests.get(f"{API}/books", headers=H)
r.raise_for_status()
print(r.json())
const API = "https://golosar-kniga.tech/api/v1";
const H = { "x-api-key": process.env.GOLOSAR_KEY };
const r = await fetch(`${API}/books`, { headers: H });
if (!r.ok) throw new Error(await r.text());
console.log(await r.json());
json Ответ 200
{
"books": [
{
"id": "01a134d0-dd73-77be-aa8d-0944ffb2b5e3",
"title": "Вечер в саду",
"author": "Иван Петров",
"status": "ready",
"created_at": "2026-10-13T10:31:05.833003+00:00",
"language": "ru",
"subtitle": "",
"series": null,
"series_no": "",
"genre": "",
"age_rating": "",
"thoughts": "hero",
"sound": "studio",
"check": "auto",
"reading": "roles",
"cover_url": null,
"active_edition_id": "01a134d0-ddcc-7b41-ba3d-b8112c6d0414",
"chapters_total": 2,
"chapters_ready": 0,
"duration_s": 0,
"chars": 164,
"audio_est_s": 10.9,
"chapters_active": 0,
"chapters_failed": 0,
"updated_at": "2026-10-13T10:31:05.833003+00:00"
}
],
"can_create": true
}