Loading...
Loading...
Full documentation for every endpoint in the Mizan Core Engine API. All endpoints return JSON and use standard HTTP methods.
http://localhost:8000/healthService health check. Returns embedding provider status when semantic analysis is enabled.
{
"status": "healthy",
"version": "0.2.0",
"embedding": {
"provider": "local",
"model": "intfloat/multilingual-e5-base",
"dimension": 768
}
}/api/v1/surahsList all 114 surahs with metadata (name, verse count, revelation type, etc.).
[
{
"number": 1,
"name_arabic": "الفاتحة",
"name_english": "Al-Fatiha",
"name_transliteration": "Al-Fatihah",
"verse_count": 7,
"revelation_type": "meccan"
}
]/api/v1/verses/{surah}/{verse}Get a specific verse by surah number (1-114) and verse number.
{
"surah_number": 1,
"verse_number": 1,
"text_uthmani": "بِسْمِ اللَّهِ الرَّحْمَـنِ الرَّحِيمِ",
"text_simple": "بسم الله الرحمن الرحيم",
"juz": 1,
"hizb": 1,
"page": 1
}/api/v1/analysis/verse/{surah}/{verse}Full analysis of a verse: letter count, word count, and Abjad value with breakdown.
{
"surah_number": 1,
"verse_number": 1,
"text": "بِسْمِ اللَّهِ الرَّحْمَـنِ الرَّحِيمِ",
"letter_count": 19,
"word_count": 4,
"abjad_value": 786
}/api/v1/analysis/letters/countCount letters in arbitrary Arabic text. Pass text as a query parameter.
text(string, required)- Arabic text to countmethod(string)- traditional | uthmani_full | no_wasla (default: traditional){
"text": "بسم الله",
"letter_count": 6,
"method": "traditional"
}/api/v1/analysis/abjadCalculate Abjad numerical value of Arabic text.
text(string, required)- Arabic text to calculatesystem(string)- mashriqi | maghribi (default: mashriqi){
"text": "الله",
"abjad_value": 66,
"system": "mashriqi"
}/api/v1/library/spacesCreate a new library space for organizing text sources.
{
"id": "uuid-here",
"name": "Tafsir Collection",
"description": "Classical tafsir texts",
"created_at": "2026-03-14T12:00:00Z"
}/api/v1/library/spacesList all library spaces.
[
{
"id": "uuid-here",
"name": "Tafsir Collection",
"source_count": 3,
"created_at": "2026-03-14T12:00:00Z"
}
]/api/v1/library/spaces/{id}/sourcesAdd a text source to a library space. Supports QURAN, TAFSIR, HADITH, and OTHER types.
{
"id": "uuid-here",
"title": "Tafsir Ibn Kathir - Al-Fatiha",
"source_type": "TAFSIR",
"indexing_status": "PENDING"
}/api/v1/library/sources/{id}Get source details including indexing status and chunk count.
{
"id": "uuid-here",
"title": "Tafsir Ibn Kathir - Al-Fatiha",
"source_type": "TAFSIR",
"indexing_status": "INDEXED",
"chunk_count": 12
}/api/v1/library/sources/{id}/indexStart async indexing of a text source. Splits text into chunks and generates embeddings.
{
"message": "Indexing started",
"source_id": "uuid-here",
"status": "INDEXING"
}/api/v1/library/sources/{id}Delete a text source and all its indexed chunks.
{
"message": "Source deleted",
"source_id": "uuid-here"
}/api/v1/search/semanticSearch across all indexed texts using natural language. Uses AI embeddings for meaning-based matching.
{
"results": [
{
"text": "Matching text passage...",
"source_type": "QURAN",
"similarity": 0.92,
"metadata": {}
}
],
"total": 1
}/api/v1/verses/{surah}/{verse}/similarFind semantically similar verses to a given verse using vector embeddings.
limit(integer)- Max results (default: 10)min_similarity(float)- Minimum similarity 0-1 (default: 0.7){
"source_verse": {
"surah": 1,
"verse": 1
},
"similar": [
{
"surah_number": 27,
"verse_number": 30,
"similarity": 0.89,
"text": "Similar verse text..."
}
]
}