PuranGPT API
Ask the scriptural corpus from your own code and get back cited, source-grounded answers. The API is available on the Pro plan.
1. Get an API key
Open Settings → API and create a key. It looks like pgk_live_… and is shown only once, so copy it somewhere safe. You can revoke a key at any time.
2. Call the endpoint
Send a POST to /api/v1/chat with your key in the Authorization header.
curl https://purangpt.com/api/v1/chat \
-H "Authorization: Bearer pgk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"query": "What does the Bhagavad Gita say about acting without attachment to results?",
"mode": "research",
"language": "en"
}'Request body
queryYour question.
modeDefault "research". "guide" answers in Guruji's voice.
languageDefault "en".
top_kHow many source passages to retrieve. Default 10.
session_idOptional — continues a prior conversation.
streamDefault false. true returns a raw SSE stream instead of JSON.
Response
By default you get a single JSON object with the assembled answer and its citations:
{
"answer": "Krishna tells Arjuna that one has a right to action alone…",
"citations": [
{
"text_name": "Bhagavad Gita",
"reference": "2.47",
"text": "You have a right to your duty, but never to the fruits of action.",
"language": "sa"
}
],
"session_id": "api:…",
"grounding_quality": "high"
}Errors
401Missing or invalid API key.
403The key's account is no longer on a Pro plan.
400Missing query or malformed JSON body.
429Rate limit reached — slow down and retry.