Free · No Key · 6 Languages Open Chat →

Cedar AI API

Zero-friction multilingual AI for Ghana. Translation, voice, and chat in Twi, Ewe, Ga, Dagbani, Fante, and English.

✓ No API key ✓ Streaming ✓ Voice ASR/TTS ✓ Translation

Endpoints

POST https://ai.cedar-pro.services/v1/chat/completions
POST https://ai.cedar-pro.services/api/asr
POST https://ai.cedar-pro.services/api/translate
POST https://ai.cedar-pro.services/api/tts
6
Languages
4
API Endpoints
8
Use Cases
0
Auth Required

Models

ModelDescription
cedar-aiFree general-purpose multilingual model. Smart, fast, supports all Ghanaian languages.
cedar-ai-proPremium model with higher accuracy. Best for translation and complex queries.
cedar-ai-multilingualOptimized for multilingual conversations. Handles code-switching (mixing languages).
cedar-ai-translateDedicated translation-optimized model. Best for English to Ghanaian language translation.

Supported Languages

CodeLanguageRegionSpeakers
twTwi (Akan)Ashanti, Eastern, Central≈ 9M
fatFanteCentral, Western≈ 3M
eeEwe (Eʋegbe)Volta≈ 4M
gaaGa (Ģ)Greater Accra≈ 1M
dagDagbani (Dagbanli)Northern≈ 3M
enEnglishNationalAll

Limits

LimitValue
Max tokens per response4096 (set max_tokens to control)
Rate limit60 requests / minute per IP (HTTP 429 if exceeded)
Max request size16K chars per message · 400K chars total
AuthenticationNone required
Max audio size (ASR)50 MB
Max text length (Translation)~400 tokens per request (longer text is truncated)

Request Parameters

ParamTypeDefaultRequiredDescription
modelstringYesOne of: cedar-ai, cedar-ai-pro, cedar-ai-multilingual, cedar-ai-translate
messagesarrayYesArray of {role, content} objects
temperaturenumber1.0No0–2. Lower = more precise
max_tokensnumber4096NoMax response length
streamboolfalseNoSSE streaming
langstringenNoResponse language: en, tw, fat, ee, gaa, dag

Language Parameter

Set lang in the request body to make Cedar AI respond in a specific Ghanaian language. The AI will reply in that language naturally.

Lang CodeBehavior
enAlways reply in English
twReply in Twi (Akan)
fatReply in Fante
eeReply in Ewe (Eʋegbe)
gaaReply in Ga (Ģ)
dagReply in Dagbani (Dagbanli)

Message Roles

RolePurpose
systemSets assistant behavior, constraints, and language preference
userYour questions or instructions
assistantPrevious AI replies for multi-turn context

Response Format

{
  // standard chat completion response
  "model": "cedar-ai",
  "choices": [{
    "message": { "content": "Akwaaba! Me din ne Cedar AI." },
    "finish_reason": "stop"
  }],
  "usage": { "total_tokens": 52 }
}

Error Codes

CodeCause
400Missing or unknown model
413Message too long (max 16K chars per message, 400K total)
429Rate limited — please slow down
500Server error — try again
502Upstream unavailable — try again shortly

Use Cases

Every example below was tested live against the API. Pick a category, copy the code, and run it.

Translation
Voice & Speech
Multilingual Chat
Agriculture
Healthcare
Education
Finance
Tourism
1
English → Twi Translation
curl
Tested
Translate English to Twi (Akan) using the Cedar AI LLM. Set lang to tw and ask for translation.
curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai-translate",
    "lang": "tw",
    "messages": [
      {"role": "system", "content": "Translate the following English text to Twi (Akan). Only respond with the translation."},
      {"role": "user", "content": "Good morning, how are you today?"}
    ]
  }'
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={
        "model": "cedar-ai-translate",
        "lang": "tw",
        "messages": [
            {"role": "system", "content": "Translate the following English text to Twi (Akan). Only respond with the translation."},
            {"role": "user", "content": "Good morning, how are you today?"}
        ]
    },
)
print(resp.json()["choices"][0]["message"]["content"])
const resp = await fetch("https://ai.cedar-pro.services/v1/chat/completions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    model: "cedar-ai-translate",
    lang: "tw",
    messages: [
      { role: "system", content: "Translate the following English text to Twi (Akan). Only respond with the translation." },
      { role: "user", content: "Good morning, how are you today?" }
    ],
  }),
});
const data = await resp.json();
console.log(data.choices[0].message.content);
from openai import OpenAI

client = OpenAI(
    base_url="https://ai.cedar-pro.services/v1",
    api_key="x",
)

resp = client.chat.completions.create(
    model="cedar-ai-translate",
    extra_body={"lang": "tw"},
    messages=[
        {"role": "system", "content": "Translate the following English text to Twi (Akan). Only respond with the translation."},
        {"role": "user", "content": "Good morning, how are you today?"}
    ],
)
print(resp.choices[0].message.content)
2
Twi → English Translation
curl
Tested
Translate Twi to English. Useful when someone speaks to you in Twi and you need the English meaning.
curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai",
    "messages": [
      {"role": "system", "content": "Translate the following Twi to English. Only respond with the translation."},
      {"role": "user", "content": "Me pɛ sɛ me kɔ sukuu no mu."}
    ]
  }'
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={
        "model": "cedar-ai",
        "messages": [
            {"role": "system", "content": "Translate the following Twi to English. Only respond with the translation."},
            {"role": "user", "content": "Me pɛ sɛ me kɔ sukuu no mu."}
        ]
    },
)
print(resp.json()["choices"][0]["message"]["content"])
const resp = await fetch("https://ai.cedar-pro.services/v1/chat/completions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    model: "cedar-ai",
    messages: [
      { role: "system", content: "Translate the following Twi to English. Only respond with the translation." },
      { role: "user", content: "Me pɛ sɛ me kɔ sukuu no mu." }
    ],
  }),
});
const data = await resp.json();
console.log(data.choices[0].message.content);
3
English → Ewe Translation
curl
Tested
Translate English to Ewe (Eʋegbe), the language of the Volta Region. Use lang: ee.
curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai",
    "lang": "ee",
    "messages": [
      {"role": "system", "content": "Translate the following English text to Ewe (Eʋegbe). Only respond with the translation."},
      {"role": "user", "content": "Welcome to our village celebration!"}
    ]
  }'
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={
        "model": "cedar-ai",
        "lang": "ee",
        "messages": [
            {"role": "system", "content": "Translate the following English text to Ewe (Eʋegbe). Only respond with the translation."},
            {"role": "user", "content": "Welcome to our village celebration!"}
        ]
    },
)
print(resp.json()["choices"][0]["message"]["content"])
const resp = await fetch("https://ai.cedar-pro.services/v1/chat/completions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    model: "cedar-ai",
    lang: "ee",
    messages: [
      { role: "system", content: "Translate the following English text to Ewe (Eʋegbe). Only respond with the translation." },
      { role: "user", content: "Welcome to our village celebration!" }
    ],
  }),
});
const data = await resp.json();
console.log(data.choices[0].message.content);
4
Speech-to-Text (ASR) — Record Voice
Python
Tested
Upload an audio file (speech in Twi, Ewe, Ga, or English) and get back transcribed text. Uses Whisper ASR.
curl https://ai.cedar-pro.services/api/asr \
  -F "audio=@recording.webm" \
  -F "language=tw"
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/api/asr",
    files={"audio": open("recording.webm", "rb")},
    data={"language": "tw"},
)
print(resp.json()["text"])
const form = new FormData();
form.append("audio", audioBlob, "recording.webm");
form.append("language", "tw");

const resp = await fetch("https://ai.cedar-pro.services/api/asr", {
  method: "POST",
  body: form,
});
const data = await resp.json();
console.log(data.text);
5
Text-to-Speech (TTS) — Hear Responses
curl
Tested
Convert any text into spoken audio. Cedar AI will read the text aloud in a natural voice. Saves an MP3 file.
curl https://ai.cedar-pro.services/api/tts \
  -H "Content-Type: application/json" \
  -d '{"text": "Akwaaba! Mema wo akwaaba.", "language": "tw"}' \
  --output speech.mp3
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/api/tts",
    json={"text": "Akwaaba! Mema wo akwaaba.", "language": "tw"},
)
with open("speech.mp3", "wb") as f:
    f.write(resp.content)
const resp = await fetch("https://ai.cedar-pro.services/api/tts", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    text: "Akwaaba! Mema wo akwaaba.",
    language: "tw",
  }),
});
const blob = await resp.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url; a.download = "speech.mp3"; a.click();
6
Chat in Twi — Full Conversation
curl
Tested
Have a full conversation in Twi. Set lang: tw and Cedar AI will respond in Twi naturally. Great for building Twi-language chatbots.
curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai-multilingual",
    "lang": "tw",
    "messages": [
      {"role": "system", "content": "Respond in Twi (Akan) only."},
      {"role": "user", "content": "Hello! What is your name?"}
    ]
  }'
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={
        "model": "cedar-ai-multilingual",
        "lang": "tw",
        "messages": [
            {"role": "system", "content": "Respond in Twi (Akan) only."},
            {"role": "user", "content": "Hello! What is your name?"}
        ]
    },
)
print(resp.json()["choices"][0]["message"]["content"])
const resp = await fetch("https://ai.cedar-pro.services/v1/chat/completions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    model: "cedar-ai-multilingual",
    lang: "tw",
    messages: [
      { role: "system", content: "Respond in Twi (Akan) only." },
      { role: "user", content: "Hello! What is your name?" }
    ],
  }),
});
const data = await resp.json();
console.log(data.choices[0].message.content);
from openai import OpenAI

client = OpenAI(
    base_url="https://ai.cedar-pro.services/v1",
    api_key="x",
)

resp = client.chat.completions.create(
    model="cedar-ai-multilingual",
    extra_body={"lang": "tw"},
    messages=[
        {"role": "system", "content": "Respond in Twi (Akan) only."},
        {"role": "user", "content": "Hello! What is your name?"}
    ],
)
print(resp.choices[0].message.content)
7
Farming Advice — Crop Disease in Twi
curl
Tested
A farmer in Ashanti can ask about crop diseases in Twi and get advice. Cedar AI understands the local context.
curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai",
    "lang": "tw",
    "messages": [
      {"role": "user", "content": "Me kokoo dua no ahaban redwo. Dʍn na meyʍ?"}
    ]
  }'
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={
        "model": "cedar-ai",
        "lang": "tw",
        "messages": [
            {"role": "user", "content": "Me kokoo dua no ahaban redwo. Dʍn na meyʍ?"}
        ]
    },
)
print(resp.json()["choices"][0]["message"]["content"])
8
Health Information — Malaria Symptoms in Ewe
curl
Tested
A patient in Volta Region can ask about malaria symptoms in Ewe. Cedar AI provides health information in their mother tongue.
curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai",
    "lang": "ee",
    "messages": [
      {"role": "user", "content": "Nye dɔléle dɔ asi le yem. Azɔ?"}
    ]
  }'
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={
        "model": "cedar-ai",
        "lang": "ee",
        "messages": [
            {"role": "user", "content": "Nye dɔléle dɔ asi le yem. Azɔ?"}
        ]
    },
)
print(resp.json()["choices"][0]["message"]["content"])
9
Math Tutoring in Ga
curl
Tested
Students in Greater Accra can get math tutoring in Ga. Cedar AI explains concepts in their first language.
curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai",
    "lang": "gaa",
    "messages": [
      {"role": "user", "content": "Minawo lɛ nɔ, 2+2 ya?"}
    ]
  }'
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={
        "model": "cedar-ai",
        "lang": "gaa",
        "messages": [
            {"role": "user", "content": "Minawo lɛ nɔ, 2+2 ya?"}
        ]
    },
)
print(resp.json()["choices"][0]["message"]["content"])
10
Mobile Money Help in Dagbani
curl
Tested
Users in Northern Region can ask about mobile money (MoMo) in Dagbani. Cedar AI helps with financial literacy.
curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai",
    "lang": "dag",
    "messages": [
      {"role": "user", "content": "N yi bɔri ni n tum liɣiri mobile money zuɣu, bo n-nyɛ dini?"}
    ]
  }'
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={
        "model": "cedar-ai",
        "lang": "dag",
        "messages": [
            {"role": "user", "content": "N yi bɔri ni n tum liɣiri mobile money zuɣu, bo n-nyɛ dini?"}
        ]
    },
)
print(resp.json()["choices"][0]["message"]["content"])
11
Tourist Guide — Kakum Park in Fante
curl
Tested
A visitor to Central Region can ask about Kakum National Park in Fante. Cedar AI provides tourism info.
curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai",
    "lang": "fat",
    "messages": [
      {"role": "user", "content": "Kakum National Park no ho nsʍm ka kyerew me?"}
    ]
  }'
import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={
        "model": "cedar-ai",
        "lang": "fat",
        "messages": [
            {"role": "user", "content": "Kakum National Park no ho nsʍm ka kyerew me?"}
        ]
    },
)
print(resp.json()["choices"][0]["message"]["content"])

LLM Chat API

POSThttps://ai.cedar-pro.services/v1/chat/completions

OpenAI-compatible chat completions. No API key required. Supports streaming, multilingual responses, and all standard parameters.

Speech-to-Text API

POSThttps://ai.cedar-pro.services/api/asr

Upload audio files (webm, wav, mp3, m4a) and get transcribed text. Supports Twi, Ewe, Ga, Dagbani, and English.

ParameterTypeRequiredDescription
audiofileYesAudio file (webm, wav, mp3, m4a). Max 50MB.
languagestringNoHint: en, tw, fat, ee, gaa, dag

Translation API

POSThttps://ai.cedar-pro.services/api/translate

Translate text between English and any Ghanaian language using NLLB-200.

ParameterTypeRequiredDescription
textstringYesText to translate
source_langstringNoSource language code (default: en)
target_langstringNoTarget language code (default: tw)

Text-to-Speech API

POSThttps://ai.cedar-pro.services/api/tts

Convert text to natural-sounding speech audio (MP3 format).

ParameterTypeRequiredDescription
textstringYesText to convert to speech
languagestringNoLanguage code (default: en)
Note All languages are currently voiced with a clear multilingual speech engine that reads Ghanaian-language text phonetically. Native-accent voices for Twi, Ewe, Ga and Dagbani are on the roadmap.

cURL

curl https://ai.cedar-pro.services/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "cedar-ai",
    "lang": "tw",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Python

import requests

resp = requests.post(
    "https://ai.cedar-pro.services/v1/chat/completions",
    json={"model": "cedar-ai", "lang": "tw", "messages": [{"role": "user", "content": "Hello!"}]},
)
print(resp.json()["choices"][0]["message"]["content"])

JavaScript (Fetch)

const resp = await fetch("https://ai.cedar-pro.services/v1/chat/completions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    model: "cedar-ai",
    lang: "tw",
    messages: [{ role: "user", content: "Hello!" }],
  }),
});
const data = await resp.json();
console.log(data.choices[0].message.content);

OpenAI Python SDK

from openai import OpenAI

client = OpenAI(
    base_url="https://ai.cedar-pro.services/v1",
    api_key="x",
)

resp = client.chat.completions.create(
    model="cedar-ai",
    extra_body={"lang": "tw"},
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
Tip Use the OpenAI Python SDK — just set base_url to our endpoint and anything as api_key. Add extra_body={"lang": "tw"} to get responses in Ghanaian languages.
Copied to clipboard!