NgamiaNgamiaDocs

Reference

Full API reference

Find the public Ngamia endpoints by workflow, credential type, and integration guide.

Use this page as the public endpoint map. Each group links to a focused guide with request fields, response examples, and integration notes. Privileged administration, upstream credentials, private infrastructure, and internal database operations are intentionally not documented here.

Most endpoints return {status, code, data, error_code, message, request_id}. Gateway routes use OpenAI-compatible response shapes where documented. The speech endpoint returns raw audio on success; all failed requests return JSON errors. See Errors and response format.

StepEndpointCredentialUse
1GET /v1/modelsAPI keyDiscover enabled paid models, modalities, parameters, and prices.
2GET /v1/billing/balanceAPI key or JWTConfirm the current credit balance.
3POST /v1/chat/completionsAPI key or JWTSend an OpenAI-compatible text or multimodal request.
4POST /v1/embeddingsAPI key or JWTCreate vectors for search and retrieval workflows.
5POST /v1/voice/responsesAPI key or JWTRun the combined Ongea na Ngamia Kiswahili voice flow.
6POST /v1/payments/topupJWTStart a TZS mobile-money top-up when credits are low.

Authentication

See Register, login & sessions and Authentication.

Method and pathCredentialPurpose
POST /v1/auth/registerNoneCreate an account pending verification.
POST /v1/auth/otp/verifyNoneVerify an email or phone code and receive tokens.
POST /v1/auth/otp/resendNoneResend a verification or reset code.
POST /v1/auth/loginNoneStart a session or MFA challenge.
POST /v1/auth/refreshRefresh tokenRotate the access and refresh token pair.
POST /v1/auth/logoutJWTInvalidate a refresh token.
POST /v1/auth/password/forgotNoneRequest a password-reset code.
POST /v1/auth/password/resetNoneSet a new password with a reset code.
GET /v1/auth/google/startNoneStart Google login in a browser.
GET /v1/auth/google/callbackNoneGoogle OAuth browser callback.
POST /v1/auth/google/mobileNoneNative Android: trade a Google ID token for a session.
GET /v1/auth/github/startNoneStart GitHub login in a browser.
GET /v1/auth/github/callbackNoneGitHub OAuth browser callback.
POST /v1/auth/camelNoneSign in with a verified CamelAccounts access token.

Account and workspaces

See Profile & workspaces.

Method and pathCredentialPurpose
GET /v1/meJWTRead the current profile.
PATCH /v1/meJWTUpdate name or avatar.
DELETE /v1/meJWTDelete the current account.
POST /v1/me/phoneJWTAdd or change the phone number; resets verification and fires an OTP.
GET /v1/workspacesJWTList workspaces available to the account.
POST /v1/workspacesJWTCreate a workspace.
GET /v1/workspaces/{slug}JWTRead one workspace.
PATCH /v1/workspaces/{slug}JWTRename or describe a workspace.
DELETE /v1/workspaces/{slug}JWTDelete a non-default workspace.

API keys

See API keys.

Method and pathCredentialPurpose
POST /v1/api-keysJWTCreate a key; the secret is shown once.
GET /v1/api-keysJWTList keys and their prefixes.
PATCH /v1/api-keys/{id}JWTRename a key.
DELETE /v1/api-keys/{id}JWTRevoke a key.

Models and AI gateway

See Models, Chat completions, Embeddings, Image generation, Video generation, and Voice & Ongea na Ngamia.

Method and pathCredentialPurpose
GET /v1/modelsAPI keyList enabled paid models and current catalog metadata.
GET /v1/models/{id}API keyRead one catalog record by resource id.
POST /v1/chat/completionsAPI key or JWTSend a streaming or non-streaming text/multimodal request.
POST /v1/embeddingsAPI key or JWTCreate a complete vector embedding response.
POST /v1/audio/transcriptionsAPI key or JWTTranscribe JSON/base64 or multipart audio.
POST /v1/audio/speechAPI key or JWTGenerate raw MP3 or PCM audio.
POST /v1/voice/responsesAPI key or JWTTranscribe, respond in Kiswahili or English, and optionally synthesize audio.
POST /v1/documents/analyzeAPI key or JWTAnalyze a PDF business document with a model instruction.
POST /v1/vision/analyzeAPI key or JWTAnalyze a private image with a model instruction.
POST /v1/video/analyzeAPI key or JWTAnalyze a private video with a model instruction.
POST /v1/images/generationsAPI key or JWTGenerate images as base64 through a catalog image-output model.
POST /v1/videosAPI key or JWTSubmit an async video generation; returns a job_id to poll.
GET /v1/videos/{job_id}API key or JWTPoll a video-generation job for status and settled cost.
GET /v1/videos/{job_id}/contentAPI key or JWTDownload a completed video generation as streamed bytes.
GET /v1/gateway/healthNoneAggregate upstream provider health (no per-provider detail).

Billing and payments

See Billing and Payments.

Method and pathCredentialPurpose
GET /v1/billing/balanceAPI key or JWTRead the current available credit balance.
GET /v1/billing/transactionsJWTList the account ledger.
POST /v1/payments/topupJWTStart a TZS mobile-money top-up.
GET /v1/paymentsJWTList account payments.
GET /v1/payments/{id}JWTRead one payment.

Activity and notifications

See Activity & analytics and Notifications.

Method and pathCredentialPurpose
GET /v1/activityJWTRead usage events across chat, embeddings, and voice services.
GET /v1/activity/summaryJWTRead usage totals for a period.
GET /v1/notificationsJWTRead in-app notifications.
PATCH /v1/notifications/{id}/readJWTMark one notification as read.
GET /v1/me/notification-preferencesJWTRead email and SMS preferences.
PATCH /v1/me/notification-preferencesJWTUpdate delivery preferences.

Public health check

Method and pathCredentialPurpose
GET /healthzNoneCheck that the API process is alive.

Do not infer private infrastructure, provider credentials, or privileged controls from the public endpoint list. Build integrations only against the documented routes and the live model catalog.