Documentation

Everything you need to integrate Bhala's APIs into your application.

Quick Start

1. Get your API key

Sign up for a free account and generate your API 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=256
)

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 Bantu languages.

POST /v1/identify

Language ID

Identify which Bantu 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.

Full documentation coming soon

We're building comprehensive docs with guides, tutorials, and full API reference. Get notified when they launch.