Audio
Chuyển giọng nói thành văn bản
Gửi model và file bằng multipart/form-data: WAV PCM đơn âm hoàn chỉnh, tối đa 25,000,000 byte, tuân thủ giới hạn tần số lấy mẫu và thời lượng của kênh. Tùy chọn: language (hai chữ thường, như vi) và response_format=json (định dạng duy nhất và mặc định). Để curl tạo boundary. Không hỗ trợ URL, ID tệp, prompt, dấu thời gian hay stream.
STT dùng input_audio_second hoặc token; TTS dùng input_character. Trong speech_billing_unit, utf16_code_unit và unicode_code_point đếm emoji khác nhau. Khoản giữ trước không phải trần chi phí; quyết toán có thể bất đồng bộ. Thiếu bằng chứng không có nghĩa miễn phí. Cả hai nhận X-Felo-Channel và gửi một lần đến kênh đã chọn. Tắt tự thử lại cả trong SDK sau timeout hoặc mất kết nối; lưu X-Request-Id và X-Generation-Id nếu có. Console Playground chưa hỗ trợ âm thanh. configured_rates dùng giá đã cố định và lượng dùng xác minh; upstream_cost dùng chi phí nhà cung cấp đã xác minh cùng mức cộng giá và chiết khấu công bố.
- Kiểu: 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.
- Kiểu: object200
JSON đồng bộ chứa
text;usagetùy chọn báo giây hoặc token.usage.costlà chi phí nhà cung cấp, không phải khoản thu Felo cuối cùng. Không cần thăm dò tác vụ.- Kiểu: stringtextbắt buộc
- Kiểu: object | nullusage
- costKiểu: numbertối thiểu:0
Reported upstream cost in USD.
- inputKiểu: object
_token _details - audioKiểu: integer
_tokens tối thiểu:0Integer numbers.
- textKiểu: integer
_tokens tối thiểu:0Integer numbers.
- inputKiểu: integer
_tokens tối thiểu:0Integer numbers.
- outputKiểu: integer
_tokens tối thiểu:0Integer numbers.
- secondsKiểu: numbertối thiểu:0
Duration reported by the selected channel.
- totalKiểu: integer
_tokens tối thiểu:0Integer numbers.
- typeKiểu: string enumgiá trị
- duration
- tokens
application/json - Kiểu: object400
Upload, wallet or upstream error
- Kiểu: objecterrorbắt buộc
- codeKiểu: string | null
- messageKiểu: string
- paramKiểu: string | null
- typeKiểu: string
application/json - Kiểu: object402
Upload, wallet or upstream error
- Kiểu: objecterrorbắt buộc
- codeKiểu: string | null
- messageKiểu: string
- paramKiểu: string | null
- typeKiểu: string
application/json - Kiểu: object413
Upload, wallet or upstream error
- Kiểu: objecterrorbắt buộc
- codeKiểu: string | null
- messageKiểu: string
- paramKiểu: string | null
- typeKiểu: string
application/json - Kiểu: object415
Upload, wallet or upstream error
- Kiểu: objecterrorbắt buộc
- codeKiểu: string | null
- messageKiểu: string
- paramKiểu: string | null
- typeKiểu: string
application/json - Kiểu: object429
Upload, wallet or upstream error
- Kiểu: objecterrorbắt buộc
- codeKiểu: string | null
- messageKiểu: string
- paramKiểu: string | null
- typeKiểu: string
application/json - Kiểu: object500
Upload, wallet or upstream error
- Kiểu: objecterrorbắt buộc
- codeKiểu: string | null
- messageKiểu: string
- paramKiểu: string | null
- typeKiểu: string
application/json - Kiểu: object502
Upload, wallet or upstream error
- Kiểu: objecterrorbắt buộc
- codeKiểu: string | null
- messageKiểu: string
- paramKiểu: string | null
- typeKiểu: string
application/json - Kiểu: object503
Upload, wallet or upstream error
- Kiểu: objecterrorbắt buộc
- codeKiểu: string | null
- messageKiểu: string
- paramKiểu: string | null
- typeKiểu: string
application/json - Kiểu: object504
Upload, wallet or upstream error
- Kiểu: objecterrorbắt buộc
- codeKiểu: string | null
- messageKiểu: string
- paramKiểu: string | null
- typeKiểu: 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
}
}