Audio
Transcrição de voz
Envie model e file como multipart/form-data: WAV PCM mono completo, até 25,000,000 bytes, respeitando a taxa de amostragem e duração do canal. Campos opcionais: language (duas letras minúsculas, como pt) e response_format=json (único formato e padrão). Deixe o curl gerar o boundary. URLs, IDs de arquivo, prompt, timestamps e stream não são aceitos.
STT usa input_audio_second ou tokens; TTS usa input_character. Em speech_billing_unit, utf16_code_unit e unicode_code_point contam emojis de forma diferente. A reserva não é teto de gastos e a liquidação pode ser assíncrona; falta de evidência não significa custo zero. Ambos aceitam X-Felo-Channel e enviam uma única vez ao canal escolhido. Desative novas tentativas automáticas, inclusive do SDK, após timeout ou desconexão. Guarde X-Request-Id e, quando disponível, X-Generation-Id. O Console Playground ainda não oferece áudio. configured_rates usa tarifas congeladas e uso verificado; upstream_cost usa custo verificado do provedor com acréscimo e desconto publicados.
- Tipo: 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.
- Tipo: object200
O JSON síncrono contém
texte pode conterusageem segundos ou tokens.usage.costé custo do provedor, não a cobrança final Felo. Não há tarefa para consultar.- Tipo: stringtextobrigatório
- Tipo: object | nullusage
- costTipo: numbermín:0
Reported upstream cost in USD.
- inputTipo: object
_token _details - audioTipo: integer
_tokens mín:0Integer numbers.
- textTipo: integer
_tokens mín:0Integer numbers.
- inputTipo: integer
_tokens mín:0Integer numbers.
- outputTipo: integer
_tokens mín:0Integer numbers.
- secondsTipo: numbermín:0
Duration reported by the selected channel.
- totalTipo: integer
_tokens mín:0Integer numbers.
- typeTipo: string enumvalores
- duration
- tokens
application/json - Tipo: object400
Upload, wallet or upstream error
- Tipo: objecterrorobrigatório
- codeTipo: string | null
- messageTipo: string
- paramTipo: string | null
- typeTipo: string
application/json - Tipo: object402
Upload, wallet or upstream error
- Tipo: objecterrorobrigatório
- codeTipo: string | null
- messageTipo: string
- paramTipo: string | null
- typeTipo: string
application/json - Tipo: object413
Upload, wallet or upstream error
- Tipo: objecterrorobrigatório
- codeTipo: string | null
- messageTipo: string
- paramTipo: string | null
- typeTipo: string
application/json - Tipo: object415
Upload, wallet or upstream error
- Tipo: objecterrorobrigatório
- codeTipo: string | null
- messageTipo: string
- paramTipo: string | null
- typeTipo: string
application/json - Tipo: object429
Upload, wallet or upstream error
- Tipo: objecterrorobrigatório
- codeTipo: string | null
- messageTipo: string
- paramTipo: string | null
- typeTipo: string
application/json - Tipo: object500
Upload, wallet or upstream error
- Tipo: objecterrorobrigatório
- codeTipo: string | null
- messageTipo: string
- paramTipo: string | null
- typeTipo: string
application/json - Tipo: object502
Upload, wallet or upstream error
- Tipo: objecterrorobrigatório
- codeTipo: string | null
- messageTipo: string
- paramTipo: string | null
- typeTipo: string
application/json - Tipo: object503
Upload, wallet or upstream error
- Tipo: objecterrorobrigatório
- codeTipo: string | null
- messageTipo: string
- paramTipo: string | null
- typeTipo: string
application/json - Tipo: object504
Upload, wallet or upstream error
- Tipo: objecterrorobrigatório
- codeTipo: string | null
- messageTipo: string
- paramTipo: string | null
- typeTipo: 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
}
}