> For the complete documentation index, see [llms.txt](https://docs.cortecs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortecs.ai/api-overview/audio-transcription.md).

# Audio Transcription

## Create an audio transcription

> This endpoint transcribes audio into the input language using the specified model.

```json
{"openapi":"3.0.0","info":{"title":"Cortecs Audio Transcription API","version":"1.0.0"},"servers":[{"url":"https://api.cortecs.ai/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"AudioTranscriptionRequest":{"type":"object","description":"A request object for generating audio transcriptions and controlling router behavior. This object contains suggested parameters to generate a response from the specified model. Many of the parameters are optional, and it is recommended to set them only if needed; however, you may include other parameters as required. Note that not all providers support the same set of parameters. Adding unsupported or unnecessary parameters can cause requests to fail or limit the providers able to process them.\n","properties":{"preference":{"type":"string","description":"The provider preference for handling the request.","enum":["speed","cost","balanced"]},"allowed_providers":{"type":"array","items":{"type":"string"},"description":"The providers that are allowed to be used for the completion.","nullable":true},"eu_native":{"type":"boolean","description":"Whether to consider only providers based and regulated withing the EU. Even when false, all our endpoints are GDPR compliant.","nullable":true},"allow_quantization":{"type":"boolean","description":"Whether to allow quantized endpoints.","nullable":true},"allow_zero_data_retention":{"type":"boolean","description":"Whether to use only ZDR providers.","nullable":true},"enable_model_fallback":{"type":"boolean","description":"Whether to allow model fallback when a model is currently unavailable.","nullable":true},"fallbacks":{"type":"array","items":{"type":"string"},"description":"The providers that are allowed to be used for the completion.","nullable":true},"file":{"type":"string","format":"binary","description":"The audio file object to transcribe."},"model":{"type":"string","description":"The model to use for the transcription."},"language":{"type":"string","description":"The language of the audio input, following ISO-639-1 format such as `en` for English, `fr` for French, `de` for German.\n","nullable":true},"prompt":{"type":"string","description":"An optional text to guide the model's style.\n","nullable":true},"response_format":{"type":"string","description":"The format of the transcript output.\n","nullable":true},"temperature":{"type":"number","description":"Controls randomness in the output. Higher values make the output more random.\n","nullable":true}},"required":["file","model"]},"AudioTranscriptionResponse":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the transcription"},"object":{"type":"string","description":"The type of object returned"},"created":{"type":"integer","description":"The timestamp when the transcription was created"},"provider":{"type":"string","description":"The provider that generated the transcription"},"model":{"type":"string","description":"The model that generated the transcription"},"text":{"type":"string","description":"The transcribed text."},"language":{"type":"string","description":"The language of the audio input.","nullable":true},"segments":{"type":"array","items":{"type":"object"},"description":"Segments of the transcribed text (may be unavailable for some providers).","nullable":true},"usage":{"type":"object","description":"Usage information showing audio duration.","properties":{"audio_duration_seconds":{"type":"number","description":"The duration of the audio in seconds."}}}}}}},"paths":{"/audio/transcriptions":{"post":{"summary":"Create an audio transcription","description":"This endpoint transcribes audio into the input language using the specified model.","operationId":"createAudioTranscription","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AudioTranscriptionRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioTranscriptionResponse"}}}},"500":{"description":"Internal server error."}}}}}}
```
