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

# 오디오 전사

> <ul><li>오디오를 텍스트로 변환합니다</li></ul>

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request POST \
    --url 'https://api.elkapi.com/v1/audio/transcriptions' \
    --header 'Authorization: Bearer <token>' \
    --form 'file=@audio.mp3' \
    --form 'model=whisper-1' \
    --form 'language=language' \
    --form 'prompt=햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일' \
    --form 'response_format=json' \
    --form 'temperature=1' \
    --form 'timestamp_granularities=word'
  ```

  ```python Python theme={null} theme={null}
  import requests

  url = "https://api.elkapi.com/v1/audio/transcriptions"
  headers = {
      "Authorization": "Bearer <token>"
  }
  files = {
      "file": open("audio.mp3", "rb"),
  }
  data = {
      "model": "whisper-1",
      "language": "language",
      "prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
      "response_format": "json",
      "temperature": "1",
      "timestamp_granularities": "word",
  }

  response = requests.request("POST", url, headers=headers, data=data, files=files)
  print(response.text)
  ```

  ```javascript JavaScript theme={null} theme={null}
  const url = "https://api.elkapi.com/v1/audio/transcriptions";

  const headers = {
    "Authorization": "Bearer <token>"
  };
  const form = new FormData();
  form.append("file", fileInput.files[0]);
  form.append("model", "whisper-1");
  form.append("language", "language");
  form.append("prompt", "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일");
  form.append("response_format", "json");
  form.append("temperature", "1");
  form.append("timestamp_granularities", "word");

  const response = await fetch(url, {
    method: "POST",
    headers,
    body: form
  });

  console.log(await response.text());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null} theme={null}
  {
    "text": "안녕하세요, 자기소개를 해 주세요"
  }
  ```
</ResponseExample>

## Authorizations

<ParamField header="Authorization" type="string" required>
  모든 엔드포인트는 Bearer Token 인증이 필요합니다.

  요청 헤더에 추가하세요:

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## Body

<ParamField body="file" type="file" required>
  오디오 파일
</ParamField>

<ParamField body="model" type="string" required default="whisper-1">
  예시: `whisper-1`
</ParamField>

<ParamField body="language" type="string">
  ISO-639-1 언어 코드
</ParamField>

<ParamField body="prompt" type="string" />

<ParamField body="response_format" type="string" default="json">
  허용 값: `json`, `text`, `srt`, `verbose_json`, `vtt`
</ParamField>

<ParamField body="temperature" type="number" />

<ParamField body="timestamp_granularities" type="array<string>" />

## Response

<ResponseField name="text" type="string" />
