AgriMbazav1.0.0

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.

Base URLhttps://api.agrimbaza.awesomity.rw

Bearer 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.

Download collectionView documentation

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.

EndpointTrackReturnsTime limit
GET/v1/healthAll200 when ready, 503 otherwiseShort
GET/v1/infoAllProvider, model and tracks (JSON)Short
POST/v1/llmSimple QA · Reasoning{ "answer", "thinking" }60 s / 180 s
POST/v1/asrASR{ "transcript" }60 s
POST/v1/ttsTTSWAV 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.

POST/v1/llm· Simple QA & Reasoning
curl -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?"
  }'
POST/v1/asr· Speech recognition
curl -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"
POST/v1/tts· Speech synthesis
curl -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.wav

Errors & 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." } }
401Missing or wrong tokenNo retry
404Track not enabledNo retry
413Upload too largeNo retry
422Invalid requestNo retry
429Provider rate limit (Retry-After)Retry
500Provider rejected the requestRetry
502Provider error or contract-breaking outputRetry
503Provider unreachable / not ready (Retry-After)Retry
504Provider did not answer in timeRetry