---
title: "Get Library Prayer"
method: GET
path: "/api/prayer-library/{topic}"
tags: ["prayer-library"]
---

# Get Library Prayer

`GET /api/prayer-library/{topic}`

Fetch a pre-generated prayer from the library for a given topic.

The language and voice are resolved from the user's profile preferences.
Defaults to English ("en") and "v1-openai-alloy" if not set.

Args:
    topic: One of the 12 supported prayer topics (case-sensitive).
    current_user: Authenticated user (provides preferred_language and preferred_voice).

Returns:
    PrayerLibraryResponse with prayer text and audio URL.

## Path parameters

- `topic` string, required

## Headers

- `x-user-id` string, nullable

## Response `200`

Successful Response

- PrayerLibraryResponse
  - `success` boolean, required
  - `prayer` PrayerLibraryItem, required
    - `id` string, required
    - `topic` string, required
    - `language` string, required
    - `voice` string, required
    - `prayer_text` string, required
    - `audio_url` string, required
    - `created_at` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/usecreed/apis/creed-api.md) · [All operations](https://skmtc.net/usecreed/apis/creed-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usecreed/creed-api/versions/523833f9e819/schema)
