Use the raw API key without Bearer. Put it in the HTTP Authorization header; keep long-lived keys on the server.
Authorization:$FOURHZ_API_KEY
Request parameters
Field
Type
Description
audio_url
string
Required. Upload binary audio to POST /v1/asr/pre-recorded/upload first and use its upload_url.
speech_model
string
Defaults to fourhz-spectrum.
language_code
string
Optional zh or en; omit for auto-detection.
keyterms_prompt
string[]
Up to 1,000 direct keyterms, 50 characters each. word_boost is an alias; send only one.
cleanup_level
string
off (default), light or standard. Standard removes clear filler words and adjacent repetitions.
translate_mode
boolean
Defaults to false. When combined with cleanup, translates the cleaned source.
target_language
string
Required when translate_mode=true; e.g. en or zh.
cleanup_text_emotion
boolean
Defaults to false, independently of cleanup and translation. Returns emotion results and status.
hotword_pool_id
string
Reference a complete enabled pool of up to 1,000 words; the 100-term direct realtime/sync limit does not apply. Create and manage pools →
reject_background_speech
boolean
Background-speech rejection. Optional; defaults to true (enabled). Set to false to disable. Top-level field in the JSON body when creating a transcript.
Field
Type
Meaning and availability
id
string
Transcript ID for polling and deletion; not a task_id alias.
status
string
queued, processing, completed, or error.
text
string?
Full transcript after completion.
audio_duration
number?
Audio duration in seconds when returned by PRE.
error
string?
Failure reason; stop polling on error.
language_code
string?
Detected language code.
words
array?
Word-level timestamps when returned.
confidence
number?
Overall confidence when returned.
utterances
array?
Utterance list; diarization includes speaker.
Independent enhancement results
Cleanup, translation and emotion may be enabled independently or together. Realtime fields arrive in FourHzPostprocessing events; Turn retains the raw transcript. Sync/pre-recorded text prefers translation, then cleanup or keyterm correction, while preserving the independent result fields.
Field
Type
Description
cleaned_text
string
Cleaned or keyterm-corrected source-language text.
translated_text
string
Target-language translation, using the cleaned source when combined.
cleanup_status / translation_status
string
completed indicates success; degraded_raw_only/degraded_partial indicates fallback or incomplete processing.
emotion_status
string
completed or degraded. Failure is not silently reported as success.
emotions
object[]
Sync/pre-recorded emotion results with mode, label and text; realtime uses emotion.bucket events.
Every HTTP error body contains error_code (machine-readable) and message (human-readable). Legacy fields such as detail, code/msg or an upstream error object are kept and status codes are unchanged. Clients should read error_code and message first.
HTTP
Code
Meaning
400
invalid_request / invalid_config
malformed field, unknown field, or conflicting combination (the message names the field)
400
unsupported_feature
requested a capability the chosen model does not serve: speaker parameters or fourhz_hotword_pool_id under Spectrum, timestamps=true on any model, ...
401 / 402
—
authentication failed / insufficient balance
404
—
transcript or upload not found or not owned by your account (another account's upload ID returns the same 404 as a missing one)
413 / 422
—
upload over 512 MiB / remote audio download or decode failure