API Reference · Implementation details
AgriMbaza QA Evaluation API
The service our team exposes to the AgriMbaza Platform. It answers agricultural questions (Simple QA and Reasoning), transcribes Kinyarwanda speech, and synthesises Kinyarwanda audio.
https://api.agrimbaza.awesomity.rwBearer token
Required on every /v1 endpoint. Send it as Authorization: Bearer <token>.
OpenAPI documentation
Interactive Swagger UI with Try it out. Click Authorize and paste the token.
Postman
Every request with descriptions, saved examples and tests. Set baseUrl and token in the collection variables.
Authentication
All /v1 endpoints use HTTP Bearer auth. The documentation pages and /openapi.json are public; the endpoints are not.
export BASE_URL=https://api.agrimbaza.awesomity.rw
export TOKEN='<bearer token shared with you>'
curl "$BASE_URL/v1/health" -H "Authorization: Bearer $TOKEN"Endpoints
Listed in the order the evaluation runs them. Each request is independent; no conversation history is kept.
| Endpoint | Track | Returns | Time limit |
|---|---|---|---|
GET/v1/health | All | 200 when ready, 503 otherwise | Short |
GET/v1/info | All | Provider, model and tracks (JSON) | Short |
POST/v1/llm | Simple QA · Reasoning | { "answer", "thinking" } | 60 s / 180 s |
POST/v1/asr | ASR | { "transcript" } | 60 s |
POST/v1/tts | TTS | WAV bytes (audio/wav) | 60 s |
Request examples
LLM accepts rw or en questions; ASR and TTS accept rw (Kinyarwanda) only. TTS responds with audio/wav, not JSON.
/v1/llm· Simple QA & Reasoningcurl -X POST "$BASE_URL/v1/llm" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "llm_dc4112d36b57",
"language": "en",
"question_type": "reasoning",
"question": "How many maize plants per hectare at 75 x 25 cm?"
}'/v1/asr· Speech recognitioncurl -X POST "$BASE_URL/v1/asr" \
-H "Authorization: Bearer $TOKEN" \
-F "audio=@clip_001.wav;type=audio/wav" \
-F "id=clip_001" \
-F "language=rw"/v1/tts· Speech synthesiscurl -X POST "$BASE_URL/v1/tts" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"id": "tts_001", "language": "rw", "text": "Muraho"}' \
--output speech.wavErrors & retries
Errors are always JSON. The service never returns 200 with a body that breaks the specification.
{ "error": { "code": "unauthorized", "message": "Missing or invalid bearer token." } }