Developer Platform

Build across 40+ languages, zero-shot

REST APIs, Python and Node SDKs. Drop-in replacement for Voyage, Cohere, or OpenAI embeddings.

Quick Start

1. Get your API key

Sign up and generate your API key. Every account starts with free credits.

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 any supported language
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]
POST /v1/embed
curl -X POST https://api.bhala.ai/v1/embed \
  -H "Authorization: Bearer bh_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "input": "Sawubona, ngingakusiza kanjani?",
    "model": "bantu-embed-v1",
    "dimensions": 1024
  }'
Response
{
  "object": "embedding",
  "data": [{
    "embedding": [0.0234, -0.0891, 0.1456, ...],
    "dimensions": 1024
  }],
  "usage": { "total_tokens": 8 }
}
bhala_demo.py
from bhala import Bhala

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

# Generate embeddings for any supported language
embeddings = client.embed(
    input="Sawubona, ngingakusiza kanjani?",
    model="bantu-embed-v1"
)
print(len(embeddings.data[0].embedding))
# → 1024

# Translate English → IsiZulu
result = client.translate(
    text="Your payment was successful.",
    source="en",
    target="zu"
)
print(result.translation)
# → "Inkokhelo yakho iphumelele."

Steer any embedding. Get a signed receipt.

Apply named actions — remove bias, redirect intent, shift sentiment — and get back the shifted vector plus a cryptographic audit record. Every intervention reversible.

POST /v1/embeddings/shift
curl https://api.bhala.ai/v1/embeddings/shift \
  -H "Authorization: Bearer $BHALA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The nurse asked the doctor about his prescription.",
    "lang": "en",
    "operators": [
      { "id": "gender_bias", "alpha": -1.0 }
    ]
  }'

# → {
#   "embedding": [ ... 1024 floats ... ],
#   "operators_applied": [
#     { "id": "gender_bias", "alpha": -1.0,
#       "shift_norm": 0.218, "latency_ms": 19 }
#   ],
#   "model": "sci-v3",
#   "audit_id": "aud_01HZ4K..."
# }

Why developers choose Bhala

Drop-in replacement

Same REST interface as OpenAI, Cohere, or Voyage. Switch your base URL.

No NLP expertise needed

Noun classes, agglutination, and tonal patterns handled. Send text, get results.

Start free, scale to millions

2M embedding tokens and 200K translation characters free. Pay-as-you-go from $0.08/1M tokens.

Start building with Bhala

Free API access. Integrate cross-lingual understanding today.