API documentation
The CatéGPT API returns sourced answers about the Catholic faith. Ideal for integrating the assistant into an application, a back-office or a bot.
Base URL
https://categpt.chat
Authentication
The API authenticates with an API key (Bearer token).
- Create an account at https://categpt.chat.
- Open the Developer page of your account.
- Generate an API key (
cgpt_live_…). It is shown only once — copy it immediately. - Send it in the
Authorizationheader.
Authorization: Bearer cgpt_live_yourKey
Credits & billing
Usage is prepaid: top up your account, then each answer is debited. The billed amount is the model cost times a multiplier (~2×). An answer is generated only if the balance is positive.
Endpoint — Generate an answer
POST /api/v1/answer
Content-Type: application/json
Authorization: Bearer cgpt_live_…
Parameters (JSON body)
| Field | Type | Required | Description |
|---|---|---|---|
question | string | yes | The question (1 to 4000 chars). |
mode | string | no | quick (default) or academic. |
level | string | no | child, teen, catechesis, general (default), academic, priest. |
language | string | no | 2-letter language code (fr, en…). Auto-detected otherwise. |
Example request
curl -X POST https://categpt.chat/api/v1/answer \
-H "Authorization: Bearer cgpt_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"question": "What does the Catechism say about the Eucharist?",
"mode": "academic",
"level": "general"
}'
Response
{
"answer": "…text with [1], [2] markers…",
"references": [
{
"source_type": "catechism",
"title": "Catechism of the Catholic Church",
"citation": "CCC 1373-1377",
"url": "https://www.vatican.va/…",
"verified": true,
"language": "en"
}
],
"usage": { "prompt_tokens": 1234, "completion_tokens": 567, "billed_usd": 0.012 },
"language": "en"
}
Source types (source_type)
bible, catechism, council, pontifical, canon_law,
social_doctrine, church_father, church_doctor, other.
Saint of the day API
GET /api/v1/saint — free, no key
Returns the feast and saint of the day from the liturgical calendar. This endpoint is free: no API key is required and CORS is open (callable directly from a browser).
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | no | Day as YYYY-MM-DD (default: today, UTC). |
locale | string | no | fr (default), en, de, it, es, pt, pl. |
curl "https://categpt.chat/api/v1/saint?locale=en"
{
"date": "2026-08-11",
"name": "Sainte Claire, vierge",
"degree": "Mémoire",
"color": "blanc",
"description": "…Markdown description…",
"excerpt": "…two-sentence summary…",
"permalink": "https://app.categpt.chat/en/saint/august-11-sainte-claire-vierge",
"readings": [ { "type": "lecture_1", "ref": "…", "titre": "…", "contenu": "…" } ],
"offices": { "laudes": "…" },
"zones": { "france": "…" }
}
description and excerpt come back in the requested locale (French
fallback); readings holds the translated mass readings when locale ≠
fr; offices stays in French (official AELF text). Returns 404
(not_found) when no data exists for that day.
POST /api/v1/saint/ask — ask about the day’s feast
Same authentication (API key), same quotas and same billing as
/api/v1/answer — but the question is first enriched with the day’s
liturgical context (feast, colour, readings, description), like the chat on
the “Saint of the day” page.
POST /api/v1/saint/ask
Content-Type: application/json
Authorization: Bearer cgpt_live_…
| Field | Type | Required | Description |
|---|---|---|---|
question | string | yes | The question (1 to 4000 chars). |
date | string | no | Day YYYY-MM-DD (default: today, UTC). |
locale | string | no | Answer language (fr, en…). Auto-detected otherwise. |
mode | string | no | quick (default) or academic. |
level | string | no | Same as /api/v1/answer. |
curl -X POST https://categpt.chat/api/v1/saint/ask \
-H "Authorization: Bearer cgpt_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"question": "Which saint is celebrated today, and why?",
"locale": "en"
}'
The response has the same format as /api/v1/answer (answer,
references, usage, language), plus the date of the liturgical
day that was used.
Examples
JavaScript (fetch)
const res = await fetch("https://categpt.chat/api/v1/answer", {
method: "POST",
headers: {
"Authorization": "Bearer cgpt_live_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({ question: "Who was Saint Augustine?" }),
});
const data = await res.json();
console.log(data.answer, data.references);
Python (requests)
import requests
r = requests.post(
"https://categpt.chat/api/v1/answer",
headers={"Authorization": "Bearer cgpt_live_xxx"},
json={"question": "Who was Saint Augustine?"},
)
data = r.json()
print(data["answer"])
Rate limits
Up to 60 requests per minute per key. Beyond that, the API returns 429.
Errors
| HTTP code | error | Meaning |
|---|---|---|
| 400 | invalid_request | Malformed request. |
| 401 | invalid_api_key | Missing or invalid key. |
| 402 | insufficient_credits | Credit balance depleted. |
| 429 | rate_limited | Too many requests. |
| 502 | upstream_error | Upstream model error. |
Errors are returned as { "error": { "code": "…" } }.
402 by topping up credits, and always show the references next to the answer for transparency.No-code integration
To add the chat to a website without coding, use the widget and plugins: see the widget documentation.