Audio
Transkrypcja mowy
Wyślij model i file jako multipart/form-data: kompletny mono PCM WAV, maksymalnie 25,000,000 bajtów, z ograniczeniami częstotliwości próbkowania i długości kanału. Opcjonalne: language (dwie małe litery, np. pl) i response_format=json (jedyny i domyślny format). Pozwól curl wygenerować boundary. URL, ID plików, prompt, znaczniki czasu i stream nie są obsługiwane.
STT używa input_audio_second lub tokenów; TTS używa input_character. speech_billing_unit: utf16_code_unit i unicode_code_point inaczej liczą emoji. Rezerwacja nie jest limitem wydatków; rozliczenie może być asynchroniczne. Brak dowodów nie oznacza braku opłat. Oba API przyjmują X-Felo-Channel i wysyłają raz do wybranego kanału. Wyłącz automatyczne ponawianie także w SDK po timeout lub rozłączeniu; zachowaj X-Request-Id i dostępne X-Generation-Id. Console Playground nie obsługuje jeszcze audio. configured_rates używa zamrożonych stawek i potwierdzonego zużycia; upstream_cost — potwierdzonego kosztu dostawcy z opublikowaną marżą i rabatem.
- Typ: 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.
- Typ: object200
Synchroniczny JSON zawiera
texti opcjonalnieusagew sekundach lub tokenach.usage.costto koszt dostawcy, nie końcowe obciążenie Felo. Nie trzeba odpytywać zadania.- Typ: stringtextwymagane
- Typ: object | nullusage
- costTyp: numbermin.:0
Reported upstream cost in USD.
- inputTyp: object
_token _details - audioTyp: integer
_tokens min.:0Integer numbers.
- textTyp: integer
_tokens min.:0Integer numbers.
- inputTyp: integer
_tokens min.:0Integer numbers.
- outputTyp: integer
_tokens min.:0Integer numbers.
- secondsTyp: numbermin.:0
Duration reported by the selected channel.
- totalTyp: integer
_tokens min.:0Integer numbers.
- typeTyp: string enumwartości
- duration
- tokens
application/json - Typ: object400
Upload, wallet or upstream error
- Typ: objecterrorwymagane
- codeTyp: string | null
- messageTyp: string
- paramTyp: string | null
- typeTyp: string
application/json - Typ: object402
Upload, wallet or upstream error
- Typ: objecterrorwymagane
- codeTyp: string | null
- messageTyp: string
- paramTyp: string | null
- typeTyp: string
application/json - Typ: object413
Upload, wallet or upstream error
- Typ: objecterrorwymagane
- codeTyp: string | null
- messageTyp: string
- paramTyp: string | null
- typeTyp: string
application/json - Typ: object415
Upload, wallet or upstream error
- Typ: objecterrorwymagane
- codeTyp: string | null
- messageTyp: string
- paramTyp: string | null
- typeTyp: string
application/json - Typ: object429
Upload, wallet or upstream error
- Typ: objecterrorwymagane
- codeTyp: string | null
- messageTyp: string
- paramTyp: string | null
- typeTyp: string
application/json - Typ: object500
Upload, wallet or upstream error
- Typ: objecterrorwymagane
- codeTyp: string | null
- messageTyp: string
- paramTyp: string | null
- typeTyp: string
application/json - Typ: object502
Upload, wallet or upstream error
- Typ: objecterrorwymagane
- codeTyp: string | null
- messageTyp: string
- paramTyp: string | null
- typeTyp: string
application/json - Typ: object503
Upload, wallet or upstream error
- Typ: objecterrorwymagane
- codeTyp: string | null
- messageTyp: string
- paramTyp: string | null
- typeTyp: string
application/json - Typ: object504
Upload, wallet or upstream error
- Typ: objecterrorwymagane
- codeTyp: string | null
- messageTyp: string
- paramTyp: string | null
- typeTyp: 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
}
}