Sunbird AI API API

Welcome to the Sunbird AI API documentation. The Sunbird AI API provides access to

GitHub OpenAPI

Operations 74

POST /auth/register Register #
GET /auth/verify-email Verify Email #
POST /auth/resend-verification Resend Verification #
POST /auth/admin/send-verification-emails Send Verification Emails Backfill #
GET /auth/admin/verification-stats Verification Stats #
POST /auth/token Login For Access Token #
POST /auth/refresh-token Refresh Token #
GET /auth/me Read Users Me #
POST /auth/forgot-password Request Password Reset #
POST /auth/reset-password Reset Password #
POST /auth/change-password Change Password #
PUT /auth/profile Update Profile #
GET /auth/profile/status Profile Status #
GET /auth/google/login Auth:Google Login #
GET /auth/google/callback Auth:Google Callback #
POST /tasks/stt_from_gcs Speech To Text From Gcs #
POST /tasks/stt Speech To Text #
POST /tasks/org/stt Speech To Text Org #
POST /tasks/modal/stt Transcribe Audio via Modal Whisper ASR #
POST /tasks/audio/transcriptions Transcribe audio (unified STT endpoint) #
POST /tasks/audio/speech Generate speech (unified TTS endpoint) #
POST /tasks/audio/speech/batch Batch-generate speech (unified, sunbird-orpheus-tts only) #
GET /tasks/voice/speakers List speakers/voices (unified) #
GET /tasks/audio/speech/url Refresh a signed audio URL (unified) #
POST /tasks/translate Translate #
POST /tasks/language_id Language Id #
POST /tasks/auto_detect_audio_language Auto Detect Audio Language #
POST /tasks/sunflower_inference Sunflower Inference #
POST /tasks/sunflower_simple Sunflower Simple Inference #
POST /tasks/chat/completions OpenAI-compatible chat completion (Sunflower) #
POST /tasks/generate-upload-url Generate Upload URL #
POST /tasks/webhook/ Webhook #
GET /tasks/webhook/ Verify Webhook #
POST /tasks/webhook Webhook #
GET /tasks/webhook Verify Webhook #
POST /tasks/summarise Summarise #
GET /api/dashboard/usage Get Usage Stats #
GET /api/dashboard/usage-metrics Get Usage Metrics #
GET /api/billing/overview Get Billing Overview #
GET /api/billing/history Get Billing History #
GET /api/billing/transactions Get Billing Transactions #
GET /api/billing/rates Get Billing Rates #
GET /api/admin/analytics/filters Get Filter Options #
GET /api/admin/analytics/overview Get Overview #
GET /api/admin/analytics/by-organization Get By Organization #
GET /api/admin/analytics/by-organization-type Get By Organization Type #
GET /api/admin/analytics/by-sector Get By Sector #
GET /api/admin/analytics/users Get Users List #
PATCH /api/admin/analytics/users/{username}/account-type Update Account Type #
POST /api/admin/analytics/users/{username}/suspend Suspend User Account #
GET /api/admin/analytics/suspended-users/report Suspended Users Report #
POST /api/admin/analytics/users/{username}/reinstate Reinstate User Account #
POST /api/admin/analytics/users/{username}/pause Pause User Account #
POST /api/admin/analytics/users/{username}/unpause Unpause User Account #
GET /api/admin/analytics/users/{username}/pauses User Pause History #
GET /api/admin/analytics/by-user Get By User #
GET /api/admin/analytics/user-usage-metrics Get User Usage Metrics #
GET /api/admin/analytics/user-gpu-spend Get User Gpu Spend #
GET /api/admin/analytics/export Export Csv #
GET /api/admin/analytics/billing/summary Get Summary #
GET /api/admin/analytics/billing/timeseries Get Timeseries #
GET /api/admin/analytics/billing/providers Get Providers #
GET /api/admin/analytics/billing/breakdown Get Breakdown #
GET /api/admin/analytics/billing/table Get Table #
GET /api/admin/analytics/billing/export Export Csv #
POST /api/admin/analytics/billing/ai Billing Ai #
GET /api/admin/credits/user Get User Credits #
POST /api/admin/credits/grants Grant Credits #
GET /api/admin/credits/rates Get Rates #
PUT /api/admin/credits/rates Update Rates #
GET /api/admin/google-analytics/properties List Properties #
GET /api/admin/google-analytics/overview Get Overview #
POST /api/admin/google-analytics/refresh Refresh Overview #
GET /{full_path} Serve Spa #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sunbird-ai:sunbird-ai-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sunbird-ai-api-openapi.json Raw ↑
{"openapi":"3.1.0","info":{"title":"Sunbird AI API","description":"\nWelcome to the Sunbird AI API documentation. The Sunbird AI API provides access to\nSunbird's language models and AI services for Ugandan languages.\n\n## Supported Languages\n**English**, **Acholi**, **Ateso**, **Luganda**, **Lugbara**, **Runyankole**, **Swahili**\nand **20+** more Ugandan languages supported via sunflower.\n\n## Getting Started\nYou can checkout the [usage guide](https://docs.sunbird.ai/api-reference/introduction) for a full tutorial.\n\nFor quickstart tutorials, visit our\n[GitHub repository](https://github.com/SunbirdAI/sunbird-ai-api/blob/main/docs/tutorial.md)\n\n### Authentication\n\n#### Signing Up\nIf you don't already have an account, use the `/auth/register` endpoint to create one.\n\n#### Getting an Access Token\nAuthentication is done via a Bearer token. Use the `/auth/token` endpoint to get your\naccess token. This token lasts for 7 days.\n\nUse the `Authorize` button below to login and access the protected endpoints.\n\n## API Endpoints\n\n### Translation\n- **`POST /tasks/translate`** - Translate text between **67 African languages**\n  (plus English) using the `sunflower-9b` model. Languages are accepted as ISO\n  codes (`lug`) or full names (`Luganda`); `source_language` is optional\n  (auto-detected when omitted). Translation works between any pair of supported\n  languages; quality varies by language (see the model's good/moderate/basic tiers).\n\n### Language Detection\n- **`POST /tasks/language_id`** - Auto-detect the language of text input\n  (supports Acholi, Ateso, English, Luganda, Lugbara, Runyankole)\n\n### Speech-to-Text (STT)\n- **`POST /tasks/audio/transcriptions`** - STT endpoint, powered by\n  Sunbird's faster-whisper ASR model covering **51 African languages**\n  (`Sunbird/faster-whisper-51-african-languages`, a Whisper large-v3 fine-tune).\n  - `audio`: the audio file to transcribe (**required**). Supports WAV, MP3,\n    OGG, M4A, and more.\n  - `language`: ISO 639-3 code (**required**). The model reuses Whisper's\n    language-token slots for African languages, so automatic detection is\n    unreliable — always pass a language explicitly.\n  - `timestamps`: set `true` to also receive per-segment start/end times in the\n    `segments` field. Defaults to `false`.\n  - **51 supported languages**: Acholi (`ach`), Afrikaans (`afr`), Akan (`aka`),\n    Amharic (`amh`), Ateso (`teo`), Bambara (`bam`), Bemba (`bem`),\n    Berber (`ber`), Chichewa (`nya`), Dagaare (`dga`), Dagbani (`dag`),\n    English (`eng`), Ewe (`ewe`), French (`fra`), Fulani (`ful`), Hausa (`hau`),\n    Igbo (`ibo`), Ikposo (`kpo`), Kabyle (`kab`), Kalenjin (`kln`),\n    Kanuri (`kau`), Kikuyu (`kik`), Kinyarwanda (`kin`), Kwamba (`rwm`),\n    Lendu (`led`), Lingala (`lin`), Lugbara (`lgg`), Luganda (`lug`),\n    Luhya (`luy`), Lumasaba (`myx`), Luo (`luo`), Lusoga (`xog`),\n    Malagasy (`mlg`), Ndebele (`nbl`), Nigerian Pidgin (`pcm`), Oromo (`orm`),\n    Rukiga (`cgg`), Rukonjo (`koo`), Runyankole (`nyn`), Ruruuli (`ruc`),\n    Rutooro (`ttj`), Shona (`sna`), Somali (`som`), Sotho (`sot`),\n    Swahili (`swa`), Thur (`lth`), Tswana (`tsn`), Wolof (`wol`),\n    Xhosa (`xho`), Yoruba (`yor`), Zulu (`zul`).\n  - **Removed parameters** (previously accepted, now rejected): `platform`,\n    `adapter`, `whisper`, `recognise_speakers`, `org`, `gcs_blob_name`. Speaker\n    diarization and the organization workflow remain on the legacy routes below.\n  - **Deprecated** → use `POST /tasks/audio/transcriptions`:\n    - `POST /tasks/stt`, `POST /tasks/stt_from_gcs`, `POST /tasks/org/stt`,\n      `POST /tasks/modal/stt`\n\n### Text-to-Speech (TTS)\nAll TTS is served by the **RunPod Orpheus-3B** deployment\n(`sunbird-orpheus-tts`, 19 African languages / 44 named speakers) running as a\nqueue-based serverless endpoint: each utterance is a job a worker picks up when\nfree, so bursts wait in the queue instead of failing. The earlier\nmodel/platform matrix (spark-tts, Modal) and the per-provider TTS routes were\nremoved — **breaking change**.\n- **`POST /tasks/audio/speech`** - Single-synthesis endpoint.\n  - `voice`: speaker name (e.g. `Namuli`), scoped by `language` (required when\n    `voice` is a name; the same name can exist in several languages). If omitted,\n    a speaker is chosen for `language` (Luganda by default). Legacy speaker ids\n    such as `salt_lug_0001` still work but return `Deprecation`/`Warning` headers\n    and a `warnings` field naming the speaker name to use instead.\n  - `response_mode`: `url` (default — signed GCP Storage URL), `stream` (raw audio\n    bytes, no storage), or `both` (raw audio bytes with the signed URL in\n    the `X-Audio-Url` response header).\n  - Tuning: `language`, `temperature`, `top_p`, `repetition_penalty`,\n    `max_tokens`, `seed`.\n  - **Removed parameters** (previously accepted, now rejected): `model`,\n    `platform`, `max_new_audio_tokens`.\n- **`POST /tasks/audio/speech/batch`** - Batch synthesis, 1-16 items (one queue job\n  each, run concurrently; a failed item is reported per-item with `status=\"error\"`).\n- **`GET /tasks/voice/speakers`** - List Orpheus voices by name, with gender\n  (`voices`), optionally for one `language`.\n  - **sunbird-orpheus-tts** covers 19 African languages: Acholi (`ach`), Afrikaans (`afr`),\n    English (`eng`), Ewe (`ewe`), Fulah (`ful`), Hausa (`hau`), Igbo (`ibo`), Kikuyu (`kik`),\n    Kinyarwanda (`kin`), Lugbara (`lgg`), Lingala (`lin`), Luganda (`lug`),\n    Runyankole (`nyn`), Sesotho (`sot`), Swahili (`swa`), Ateso (`teo`), Setswana (`tsn`),\n    Xhosa (`xho`), Yoruba (`yor`). A few (`lgg`, `sot`, `tsn`) are in the training mix but\n    expose no individual voices yet. Luo (`luo`) is temporarily unavailable for TTS while\n    its data is being cleaned up. Full per-speaker catalog: see the\n    [tutorial](https://github.com/SunbirdAI/sunbird-ai-api/blob/main/docs/tutorial.md)\n    or call `GET /tasks/voice/speakers`.\n- **`GET /tasks/audio/speech/url`** - Refresh an expired signed URL for a stored audio object.\n  - **Removed** → use the unified endpoints above:\n    - `POST /tasks/modal/tts`, `POST /tasks/runpod/tts`,\n      `POST /tasks/modal/orpheus/tts`, `POST /tasks/tts` → `POST /tasks/audio/speech`\n    - `POST /tasks/modal/tts/stream` → `/tasks/audio/speech` (`response_mode=stream`)\n    - `POST /tasks/modal/tts/stream-with-url` → `/tasks/audio/speech` (`response_mode=both`)\n    - `POST /tasks/modal/orpheus/tts/batch` → `POST /tasks/audio/speech/batch`\n    - `GET /tasks/modal/tts/speakers`, `GET /tasks/modal/orpheus/speakers`,\n      `GET /tasks/modal/orpheus/speakers/{language}` → `GET /tasks/voice/speakers`\n    - `GET /tasks/modal/tts/refresh-url` → `GET /tasks/audio/speech/url`\n\n### Inference (Sunflower Chat)\n- **`POST /tasks/chat/completions`** - OpenAI-compatible chat completions (Sunflower models).\n  Supports single instructions, multi-turn conversations, and SSE streaming (`stream: true`).\n  - Model (`model` field): **`sunflower-9b`** (default) — broad pan-African\n    coverage: **67 African languages** (plus English) across good/moderate/basic\n    tiers. Optimized for translation, instruction-following, and multi-turn chat.\n    The model's system prompt is injected when the request does not include one.\n  - **Deprecated model `sunflower-14b`** — still accepted, but every such request\n    is **served by `sunflower-9b`** and will be removed soon. The response reports\n    `\"model\": \"sunflower-9b\"`, carries `Deprecation: true`, `Warning` and `Link`\n    headers (JSON and SSE), and the non-streaming body includes a top-level\n    `warning` string. Update clients to send `\"model\": \"sunflower-9b\"`.\n  - The old identifier `Sunbird/Sunflower-14B` is **no longer accepted** —\n    requests using it return `400` with a message to use `sunflower-9b` instead.\n  - **Deprecated** → superseded by the unified endpoint above:\n    - `POST /tasks/sunflower_inference` → `POST /tasks/chat/completions`\n    - `POST /tasks/sunflower_simple` → `POST /tasks/chat/completions` (send the instruction as a single user message)\n\n### File Upload\n- **`POST /tasks/generate-upload-url`** - Generate signed URLs for direct client uploads to GCP Storage\n  - Supports audio files, images, and other content types\n  - Includes path traversal protection and input validation\n  - Returns temporary signed URL valid for 30 minutes\n\n### WhatsApp Integration (Webhooks)\n- **`POST /tasks/webhook`** - Handle incoming WhatsApp Business API messages\n- **`GET /tasks/webhook`** - Verify webhook endpoint ownership for WhatsApp\n\n### Legacy Endpoints\n- **`POST /tasks/summarise`** - *(Deprecated)* Anonymized text summarization (use Sunflower inference instead)\n\n## MCP Server (AI agents)\nAI agents and coding assistants (Claude Code, Cursor, or any\n[Model Context Protocol](https://modelcontextprotocol.io) client) can use this API\nas tools through the hosted **Sunbird AI MCP server**, with no install.\n\n- **Endpoint**: `https://mcp.sunbird.ai/mcp` (Streamable HTTP).\n- **Authentication**: your own Sunbird API token from\n  [api.sunbird.ai/keys](https://api.sunbird.ai/keys), sent as\n  `Authorization: Bearer <token>`. There is no separate sign-up; usage is billed\n  and rate-limited on your account.\n- **Guide and tool reference**: [mcp.sunbird.ai](https://mcp.sunbird.ai) ·\n  **Source**: [SunbirdAI/sunbird-mcp](https://github.com/SunbirdAI/sunbird-mcp) ·\n  **MCP Registry**: `ai.sunbird/sunbird-mcp`.\n\nConnect from Claude Code:\n\n```bash\nclaude mcp add --transport http sunbird https://mcp.sunbird.ai/mcp   --header \"Authorization: Bearer YOUR_SUNBIRD_TOKEN\"\n```\n\nTools (each wraps an endpoint documented above; *billed* tools run inference):\n\n| Tool | Endpoint | Billed |\n| --- | --- | --- |\n| `sunbird_translate_text` | `POST /tasks/translate` | yes |\n| `sunbird_chat_completion` | `POST /tasks/chat/completions` | yes |\n| `sunbird_identify_language` | `POST /tasks/language_id` | yes |\n| `sunbird_transcribe_audio` | `POST /tasks/audio/transcriptions` | yes |\n| `sunbird_generate_speech` | `POST /tasks/audio/speech` | yes |\n| `sunbird_generate_speech_batch` | `POST /tasks/audio/speech/batch` | yes |\n| `sunbird_refresh_speech_url` | `GET /tasks/audio/speech/url` | no |\n| `sunbird_list_voices` | `GET /tasks/voice/speakers` | no |\n| `sunbird_list_languages` | local catalog | no |\n| `sunbird_list_models` | local catalog | no |\n| `sunbird_check_connection` | `GET /auth/me` | no |\n\nThe same information is published in machine-readable form under\n`info.x-mcp-server` in [`/openapi.json`](/openapi.json). See the\n[tutorial](https://github.com/SunbirdAI/sunbird-ai-api/blob/main/docs/tutorial.md)\nfor Cursor, Python and MCP Inspector examples.\n\n## Rate Limiting\nAPI endpoints are rate-limited to ensure fair usage. Authentication is required for most endpoints.\n","version":"0.1.0","x-mcp-server":{"name":"ai.sunbird/sunbird-mcp","title":"Sunbird AI MCP server","description":"African-language translation, chat, speech-to-text and text-to-speech from Sunbird AI, exposed as Model Context Protocol tools for AI agents.","url":"https://mcp.sunbird.ai/mcp","transport":"streamable-http","documentationUrl":"https://mcp.sunbird.ai","serverCardUrl":"https://mcp.sunbird.ai/mcp/server-card","repository":"https://github.com/SunbirdAI/sunbird-mcp","registryName":"ai.sunbird/sunbird-mcp","authentication":{"type":"http","scheme":"bearer","header":"Authorization","value":"Bearer {sunbird_api_token}","description":"Your own Sunbird AI API token, created at https://api.sunbird.ai/keys. Usage is billed to that account.","tokenUrl":"https://api.sunbird.ai/keys"},"tools":[{"name":"sunbird_translate_text","description":"Translate between English and 67 African languages with Sunflower.","endpoint":{"method":"POST","path":"/tasks/translate"},"billable":true},{"name":"sunbird_chat_completion","description":"Chat and question answering in African languages (sunflower-9b).","endpoint":{"method":"POST","path":"/tasks/chat/completions"},"billable":true},{"name":"sunbird_identify_language","description":"Detect which language a text is written in.","endpoint":{"method":"POST","path":"/tasks/language_id"},"billable":true},{"name":"sunbird_transcribe_audio","description":"Speech-to-text in 51 African languages from a public URL, a local file or inline audio.","endpoint":{"method":"POST","path":"/tasks/audio/transcriptions"},"billable":true},{"name":"sunbird_generate_speech","description":"Text-to-speech with named voices, chosen by speaker name and language.","endpoint":{"method":"POST","path":"/tasks/audio/speech"},"billable":true},{"name":"sunbird_generate_speech_batch","description":"Synthesise up to 16 texts in one request.","endpoint":{"method":"POST","path":"/tasks/audio/speech/batch"},"billable":true},{"name":"sunbird_refresh_speech_url","description":"Get a fresh download link for audio generated earlier.","endpoint":{"method":"GET","path":"/tasks/audio/speech/url"},"billable":false},{"name":"sunbird_list_voices","description":"Speaker names with gender, grouped by language or filtered to one.","endpoint":{"method":"GET","path":"/tasks/voice/speakers"},"billable":false},{"name":"sunbird_list_languages","description":"Language codes per capability (translation, chat, transcription, speech).","endpoint":null,"billable":false},{"name":"sunbird_list_models","description":"Available models and what each is for.","endpoint":null,"billable":false},{"name":"sunbird_check_connection","description":"Confirm the token and show the account it belongs to.","endpoint":{"method":"GET","path":"/auth/me"},"billable":false}]}},"paths":{"/auth/register":{"post":{"tags":["Authentication Endpoints"],"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegister"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify-email":{"get":{"tags":["Authentication Endpoints"],"summary":"Verify Email","description":"Landing endpoint for the emailed verification link. Always redirects\nto the frontend; never leaks whether an account exists.\n\nRedirects are same-origin relative URLs: the SPA is served by this API\n(spa.py), and the FRONTEND_*_URL env vars point at the reset-password\npage rather than the site root, so they must not be used here.","operationId":"verify_email_auth_verify_email_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["Authentication Endpoints"],"summary":"Resend Verification","operationId":"resend_verification_auth_resend_verification_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/admin/send-verification-emails":{"post":{"tags":["Authentication Endpoints"],"summary":"Send Verification Emails Backfill","description":"One-time (re-runnable) backfill: email unverified users a verification\nlink + tutorial pointer. Idempotent — only targets users not yet emailed.\nRun daily with the default batch size until remaining_unverified stops\nshrinking (Resend free tier caps at 100 emails/day).\n\nRuns SYNCHRONOUSLY inside the request (~1.2s per email; batch_size is\ncapped so a full batch fits inside Cloud Run's request timeout).\nBackground tasks lose CPU on Cloud Run once the response returns and die\non instance shutdown — a killed run used to strand users marked as\nemailed. Each user is now stamped only AFTER their email is accepted by\nResend, so a crashed or failed run is resumed exactly by running again.","operationId":"send_verification_emails_backfill_auth_admin_send_verification_emails_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackfillVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackfillVerificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/admin/verification-stats":{"get":{"tags":["Authentication Endpoints"],"summary":"Verification Stats","description":"Counts backing the admin dashboard's email-verification card.","operationId":"verification_stats_auth_admin_verification_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationStatsResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/token":{"post":{"tags":["Authentication Endpoints"],"summary":"Login For Access Token","operationId":"login_for_access_token_auth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_for_access_token_auth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh-token":{"post":{"tags":["Authentication Endpoints"],"summary":"Refresh Token","description":"Rotate the caller's API key.\n\nBumps the user's token version (revoking the previous key) and issues a\nnew token carrying the user's *current* account type. Rate limits are\nkeyed by user, not token, so refreshing never resets a quota.","operationId":"refresh_token_auth_refresh_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/me":{"get":{"tags":["Authentication Endpoints"],"summary":"Read Users Me","operationId":"read_users_me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/forgot-password":{"post":{"tags":["Authentication Endpoints"],"summary":"Request Password Reset","operationId":"request_password_reset_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset-password":{"post":{"tags":["Authentication Endpoints"],"summary":"Reset Password","operationId":"reset_password_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/change-password":{"post":{"tags":["Authentication Endpoints"],"summary":"Change Password","operationId":"change_password_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/profile":{"put":{"tags":["Authentication Endpoints"],"summary":"Update Profile","operationId":"update_profile_auth_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/profile/status":{"get":{"tags":["Authentication Endpoints"],"summary":"Profile Status","operationId":"profile_status_auth_profile_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileCompletionStatus"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/google/login":{"get":{"tags":["Authentication Endpoints"],"summary":"Auth:Google Login","operationId":"auth_google_login_auth_google_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/google/callback":{"get":{"tags":["Authentication Endpoints"],"summary":"Auth:Google Callback","operationId":"auth_google_callback_auth_google_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tasks/stt_from_gcs":{"post":{"tags":["legacy/deprecated"],"summary":"Speech To Text From Gcs","description":"RETIRED — use POST /tasks/audio/transcriptions.\n\nRemoved because it re-signed/transcribed any caller-supplied GCS object\nwith no ownership check (F14, BOLA).","operationId":"speech_to_text_from_gcs_tasks_stt_from_gcs_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"deprecated":true}},"/tasks/stt":{"post":{"tags":["legacy/deprecated"],"summary":"Speech To Text","description":"Upload an audio file and receive its transcription.\n\n**Deprecated** — use `POST /tasks/audio/transcriptions` instead.\n\nSupports MP3, WAV, OGG, M4A and AAC. Send the file and parameters as\n`multipart/form-data`.\n\n**Limitations**\n\n- Audio longer than 10 minutes is trimmed; only the first 10 minutes are transcribed.\n- Requests larger than 100 MB are rejected — split the audio or use a signed upload URL.\n\n**Errors**\n\n- `400` — file validation failed or the audio could not be processed\n- `502` — the transcription service failed","operationId":"speech_to_text_tasks_stt_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_speech_to_text_tasks_stt_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STTTranscript"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"OAuth2PasswordBearer":[]}]}},"/tasks/org/stt":{"post":{"tags":["legacy/deprecated"],"summary":"Speech To Text Org","description":"Upload an audio file for transcription with automatic language detection.\n\n**Deprecated** — use `POST /tasks/audio/transcriptions` instead.\n\nA simplified variant of `POST /tasks/stt` for organisation use cases: the\nlanguage is detected automatically, and speaker diarization is optional.\n\n**Errors**\n\n- `400` — the audio could not be processed\n- `502` — the transcription service failed\n- `503` — the transcription service timed out","operationId":"speech_to_text_org_tasks_org_stt_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_speech_to_text_org_tasks_org_stt_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STTTranscript"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"OAuth2PasswordBearer":[]}]}},"/tasks/modal/stt":{"post":{"tags":["legacy/deprecated"],"summary":"Transcribe Audio via Modal Whisper ASR","description":"Upload an audio file and get transcription using the Modal-hosted Whisper model. Optionally specify a language to improve accuracy.","operationId":"modal_speech_to_text_tasks_modal_stt_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_modal_speech_to_text_tasks_modal_stt_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STTTranscript"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"OAuth2PasswordBearer":[]}]}},"/tasks/audio/transcriptions":{"post":{"tags":["Speech-to-Text"],"summary":"Transcribe audio (unified STT endpoint)","description":"Unified Speech-to-Text endpoint, powered by Sunbird's faster-whisper ASR model covering 51 African languages. Accepts an uploaded audio file and a required language code; set timestamps=true to also receive per-segment timings. Replaces /stt, /stt_from_gcs, /org/stt, and /modal/stt.","operationId":"create_transcription_tasks_audio_transcriptions_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_transcription_tasks_audio_transcriptions_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/STTTranscript"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/tasks/audio/speech":{"post":{"tags":["Text-to-Speech"],"summary":"Generate speech (unified TTS endpoint)","description":"Unified Text-to-Speech endpoint, served by the RunPod Orpheus-3B deployment. response_mode='url' (default) returns a signed GCS audio URL; 'stream' returns raw audio bytes with no storage; 'both' returns raw audio bytes with the signed URL in the X-Audio-Url header. Replaces /tasks/modal/tts, /tasks/runpod/tts, and /tasks/modal/orpheus/tts.","operationId":"create_speech_tasks_audio_speech_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/tasks/audio/speech/batch":{"post":{"tags":["Text-to-Speech"],"summary":"Batch-generate speech (unified, sunbird-orpheus-tts only)","description":"Unified batch Text-to-Speech endpoint. Synthesizes 1-128 items in a single sunbird-orpheus-tts pass and uploads each result to GCS. Per-item failures are reported with status='error'; the request returns 200 if at least one item succeeds, 502 if every item fails. Replaces /tasks/modal/orpheus/tts/batch.","operationId":"create_speech_batch_tasks_audio_speech_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechBatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/tasks/voice/speakers":{"get":{"tags":["Text-to-Speech"],"summary":"List speakers/voices (unified)","description":"List available Orpheus-3B speakers. Returns the catalog grouped by language (OrpheusSpeakersResponse); add 'language' to get one language's voices (OrpheusLanguageSpeakersResponse). Replaces /tasks/modal/orpheus/speakers, /tasks/modal/orpheus/speakers/{language}, and /tasks/modal/tts/speakers.","operationId":"list_voices_tasks_voice_speakers_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 639-3 code (e.g. 'lug') to filter to one language.","title":"Language"},"description":"ISO 639-3 code (e.g. 'lug') to filter to one language."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/audio/speech/url":{"get":{"tags":["Text-to-Speech"],"summary":"Refresh a signed audio URL (unified)","description":"Generate a fresh signed URL for an existing audio object in GCS (e.g. a previously synthesized speech file whose signed URL has expired). Replaces /tasks/modal/tts/refresh-url.","operationId":"refresh_speech_url_tasks_audio_speech_url_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"gcs_object","in":"query","required":true,"schema":{"type":"string","description":"GCS object name to re-sign (e.g. 'orpheus_tts/.../x.wav').","title":"Gcs Object"},"description":"GCS object name to re-sign (e.g. 'orpheus_tts/.../x.wav')."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshedUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/translate":{"post":{"tags":["Translation"],"summary":"Translate","description":"Translate text between supported languages using the sunflower-9b model.\n\nLanguages are accepted as ISO 639-3 codes (e.g. `lug`) or full names\n(e.g. `Luganda`), case-insensitively. `source_language` is optional — when\nomitted, Sunflower infers the source language from the text. Translation\nworks between any pair of supported languages.\n\n**Supported languages** — English plus the 67 African languages\n`sunflower-9b` supports. Quality varies by language; see the model's\ngood/moderate/basic tiers.\n\nAcholi (`ach`), Afrikaans (`afr`), Akan (`aka`), Alur (`alz`), Amharic (`amh`),\nAringa (`luc`), Ateso (`teo`), Bambara (`bam`), Bari (`bfa`), Bemba (`bem`),\nBerber (`ber`), Chichewa (`nya`), Dagaare (`dga`), Dagbani (`dag`),\nDinka (`din`), English (`eng`), Ewe (`ewe`), Fulani (`ful`), Hausa (`hau`),\nIgbo (`ibo`), Ik (`ikx`), Jopadhola (`adh`), Kabyle (`kab`), Kakwa (`keo`),\nKalenjin (`kln`), Kanuri (`kau`), Karamojong (`kdj`), Kikuyu (`kik`),\nKinyarwanda (`kin`), Kirundi (`run`), Kumam (`kdi`), Kupsabiny (`kpz`),\nKwamba (`rwm`), Lango (`laj`), Lendu (`led`), Lingala (`lin`), Lubwisi (`tlj`),\nLuganda (`lug`), Lugbara (`lgg`), Lugungu (`rub`), Lugwere (`gwr`),\nLuhya (`luy`), Lumasaba (`myx`), Lunyole (`nuj`), Luo (`luo`), Lusoga (`xog`),\nMa'di (`mhi`), Malagasy (`mlg`), Ndebele (`nbl`), Nigerian Pidgin (`pcm`),\nOromo (`orm`), Pokot (`pok`), Rukiga (`cgg`), Rukonjo (`koo`),\nRunyankole (`nyn`), Runyoro (`nyo`), Ruruuli (`ruc`), Rutooro (`ttj`),\nSamia (`lsm`), Shona (`sna`), Somali (`som`), Sotho (`sot`), Swahili (`swa`),\nTswana (`tsn`), Wolof (`wol`), Xhosa (`xho`), Yoruba (`yor`), Zulu (`zul`).\n\n**Example request**\n\n```json\n{\n  \"source_language\": \"eng\",\n  \"target_language\": \"lug\",\n  \"text\": \"Hello, how are you?\"\n}\n```\n\n**Example response**\n\n```json\n{\n  \"id\": \"trans-1a2b3c...\",\n  \"status\": \"COMPLETED\",\n  \"output\": {\n    \"translated_text\": \"Oli otya?\",\n    \"source_language\": \"eng\",\n    \"target_language\": \"lug\"\n  }\n}\n```\n\n**Errors**\n\n- `400` — unsupported language, or `source_language` equals `target_language`\n- `502` — the model returned empty output or failed unexpectedly\n- `503` — the model is still loading or inference timed out","operationId":"translate_tasks_translate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas

# --- truncated at 32 KB (135 KB total) ---
# Full source: https://artifacts.apis.io/sunbird-ai/openapi/_original/sunbird-ai-api-openapi.json