API
Transcriptions
POST /v1/audio/transcriptions: speech recognition.
POST
/v1/audio/transcriptionsTurns audio into text. The format is compatible with OpenAI Audio: client.audio.transcriptions.create(...) works. You need a model of the "Speech" category: whisper-large-v3. The request is accepted as multipart/form-data with a file or as JSON with base64 audio. There is no streaming and no PII masking.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <key>. Required. x-api-key: <key> is accepted instead |
Content-Type | multipart/form-data or application/json |
X-Morphogen-Space | spc_…: the spending space. Optional |
Request body
modelstringrequiredA recognition model from GET /v1/models, for example whisper-large-v3.
filefilerequiredThe audio file in a multipart request. The request size is at most 26 MiB. In the JSON variant, audio is passed in base64 in the input_audio field.
languagestringThe language code, for example ru. It helps the model if the language is known in advance.
Spending is counted by the audio duration in seconds.
Request example
curl https://api.morphogen.ru/v1/audio/transcriptions \
-H "Authorization: Bearer $MORPHOGEN_API_KEY" \
-F model=whisper-large-v3 \
-F language=ru \
-F file=@meeting.mp3Response example
{
"text": "Начинаем встречу. Первый вопрос: сроки релиза.",
"usage": { "type": "duration", "seconds": 4.129 }
}Errors
400
invalid_multipartThe multipart body could not be parsed.400
invalid_jsonThe JSON body could not be parsed.400
model_category_mismatchThe model is not in the speech category.400
pii_masking_unsupported_endpointThe request has X-PII-Masking: on.401
invalid_api_keyThe key is missing, invalid, revoked or expired.402
insufficient_fundsThe balance does not cover the request reserve.403
model_not_allowedThe model is not in the key's list.404
model_not_foundThere is no such model in the catalog.413
request_too_largeThe request is larger than 26 MiB.429
rate_limit_exceededThe request limit per minute is exceeded.Other codes: Errors.