Перейти к содержанию

Transcribe audio

POSThttps://my.neuronai.uz/api/v1/stt/transcribe

Transcribes an audio file into text, with timestamped segments.

Set language to auto to have it detected. Billed per second of audio, for its actual length.

Нужен API-ключ с stt:write.

Стоимость
за секунду аудио
Standard
1 кредит

Заголовки

  • Idempotency-KeystringНеобязательный

    Makes a retry safe: the same key again returns the original transcription instead of transcribing and charging again. At most 191 characters, scoped to your organization and kept indefinitely, so reuse a key only for the same file.

Тело запроса

multipart/form-data

Форма multipart.

  • filestringОбязательно

    The audio: MP3, WAV, OGG, FLAC, M4A or WebM, at most 25 MB.

  • languagestringОбязательно

    The spoken language, or auto to have it detected.

    Допустимые значения:autouzkaaruenkktktg

Ответ

200application/json

The transcription under data.

  • dataobjectОбязательно
  • request_idstringОбязательно

    Формат: uuid

Заголовки

  • Idempotency-ReplayedstringНеобязательный

    1 when the answer is a replay of an earlier request with the same Idempotency-Key.

  • X-Request-IdstringНеобязательный

    Identifies this request. A JSON body carries it as request_id too; quote it to support.

    Формат: uuid

  • X-RateLimit-LimitintegerНеобязательный

    The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused.

  • X-RateLimit-RemainingintegerНеобязательный

    How many of them are left this minute.

Ошибки

  • 400

    The Idempotency-Key is over 191 characters: invalid_request.

  • 401

    The API key is missing or not recognized (invalid_api_key), revoked (api_key_revoked), disabled (api_key_disabled) or expired (api_key_expired).

  • 402

    Not enough balance (insufficient_balance), or the charge would pass this key's monthly spend limit (spend_limit_exceeded).

  • 403

    The key lacks the permission this endpoint needs (insufficient_permissions), or the client IP is not in its allowlist (ip_not_allowed).

  • 409

    The Idempotency-Key was already used with a different body: idempotency_conflict.

  • 422

    The request failed validation (invalid_request). error.fields names each invalid field.

  • 429

    A rate or concurrency limit was reached (rate_limit_exceeded, concurrency_limit_exceeded). Retry after Retry-After seconds.

  • 500

    Transcription failed: transcription_failed. Nothing is charged. Anything else that fails unexpectedly: server_error.

  • default

    Any other error, in the same shape, such as server_error (500) or service_unavailable (503).