Documentation

API Base URL: https://sangoai.app

Platform Guide

Chat Interface

The chat interface provides a conversational AI experience with streaming AI responses. Type your message and press Enter to send. The AI speaks Sango, French, and English and helps you learn vocabulary, grammar, and cultural context.

Translation

Translate text between Sango, French, and English: four directions (FR→SG, EN→SG, SG→FR, SG→EN), plus automatic detection of the source language. The AI provides contextual translations with cultural awareness.

Vocabulary & Learning

The Learn page includes hundreds of verified Sango words with pronunciation guides, flashcards, quizzes, and fill-in-the-blank exercises organized by category (greetings, numbers, colors, family, food, etc.) and difficulty level.

Keyboard Shortcuts

  • Enter — Send message
  • Shift + Enter — New line

API Reference

The translation and vocabulary endpoints are publicly accessible without authentication. The chat endpoint requires a JWT token. See the Developer Portal for working code examples.

POST /api/v1/translate

Translate text between French, English, and Sango. No authentication required.

Request Body

{
  "text": "Bonjour, comment allez-vous?",
  "source_language": "french",   // "french" | "sango" | "english" | "auto"
  "target_language": "sango",    // "french" | "sango" | "english"
  "include_alternatives": false  // optional
}

Response (200)

{
  "translated_text": "Bara âla, tongana nye?",
  "source_language": "french",
  "target_language": "sango",
  "word_count": 3,
  "confidence": 0.95
}

Search the verified Sango vocabulary database. Returns matching words with pronunciation guides and example sentences. No authentication required.

Request Body

{
  "query": "hello",       // search term
  "limit": 10,            // max results (default 10)
  "status": "verified"    // filter by status
}

Response (200)

{
  "words": [{
    "word_id": "gree-903",
    "sango": "bala ala",
    "french": "bonjour",
    "english": "hello",
    "category": "greetings",
    "difficulty": "beginner",
    "pronunciation_guide": "Ba-la ala"
  }],
  "count": 1,
  "total_available": 600
}

GET /api/v1/vocabulary/random/{count}

Get random verified vocabulary words. Useful for quiz games and flashcards. No authentication required.

Response (200)

{
  "words": [{
    "word_id": "colo-951",
    "sango": "sango ya nzöngo",
    "french": "jaune",
    "english": "yellow",
    "category": "colors",
    "difficulty": "beginner"
  }],
  "count": 5
}

POST /api/v1/chat

AI-powered Sango language assistant. Requires authentication (JWT token).

Headers

Authorization: Bearer <JWT_TOKEN>
Content-Type: application/json

Request Body

{
  "message": "How do you say goodbye in Sango?",
  "mode": "learning"
}

Authentication

  • Public endpoints (translate, vocabulary): No authentication needed. Just send your request.
  • Protected endpoints (chat, user progress): Require an Authorization: Bearer <JWT> header. Users authenticate via Google OAuth or email/password on the SangoAI web app.
  • API keys: the keyed API (https://api.sangoai.app, X-API-Key header) has its own plans, quotas and rate limits — see API keys & pricing.

Error Handling

StatusDescription
200Success
400Bad request — invalid or missing parameters
401Unauthorized — missing or invalid JWT token
403Forbidden — API key revoked or expired
429Rate limit exceeded — retry after backoff
500Internal server error

Language Support

Supported Languages

  • Sango (Sängö) — co-official language of the Central African Republic (with French)
  • French (Français) — co-official language of the CAR, with Sango
  • English — for international users

Sango Orthography

SangoAI uses the standard Sango orthography with diacritics: â, ê, ë, î, ö, ô, û, ü, ï. The translation engine handles accent-insensitive matching for input.

Privacy

Text you translate and messages you send to the chat assistant are sent to our servers so they can be answered. The service providers that process them on our behalf — such as cloud hosting and infrastructure — act only on our instructions and may not use your data for their own purposes. Please do not submit personal or confidential information. Our Privacy Policy is the full statement.