# Fanar API

**Canonical:** https://apis.io/apis/hbku/fanar-api/  
**Provider:** Hamad Bin Khalifa University — https://apis.io/providers/hbku/  
**Base URL:** https://api.fanar.qa  
**Documentation:** https://api.fanar.qa/docs

Fanar API is one of 5 APIs that [Hamad Bin Khalifa University](https://apis.io/providers/hbku/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. This API exposes 2 JSON Schema definitions. Tagged areas include Artificial Intelligence, Large Language Models, Arabic, Speech, and Translation. The published artifact set on APIs.io includes an OpenAPI specification, an API reference, API documentation, release notes, authentication docs, rate-limit docs, and 2 JSON Schemas.

Fanar is Qatar's Arabic generative-AI platform, developed by the Qatar Computing Research Institute at Hamad Bin Khalifa University with support from Qatar's Ministry of Communications and Information Technology. The API publishes a first-party OpenAPI 3.1.0 document at api.fanar.qa/openapi.json: 11 paths and 12 operations spanning chat completions (streaming over text/event-stream), text-to-speech, transcription, custom voices, image generation, translation, poetry generation, moderation, tokenization and model listing. It is OpenAI-client compatible — the provider's own sample points the openai SDK at base_url https://api.fanar.qa/v1. Bearer authentication, fourteen documented error statuses behind a single Error envelope, and a published per-model rate-limit table with x-ratelimit-* and ratelimit-policy response headers. Access is by request. Verified live 2026-08-30: GET /v1/models returns 401 invalid_authentication.

## Operations (12)

| Method | Path | Summary |
|---|---|---|
| POST | `/v1/chat/completions` | Create Chat Completion |
| POST | `/v1/audio/speech` | Create Speech |
| POST | `/v1/audio/transcriptions` | Create Transcription |
| GET | `/v1/audio/voices` | List Voices |
| POST | `/v1/audio/voices` | Create Voice |
| DELETE | `/v1/audio/voices/{name}` | Delete Voice |
| POST | `/v1/images/generations` | Create Image |
| POST | `/v1/translations` | Translate |
| POST | `/v1/poems/generations` | Create Poem |
| POST | `/v1/moderations` | Identify Safety |
| POST | `/v1/tokens` | Get Tokens |
| GET | `/v1/models` | List Models |

## Machine-readable artifacts (17)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/openapi/hbku-fanar-api-openapi.yml
- **APIReference** — https://api.fanar.qa/docs
- **Documentation** — https://fanar.qa/en
- **SignUp** — https://api.fanar.qa/request/en
- **TermsOfService** — https://fanar.qa/en/terms-of-services
- **PrivacyPolicy** — https://fanar.qa/en/privacy-policy
- **ReleaseNotes** — https://fanar.qa/en/2-0-release-notes
- **Authentication** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/authentication/hbku-authentication.yml
- **ErrorCatalog** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/errors/hbku-fanar-errors.yml
- **RateLimits** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/rate-limits/hbku-rate-limits.yml
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/json-schema/hbku-fanar-error-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/json-schema/hbku-fanar-models-response-schema.json
- **Examples** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/examples/hbku-fanar-models-401-example.json
- **Examples** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/examples/hbku-fanar-chat-completion-example.json
- **Lifecycle** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/lifecycle/hbku-lifecycle.yml
- **SourceCode** — https://huggingface.co/QCRI
- **APIsJSON** — https://raw.githubusercontent.com/api-evangelist/hbku/refs/heads/main/apis.yml

## Other Hamad Bin Khalifa University APIs (4)

- [Farasa Web API](https://apis.io/apis/hbku/farasa-api/)
- [Elmi Research Portal — OAI-PMH](https://apis.io/apis/hbku/elmi-oai-pmh/)
- [HBKU Academic Catalog — Course Search](https://apis.io/apis/hbku/course-catalog-search/)
- [Manara — Qatar Research Repository (HBKU portal)](https://apis.io/apis/hbku/manara-repository/)

## Tags

Artificial Intelligence, Large Language Models, Arabic, Speech, Translation, Content Moderation

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/hbku/fanar-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/hbku/.
