Tanyalah UstazFor Business

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

  1. Your app sends a user question to POST /api/v1/chat.
  2. We embed the question and search the knowledge base with semantic retrieval (RAG).
  3. Relevant passages are injected into the AI prompt as context.
  4. Earlier messages in the same session_id are included for follow-up questions.
  5. We return the answer with source article references.

Base URL

https://api-v2.tanyalahustaz.com/api/v1

Quick start

  1. Create a developer account and sign in.
  2. Go to Dashboard → API Keys and create a key.
  3. 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.

View OpenAPI docs →