Documentation

Everything you need to ship on Bhala's APIs.

Quick Start

1. Get your API key

Sign up and generate a key from the dashboard.

Get API Key

2. Install the SDK (optional)

Terminal
pip install bhala
# or
npm install @bhala/sdk

3. Make your first API call

embed.py
from bhala import Bhala

client = Bhala(api_key="bh_sk_...")

# Generate embeddings for Bantu text
response = client.embed(
    input="Sawubona, ngingakusiza kanjani?",
    model="bantu-embed-v1",
    dimensions=1024
)

print(response.data[0].embedding[:5])
# [0.0234, -0.0891, 0.1456, 0.0312, -0.0678]

API Reference

POST /v1/embed

Embeddings

Generate vector embeddings for Bantu text.

POST /v1/translate

Translation

Translate between African languages.

POST /v1/identify

Language ID

Identify which language a text is written in.

POST /v1/analyze

NER

Named entity recognition for Bantu text.

POST /v1/analyze

Sentiment

Sentiment analysis for Bantu text.

POST /v1/classify

Classification

Text classification and content moderation.

POST /v1/correct

Grammar Correction

Grammatical error correction for Bantu text.

POST /v1/detect

Error Detection

Detect grammatical errors without correcting.

Full documentation coming soon

Guides, tutorials, and full API reference landing soon. Get notified at launch.