ASR / Keyterms
Hotword pools
Save product names and technical terms once, then select the same glossary in Live ASR, pre-recorded and synchronous transcription.
Endpoints
https://api.fourhz.ai
| Method | Path | Action |
|---|---|---|
| POST | /v1/asr/hotword-pools | Create |
| GET | /v1/asr/hotword-pools?limit=100&offset=0 | List; optional query searches pool names |
| GET / PATCH / DELETE | /v1/asr/hotword-pools/{pool_id} | Inspect, update or delete |
Authenticate with Authorization: YOUR_API_KEY. Pools belong to the API key's account; other accounts cannot inspect or use them. The retired /asr/v1/hotword-pools route is no longer available.
Create and update
| Field | Type | Description |
|---|---|---|
name | string | Required when creating; cannot be cleared on update. Up to 100 characters after trimming spaces. |
language | string | Language label: auto (default) or a valid language code of up to 10 characters; other values return 400. |
words | string[] | Up to 1,000 distinct words, 64 characters each. Leading/trailing whitespace, empty words and duplicates are removed. PATCH replaces the entire array. |
is_enabled | boolean | Defaults to true. Disabled pools cannot be selected for new requests. |
Send words as a JSON array; there is no separate file-upload step. In Playground, use Manage beside the pool selector to create or edit a pool without leaving the page.
Use a pool
Take the id from the create/list response. Set hotword_pool_id="42" in the Live ASR query, synchronous config or pre-recorded request body. The ID is a positive integer, encoded as a string.
APIHub loads the complete enabled pool, merges it with request-local keyterms, deduplicates it and forwards a snapshot to AudioLLM. A 1,000-word pool remains fully available even though direct realtime/sync keyterms are limited to 100. Pre-recorded direct keyterms allow 1,000 words, each up to 50 characters; pool words retain their 64-character limit. Updates and deletion affect new requests; running requests keep their initial snapshot.
Standard ASR uses these terms for conservative post-recognition spelling correction, including when cleanup is off. Terms are hints, not forced insertions or a guarantee of recognition accuracy.
Examples
curl https://api.fourhz.ai/v1/asr/hotword-pools \
-H "Authorization: $FOURHZ_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name":"Speech terminology","language":"en","words":["Voiceprint recognition","Speaker diarization"],"is_enabled":true}'
curl https://api.fourhz.ai/v1/asr/hotword-pools/42 \
-X PATCH -H "Authorization: $FOURHZ_API_KEY" \
-H 'Content-Type: application/json' -d '{"words":["Voiceprint recognition","Speaker diarization","Voice activity detection"]}'
curl https://api.fourhz.ai/v1/asr/hotword-pools/42 \
-X DELETE -H "Authorization: $FOURHZ_API_KEY"import os, requests
base = "https://api.fourhz.ai/v1/asr/hotword-pools"
headers = {"Authorization": os.environ["FOURHZ_API_KEY"]}
r = requests.post(base, headers=headers, json={
"name": "Speech terminology", "words": ["Voiceprint recognition", "Speaker diarization"], "is_enabled": True
})
r.raise_for_status()
pool_id = str(r.json()["id"])
# Use pool_id as hotword_pool_id in your next ASR request.
page = requests.get(base, headers=headers, params={"limit": 100, "offset": 0})
page.raise_for_status()
print(pool_id, page.json()["data"])const base = 'https://api.fourhz.ai/v1/asr/hotword-pools';
const response = await fetch(base, {
method: 'POST',
headers: {Authorization: apiKey, 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Speech terminology', words: ['Voiceprint recognition', 'Speaker diarization'], is_enabled: true})
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const {id} = await response.json();
// Add hotword_pool_id: String(id) to the ASR query or config.Response fields
{"code":"success","msg":"ok","id":42,"name":"Speech terminology","language":"en","words":["Voiceprint recognition","Speaker diarization"],"is_enabled":true,"upstream_ref":null,"created_at":"2026-10-20T00:00:00Z"}Create, get and patch return the pool fields above. List returns a data array of pools. DELETE returns 204 with no body.
Errors
Every HTTP error body contains error_code (machine-readable) and message (human-readable). Historical 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.
| 400 | Invalid JSON, invalid words or size limits exceeded. |
| 401 | Missing or invalid API key. |
| 404 | Pool missing or owned by another account. ASR admission also returns 404 for disabled pools. |
| 503 | Pool storage temporarily unavailable at ASR admission. Retry later; requested pools are never silently ignored. |