Documentation
Everything you need to ship on Bhala's APIs.
Quick Start
2. Install the SDK (optional)
Terminal
pip install bhala
# or
npm install @bhala/sdk3. 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/embedEmbeddings
Generate vector embeddings for Bantu text.
POST /v1/translateTranslation
Translate between African languages.
POST /v1/identifyLanguage ID
Identify which language a text is written in.
POST /v1/analyzeNER
Named entity recognition for Bantu text.
POST /v1/analyzeSentiment
Sentiment analysis for Bantu text.
POST /v1/classifyClassification
Text classification and content moderation.
POST /v1/correctGrammar Correction
Grammatical error correction for Bantu text.
POST /v1/detectError Detection
Detect grammatical errors without correcting.
Full documentation coming soon
Guides, tutorials, and full API reference landing soon. Get notified at launch.