> ## Documentation Index
> Fetch the complete documentation index at: https://developers.namuai-lab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create transcription

> Writes down what was said in a recording. Send the audio as a multipart field named `file`, or as the raw request body with `language` in the query string. The container is recognised from the file itself: WAV, MP3, M4A/AAC, OGG/Opus (WhatsApp voice notes), WebM, FLAC. Up to 25 MB and 300 seconds. Counts the length of the audio sent. Needs the `transcribe` scope.



## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/transcribe
openapi: 3.1.0
info:
  title: Namu API
  version: 1.0.0
  description: >-
    Speech recognition, speech synthesis, translation and a voice agent for
    Hausa, Zarma and French. Describes the API as it behaves on 8 November 2026.
  contact:
    name: Namu AI Lab
    email: contact@namuai.org
    url: https://www.namuai-lab.com
servers:
  - url: https://api.namuai-lab.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Speech
    description: Text to speech.
  - name: Transcription
    description: Speech to text.
  - name: Translation
    description: Hausa and French, from text or speech.
  - name: Voice agent
    description: A spoken conversation in Hausa. Research preview.
  - name: Models and voices
    description: What the API serves. No key needed.
  - name: Account
    description: Your usage this month.
paths:
  /v1/transcribe:
    post:
      tags:
        - Transcription
      summary: Create transcription
      description: >-
        Writes down what was said in a recording. Send the audio as a multipart
        field named `file`, or as the raw request body with `language` in the
        query string. The container is recognised from the file itself: WAV,
        MP3, M4A/AAC, OGG/Opus (WhatsApp voice notes), WebM, FLAC. Up to 25 MB
        and 300 seconds. Counts the length of the audio sent. Needs the
        `transcribe` scope.
      operationId: createTranscription
      parameters:
        - name: language
          in: query
          required: false
          description: >-
            Only when the audio is the raw body. With multipart, send it as a
            form field.
          schema:
            $ref: '#/components/schemas/TranscribeLanguage'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: The recording.
                language:
                  $ref: '#/components/schemas/TranscribeLanguage'
          application/octet-stream:
            schema:
              type: string
              format: binary
              description: The recording as the whole body.
      responses:
        '200':
          description: The transcript.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transcription'
              example:
                model: speech-recognition
                text: sannu da zuwa
                language: ha
                audio_seconds: 2
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '413':
          $ref: '#/components/responses/TooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedAudio'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/Upstream'
components:
  schemas:
    TranscribeLanguage:
      type: string
      enum:
        - ha
        - dje
        - fr
      default: ha
      description: 'The language spoken: `ha` Hausa, `dje` Zarma, `fr` French.'
    Transcription:
      type: object
      properties:
        model:
          type: string
          example: speech-recognition
        text:
          type: string
          description: What was said.
        language:
          type: string
          example: ha
        audio_seconds:
          type: number
          description: Length of the audio sent.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: A stable code, such as `invalid_api_key`.
            message:
              type: string
              description: What happened, in plain words.
            request_id:
              type: string
  headers:
    RequestId:
      description: A unique id for this request. Include it when you write to us.
      schema:
        type: string
        example: 3f2a9c1e5b7d4e8fa0c2b6d9e1f3a5c7
  responses:
    BadRequest:
      description: >-
        The request was not usable: `invalid_request`, `invalid_json`,
        `missing_text`, `missing_file`, `empty_audio`, `unknown_voice`,
        `unsupported_language`, `unsupported_pair`, `unknown_persona`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: unknown_voice
              message: 'Unknown voice. Try one of: nadia, warm, fr, mouhamad.'
              request_id: 3f2a9c1e5b7d4e8fa0c2b6d9e1f3a5c7
    Unauthorized:
      description: >-
        No key, not a Namu key, or a revoked key: `missing_api_key`,
        `invalid_api_key`, `key_revoked`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: missing_api_key
              message: 'Send your key as ''Authorization: Bearer namu_sk_...''.'
              request_id: 3f2a9c1e5b7d4e8fa0c2b6d9e1f3a5c7
    Forbidden:
      description: >-
        `insufficient_scope` (the key may not call this endpoint) or
        `account_paused`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooLarge:
      description: >-
        `payload_too_large` (over 25 MB), `audio_too_long` (over 300 s) or
        `text_too_long` (over 2,000 characters).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnsupportedAudio:
      description: >-
        `unsupported_audio`: the file could not be read. Send WAV, MP3, M4A,
        AAC, OGG, WebM or FLAC.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: >-
        `rate_limited` (too many requests this minute; see `Retry-After`) or
        `quota_exceeded` (this month's allowance is used).
      headers:
        Retry-After:
          description: Seconds to wait. Sent with `rate_limited` only.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Upstream:
      description: >-
        `upstream_error`: the model did not answer. Try again; a request that
        fails counts nothing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret key: `Authorization: Bearer namu_sk_...`. Create one at
        https://www.namuai-lab.com/account/keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.