Validate Text
Detects and verifies Qur'an and hadith quotations inside arbitrary text. Send a block of text — an LLM answer, a user message, an article — and it comes back with the Qur'anic verses and hadith tagged and linked to their canonical sources. Quotations that cannot be confirmed are returned as plain, untagged text, which is the signal callers act on.<br/><br/>Verified Qur'anic verses are replaced with authenticated Quran text wrapped in <quran_start> / <quran_end> with a [surah:ayah](quran.com) markdown reference; verified hadith are wrapped in <hadith_start> / <hadith_end> with a [collection:number](sunnah.com) reference. To render, strip the tags and keep the links.<br/><br/>Example — input:<br/><code>قال الله تعالى: إن الصلاة تنهى عن الفحشاء والمنكر. وقال النبي صلى الله عليه وسلم: إنما الأعمال بالنيات.</code><br/><br/>Output text:<br/><code>قال الله تعالى: <quran_start>ٱتْلُ مَآ أُوحِىَ إِلَيْكَ مِنَ ٱلْكِتَـٰبِ وَأَقِمِ ٱلصَّلَوٰةَ ۖ إِنَّ ٱلصَّلَوٰةَ تَنْهَىٰ عَنِ ٱلْفَحْشَآءِ وَٱلْمُنكَرِ ۗ وَلَذِكْرُ ٱللَّهِ أَكْبَرُ ۗ وَٱللَّهُ يَعْلَمُ مَا تَصْنَعُونَ ٤٥<quran_end> وقال النبي صلى الله عليه وسلم: <hadith_start>إنما الأعمال بالنيات<hadith_end> riyadussalihin:1</code><br/><br/>The partially quoted verse is replaced with the full authenticated ayah and cited; the hadith is tagged and cited. An unverifiable quotation would come back untagged.<br/><br/>This endpoint requires additional authorization and is not allowed by default. Please contact <a href='mailto:support@fanar.qa'>support@fanar.qa</a>.
Request
- Base URL: https://api.fanar.qa (the document declares no server; this is the origin it was published from)
- URL: https://api.fanar.qa/v1/sadiq/validate
- Auth: HTTP bearer
Request body
Example request
{
"model": "Fanar-Sadiq-2",
"text": "قال الله تعالى: إن الصلاة تنهى عن الفحشاء والمنكر. وقال النبي صلى الله عليه وسلم: إنما الأعمال بالنيات."
}Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.