Getting started · 01

Introduction to Andebet API

Andebet provides speech intelligence infrastructure built specifically for Ethiopian languages and complex multilingual conversational speech. Our API converts spoken audio into timestamped, speaker-separated text, extracts verifiable evidence, and enables downstream qualitative analysis.

Regional Acoustic Tuning

Models calibrated on spoken Amharic, Afaan Oromoo, Tigrinya, and Ethiopian English.

Verifiable Evidence Anchors

Every sentence, summary claim, and entity links directly to start/end audio timestamps.

Getting started · 02

Quickstart

Submit your first recording in under 60 seconds with cURL or your preferred backend environment:

# 1. Export your development key
export ANDEBET_API_KEY="and_dev_YOUR_KEY_HERE"
# 2. Submit audio for transcription
curl -X POST https://api.andebet.ai/v1/transcriptions \
-H "Authorization: Bearer $ANDEBET_API_KEY" \
-F "language=auto" \
-F "diarization=true" \
-F "evidence_timestamps=true"
What to expect:

For files under 120 seconds, the API responds synchronously with HTTP 200 OK containing the complete transcript, speaker tags, and evidence array. For longer recordings, the API returns 202 Accepted with a job ID for polling or webhook dispatch.

Getting started · 03

API Keys & Environments

Andebet uses two distinct key environments to separate local testing from live production workloads:

and_dev_...
Development Sandbox

Includes 45 free minutes on signup, isolated 15 RPM rate limits, and full debug logging. No credit card required.

and_live_...
Production Keys

Used in live user-facing applications with 600 RPM default concurrency and production SLA guarantees.

Getting started · 04

Supported Languages & Code-Switching

Pass language as a parameter or leave as auto for acoustic language identification:

CodeLanguageScriptDialects Supported
amAmharic (አማርኛ)Ge'ezAddis Ababa, Gondar, Wollo, Gojjam
omAfaan OromooQubee (Latin)Central (Shewa), Western (Wollega), Eastern (Harar)
tiTigrinya (ትግርኛ)Ge'ezMekelle, Central Tigray
enEthiopian EnglishLatinColloquial mixed business & tech speech
Core concepts · 01

Authentication

Every API request must include the standard HTTP Authorization: Bearer <key> header. Requests without a valid key receive an immediate 401 Unauthorized response.

bash
# Valid authorization header
Authorization: Bearer and_live_7f4c9a8102bd482ae019
Core concepts · 02

Audio Inputs & Requirements

Andebet supports direct multipart file uploads or public HTTPS download URLs. Audio is ingested without lossy pre-compression:

Supported FormatsMP3, WAV, FLAC, M4A, AAC, OGG Opus
Sample Rates8 kHz (telephony) to 48 kHz (studio)
Channel LayoutMono or Stereo (processed natively)
Audio Stream URLs vs. YouTube / Webpage Links

The API requires direct media streams (e.g. public .mp3, .wav, .m4a links) or multipart uploads. Passing raw HTML webpage URLs (such as https://www.youtube.com/watch?v=...) into audio_url returns an HTTP 400 with code unsupported_audio_source.

To transcribe YouTube videos, talk shows, or podcasts, extract the audio track first using yt-dlp or ffmpeg before submitting:

yt-dlp -x --audio-format mp3 -o "interview.mp3" "https://www.youtube.com/watch?v=..."
Core concepts · 03

Response Schema & Verifiable Evidence

Successful transcriptions return a structured payload with verbatim segments, pre-formatted subtitle captions, and citation evidence:

json
{
"id": "job_01J8YV9X2KM04",
"object": "transcription",
"status": "completed",
"language": "om",
"duration_seconds": 15.07,
"usage": {
"audio_seconds": 15.07,
"billed_units": 1
},
"text": "Daangiti tokko hanga waggaa tokkoofi ji'a sadii dokumantiin isaachuma keessa jira...",
"subtitles": {
"srt": "1\n00:00:00,000 --> 00:00:05,800\n[Speaker 1] Daangiti tokko hanga waggaa tokkoofi ji'a sadii dokumantiin isaachuma keessa jira.\n",
"vtt": "WEBVTT - Generated by Andebet AI Speech Intelligence\n\n1\n00:00:00.000 --> 00:00:05.800\n<v Speaker 1>Daangiti tokko hanga waggaa tokkoofi ji'a sadii dokumantiin isaachuma keessa jira.\n"
},
"evidence_markers": [
{
"id": "ev_1",
"startTime": 0.0,
"label": "Document Retention Timeline",
"quote": "Daangiti tokko hanga waggaa tokkoofi ji'a sadii...",
"confidence": 0.98
}
],
"segments": [
{
"id": "seg_001",
"speaker": "Speaker 1",
"start": 0.0,
"end": 5.8,
"text": "Daangiti tokko hanga waggaa tokkoofi ji'a sadii dokumantiin isaachuma keessa jira.",
"translation": "The document remains active within the system for up to one year and three months.",
"confidence": 0.96
}
]
}
Core concepts · 04

Subtitles & Video Captions (SRT & WebVTT)

Andebet provides native caption generation designed for YouTube, broadcast television, and editing software. Every successful transcription generates sub-second synchronized SubRip (.srt) and WebVTT (.vtt) files.

Direct SubRip (.srt) Download

Pass format=srt to receive the raw .srt file directly, compatible with YouTube Studio, Adobe Premiere, DaVinci Resolve, and VLC.

Direct WebVTT (.vtt) Download

Pass format=vtt to receive HTML5 video captions with standardized speaker tags (<v Speaker>).

Complete YouTube Subtitle Generator Script (Python)

This production-ready Python script extracts audio from a YouTube link, submits it to Andebet, and saves the subtitles file:

import os
import subprocess
import requests
YOUTUBE_URL = "https://www.youtube.com/watch?v=YOUR_VIDEO_ID"
API_KEY = os.environ.get("ANDEBET_API_KEY", "and_live_...")
# 1. Extract audio track with yt-dlp
print("Downloading audio track...")
subprocess.run([
"yt-dlp", "-x",
"--audio-format", "mp3",
"--audio-quality", "0",
"-o", "audio.mp3",
YOUTUBE_URL
], check=True)
# 2. Transcribe with Andebet (requesting .srt format directly)
print("Generating Ethiopian language subtitles with Andebet...")
with open("audio.mp3", "rb") as audio_file:
response = requests.post(
"https://api.andebet.ai/v1/transcriptions?format=srt",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": audio_file},
data={
"language": "om", # "am" for Amharic, "om" for Oromo, "ti" for Tigrinya, or "auto"
"diarization": "true"
}
)
response.raise_for_status()
# 3. Write subtitle file
with open("subtitles.srt", "w", encoding="utf-8") as srt_file:
srt_file.write(response.text)
print("Done! 'subtitles.srt' is ready to upload to YouTube Studio.")
Core concepts · 05

Synchronous vs. Asynchronous Processing

Andebet enforces an unambiguous processing contract based on file duration:

200 OKSynchronous Execution (≤ 120s / ≤ 25MB)

The HTTP connection stays open and returns the complete transcription object in 800ms–2.5s.

202 AcceptedAsynchronous Job Queue (> 120s or async=true)

The API returns immediately with an assigned job ID (tra_...) and polling endpoint. Supports files up to 4 hours (500 MB).

Core concepts · 06

Polling & Webhook Callbacks

For asynchronous jobs, you can poll status or configure an automatic webhook delivery:

bash
# Status Polling via GET
curl -X GET https://api.andebet.ai/v1/transcriptions/tra_01J9KW2X89LM02 \
-H "Authorization: Bearer $ANDEBET_API_KEY"
Production · 01

Error Catalog & Recovery

All error responses adhere to a consistent contract with an actionable explanation and request ID:

error-response.json
400
{
"error": {
"code": "unsupported_audio_format",
"message": "Expected audio MIME type. Received application/pdf.",
"param": "file",
"request_id": "req_01J8YV9ERR02"
}
}
Production · 02

Idempotency

Include an Idempotency-Key: <UUID> header on all POST requests. If a request times out or is interrupted, retrying with the same idempotency key guarantees the server returns the cached result without duplicating billing.

Production · 03

Security & Data Retention

Audio is encrypted using TLS 1.3 in transit and AES-256 at rest. Recordings are retained for 30 days by default. To process sensitive audio in memory without persistence, pass retention=none. Customer data is never used to train public foundational models.

Production · 04

Billing & Usage Metering

Transcription usage is measured strictly by actual audio duration in 1-second increments (rounded to nearest second, with a 15-second minimum). Failed requests (4xx and 5xx responses) are never billed.

SDKs & integrations · 01

TypeScript / Node.js

transcribe.ts
import { AndebetClient } from '@andebet/sdk';
import fs from 'fs';
const apiKey = process.env.ANDEBET_API_KEY;
if (!apiKey) throw new Error('ANDEBET_API_KEY is required.');
const andebet = new AndebetClient({ apiKey });
const result = await andebet.transcriptions.create({
file: fs.createReadStream('interview.mp3'),
language: 'auto',
diarization: true,
evidenceTimestamps: true,
});
console.log('ID:', result.id);
console.log('Detected Language:', result.language_detected);
SDKs & integrations · 02

Python

transcribe.py
import os
from andebet import Andebet
api_key = os.environ.get("ANDEBET_API_KEY")
if not api_key:
raise ValueError("ANDEBET_API_KEY is required.")
client = Andebet(api_key=api_key)
with open("interview.mp3", "rb") as f:
result = client.transcriptions.create(
file=f,
language="auto",
diarization=True,
evidence_timestamps=True
)
print(f"ID: {result.id}")
SDKs & integrations · 03

HMAC Webhook Verification (Production)

Verify webhook deliveries against replay attacks using the timing-safe HMAC validator:

verify-webhook.ts
import crypto from 'crypto';
export function verifyWebhookSignature({ rawPayload, signatureHeader, secret, toleranceSeconds = 300 }) {
if (!signatureHeader || !rawPayload || !secret) return false;
const parts = signatureHeader.split(',');
const timestampStr = parts.find(p => p.startsWith('t='))?.slice(2);
const signatureHex = parts.find(p => p.startsWith('v1='))?.slice(3);
if (!timestampStr || !signatureHex) return false;
const timestamp = parseInt(timestampStr, 10);
if (isNaN(timestamp) || Math.abs(Math.floor(Date.now() / 1000) - timestamp) > toleranceSeconds) {
return false; // Replay attack detected
}
const hmac = crypto.createHmac('sha256', secret);
hmac.update(`${timestamp}.${rawPayload}`);
const expectedHex = hmac.digest('hex');
const sigBuf = Buffer.from(signatureHex, 'hex');
const expBuf = Buffer.from(expectedHex, 'hex');
return sigBuf.length === expBuf.length && crypto.timingSafeEqual(sigBuf, expBuf);
}