Developer platform
Integrate the same knowledge-backed Islamic AI that powers Tanyalah Ustaz into your product. Send a user question; we retrieve relevant knowledge, build a grounded prompt, and return an AI answer with cited sources.
How it works
- Your app sends a user question to POST /api/v1/chat.
- We embed the question and search the knowledge base with semantic retrieval (RAG).
- Relevant passages are injected into the AI prompt as context.
- Earlier messages in the same session_id are included for follow-up questions.
- We return the answer with source article references.
Base URL
https://api-v2.tanyalahustaz.com/api/v1
Quick start
- Create a developer account and sign in.
- Go to Dashboard → API Keys and create a key.
- POST a message to /api/v1/chat from your backend, or use the playground to test first.
Example: AI chat
curl -X POST https://api-v2.tanyalahustaz.com/api/v1/chat \
-H "Authorization: Bearer tlh_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"message":"Can a traveler combine Dhuhr and Asr?","category":"fiqh","session_id":"user-123"}'OpenAPI specification
Import the machine-readable API spec into Postman, Swagger UI, or your SDK generator.