Audio
Розпізнавання мовлення
Надішліть model і file як multipart/form-data: повний моно PCM WAV, максимум 25,000,000 байтів, з урахуванням обмежень частоти й тривалості каналу. Необов'язкові: language (дві малі літери, наприклад uk) і response_format=json (єдиний і типовий формат). boundary створює curl. URL, ID файлів, prompt, часові позначки та stream не підтримуються.
STT використовує input_audio_second або токени; TTS — input_character. У speech_billing_unit одиниці utf16_code_unit та unicode_code_point рахують emoji по-різному. Резерв не є лімітом витрат; розрахунок може бути асинхронним. Брак доказів не означає безкоштовність. Обидва API приймають X-Felo-Channel і надсилають один раз до вибраного каналу. Вимкніть автоматичні повтори, зокрема SDK, після таймауту чи обриву; збережіть X-Request-Id і доступний X-Generation-Id. Console Playground поки не підтримує аудіо. configured_rates використовує зафіксовані тарифи й підтверджений обсяг; upstream_cost — перевірену вартість постачальника з опублікованими націнкою та знижкою.
- Тип: stringX
- Felo - Channel Ordered comma-separated public channel codes. Omit this header to use default; default must be used alone. In wallet mode, default scans the model's effective public channel order in reverse, skips unpublished or unavailable channels, and uses the first eligible channel. Explicit codes follow the supplied order. For stateless Chat Completions, Messages and Responses, the server may try another selected channel or provider group after a confirmed upstream rejection. A single explicit channel limits routing to that channel. Legacy provider headers cannot override channel routing.
- Тип: object200
Синхронний JSON містить
textі необов'язковийusageу секундах або токенах.usage.cost— витрати постачальника, не остаточне списання Felo. Опитування завдання не потрібне.- Тип: stringtextобов'язкове
- Тип: object | nullusage
- costТип: numberмін.:0
Reported upstream cost in USD.
- inputТип: object
_token _details - audioТип: integer
_tokens мін.:0Integer numbers.
- textТип: integer
_tokens мін.:0Integer numbers.
- inputТип: integer
_tokens мін.:0Integer numbers.
- outputТип: integer
_tokens мін.:0Integer numbers.
- secondsТип: numberмін.:0
Duration reported by the selected channel.
- totalТип: integer
_tokens мін.:0Integer numbers.
- typeТип: string перелікзначення
- duration
- tokens
application/json - Тип: object400
Upload, wallet or upstream error
- Тип: objecterrorобов'язкове
- codeТип: string | null
- messageТип: string
- paramТип: string | null
- typeТип: string
application/json - Тип: object402
Upload, wallet or upstream error
- Тип: objecterrorобов'язкове
- codeТип: string | null
- messageТип: string
- paramТип: string | null
- typeТип: string
application/json - Тип: object413
Upload, wallet or upstream error
- Тип: objecterrorобов'язкове
- codeТип: string | null
- messageТип: string
- paramТип: string | null
- typeТип: string
application/json - Тип: object415
Upload, wallet or upstream error
- Тип: objecterrorобов'язкове
- codeТип: string | null
- messageТип: string
- paramТип: string | null
- typeТип: string
application/json - Тип: object429
Upload, wallet or upstream error
- Тип: objecterrorобов'язкове
- codeТип: string | null
- messageТип: string
- paramТип: string | null
- typeТип: string
application/json - Тип: object500
Upload, wallet or upstream error
- Тип: objecterrorобов'язкове
- codeТип: string | null
- messageТип: string
- paramТип: string | null
- typeТип: string
application/json - Тип: object502
Upload, wallet or upstream error
- Тип: objecterrorобов'язкове
- codeТип: string | null
- messageТип: string
- paramТип: string | null
- typeТип: string
application/json - Тип: object503
Upload, wallet or upstream error
- Тип: objecterrorобов'язкове
- codeТип: string | null
- messageТип: string
- paramТип: string | null
- typeТип: string
application/json - Тип: object504
Upload, wallet or upstream error
- Тип: objecterrorобов'язкове
- codeТип: string | null
- messageТип: string
- paramТип: string | null
- typeТип: string
application/json
curl https://openapi.felo.ai/api/v1/audio/transcriptions \
--request POST \
--header 'Content-Type: multipart/form-data' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--form 'model=grok-stt-2.0' \
--form 'file=@filename' \
--form 'language=' \
--form 'response_format=json'
{
"text": "string",
"usage": {
"seconds": 0,
"type": "duration",
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"input_token_details": {
"text_tokens": 0,
"audio_tokens": 0
},
"cost": 0
}
}