Speech-to-text API
Upload an audio or video file to get its text, optionally with sentence and word
timestamps. The request follows the OpenAI-compatible transcription format. An SDK
or tool that already sends audio files to /v1/audio/transcriptions works after two
changes: the base URL and the API key.
Speech to text is enabled for an API key on request. Contact
support@omev.be with your account email and key alias. A key
without access receives 403 model_not_enabled.
Price
| Model | Description | Price |
|---|---|---|
omev-transcribe | Speech to text | $0.004 per audio minute |
Duration is counted per started second of the file, so a 90-second clip costs 90 / 60 × $0.004 = $0.006. A request that ends with an error is not charged. See Models and prices.
Transcribe a file
curl -sS https://llmapi.omev.be/v1/audio/transcriptions \
-H "Authorization: Bearer $OMEV_API_KEY" \
-F model=omev-transcribe \
-F file=@interview.mp3 \
-F response_format=verbose_json
import os
from openai import OpenAI
client = OpenAI(base_url="https://llmapi.omev.be/v1", api_key=os.environ["OMEV_API_KEY"])
with open("interview.mp3", "rb") as f:
result = client.audio.transcriptions.create(model="omev-transcribe", file=f)
print(result.text)
The request body uses multipart/form-data.
| Field | Required | Values |
|---|---|---|
model | yes | omev-transcribe |
file | yes | An audio or video file up to 25 MB. For video files, the audio track is read. |
language | no | The speech language: a two-letter code (ru), a full name (russian), or a language tag (ru-RU). A comma-separated list (ru,en, up to 20 languages) means the clip may be in any of those languages. If omitted, the language is detected automatically. |
response_format | no | json (default), text, srt, vtt, or verbose_json |
timestamp_granularities[] | no | segment (default) or word; both can be sent. Used with verbose_json; with other formats it is ignored. |
Response formats
response_format | Response |
|---|---|
json | {"text": "…"} |
text | Plain text |
srt, vtt | Subtitles with a time range for each phrase |
verbose_json | JSON containing text, language (the full name, such as russian), duration (in seconds), and language_probability (0 to 1); also includes segments (start, end, text) and words (word, start, end; times in seconds), depending on timestamp_granularities[] |
Language detection
If you omit language, the API detects one of these 19 languages: Russian, Ukrainian,
English, Kazakh, Uzbek, Kyrgyz, Tajik, Armenian, Georgian, Azerbaijani, Turkish, Romanian,
Estonian, Spanish, German, French, Italian, Portuguese, and Polish. If you know the
language, pass it in language. If you have a few candidate languages, pass them as a
comma-separated list. Candidates limit the detection to those languages. A clip with
no speech returns empty text. verbose_json includes the detection confidence in
language_probability.
Errors
Every error response uses the format
{"error": {"message": "…", "type": "invalid_request_error", "code": "…"}}; for 5xx the type is server_error.
Status and code | Meaning |
|---|---|
400 invalid_request | The request body is not multipart/form-data. |
400 model_not_found | model is not omev-transcribe. |
400 missing_file | The file field is missing or empty. |
400 invalid_file | The file could not be read as audio or video. |
400 invalid_response_format, invalid_timestamp_granularities, invalid_language | Unsupported parameter value. invalid_language is also returned when more than 20 languages are specified. |
401 | Missing or invalid API key. |
403 model_not_enabled | Speech to text is not enabled for this API key. |
413 file_too_large | The file exceeds 25 MB. Split it into smaller parts. |
5xx | Temporary error. Retry a limited number of times. |
See Errors and retries for the retry policy.