> ## Documentation Index
> Fetch the complete documentation index at: https://docs.naga.ac/llms.txt
> Use this file to discover all available pages before exploring further.

# Speech to Text

> Upload audio and receive a text transcription.

Use `POST /v1/audio/transcriptions` when you want a same-language text transcript of uploaded audio.

This endpoint accepts multipart form uploads and returns one JSON response with a `text` field.

## Required and optional fields

| Field      | Required | Notes                                         |
| ---------- | -------- | --------------------------------------------- |
| `model`    | Yes      | Transcription model                           |
| `file`     | Yes      | Binary audio upload                           |
| `language` | No       | Optional language hint                        |
| `prompt`   | No       | Optional formatting or name-preservation hint |

## Multipart Request Example

<CodeGroup>
  ```python Python theme={null}
  from pathlib import Path
  from openai import OpenAI

  client = OpenAI(
      base_url="https://api.naga.ac/v1",
      api_key="YOUR_API_KEY",
  )

  transcription = client.audio.transcriptions.create(
      model="whisper-1",
      file=Path("meeting.mp3"),
      language="en",
      prompt="Preserve product names exactly as spoken.",
  )

  print(transcription.text)
  ```

  ```javascript Node.js theme={null}
  import fs from 'fs';
  import OpenAI from 'openai';

  const client = new OpenAI({
    baseURL: 'https://api.naga.ac/v1',
    apiKey: 'YOUR_API_KEY',
  });

  const transcription = await client.audio.transcriptions.create({
    model: 'whisper-1',
    file: fs.createReadStream('meeting.mp3'),
    language: 'en',
    prompt: 'Preserve product names exactly as spoken.',
  });

  console.log(transcription.text);
  ```

  ```bash cURL theme={null}
  curl https://api.naga.ac/v1/audio/transcriptions \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -F "model=whisper-1" \
    -F "file=@meeting.mp3" \
    -F "language=en" \
    -F "prompt=Preserve product names exactly as spoken."
  ```
</CodeGroup>

## Response Shape

```json theme={null}
{
  "text": "Welcome to the weekly engineering update..."
}
```

## When to use transcription vs translation

* use transcription when you want text in the same language as the audio
* use [Speech Translation](/api/audio/speech-translation) when you want translated English text

## Common Mistakes

* uploading a corrupted or unsupported audio file
* forgetting multipart form encoding
* assuming the response is a streamed token feed rather than one final JSON object

## Reference

* [Create transcription](/api-reference/endpoints/audio/transcriptions)
