Rhino Model API
The Rhino Model API trains a Speech-to-Intent context model from a YAML context definition.
Send a YAML context as a request and receive a trained .rhn model file in response, ready for on-device
inference with Rhino.
Base URL
All routes are relative to the following base URL:
Authentication
Every request must be authenticated with your AccessKey passed in the x-api-key header. You can obtain a
free AccessKey from the Picovoice Console.
Requests made without a valid AccessKey are rejected with a 403 Forbidden response.
Train a Context Model
Trains a Rhino context model for the given language and target platform from a YAML context definition.
On success, the response body is the binary .rhn model file.
Path Parameters
languagestring — The language of the context. Must be one of the supported language values (e.g.en).
Headers
x-api-keystring — Required. YourAccessKeyfrom the Picovoice Console.
Body Parameters
The request body is a JSON object with the following fields:
platformstring — Required. The target platform the model will run on. Must be one of the supported platform values.yaml_contentstring — Required. The context definition, as a YAML string. See the context syntax cheat sheet for the expected format.
Example Request
A successful request returns a 303 See Other redirect pointing to the trained model. The -L flag tells
curl to follow that redirect automatically and download the .rhn file:
Replace the placeholders with your own values:
${ACCESS_KEY}— yourAccessKeyfrom the Picovoice Console.${OUTPUT_PATH}— the local path to write the returned.rhnmodel to (e.g../context.rhn).${PLATFORM}— a supported platform value (e.g.linux).${YAML_STRING}— your context definition as a YAML string.${LANGUAGE}— a supported language value (e.g.en).
Responses
200 OK— Returned when the303redirect is followed. The response body is the binary.rhnmodel file.303 See Other— Training succeeded. The response carries aLocationheader with a URL to the trained model. Follow this redirect (e.g. withcurl -L) to download it and receive the200 OKabove.400 Bad Request— The request was malformed, theplatformvalue was invalid, or theyaml_contentwas not valid YAML / used an incorrect context format.403 Forbidden— TheAccessKeyis missing or invalid.
Supported Languages
The language path parameter accepts one of the following values:
| Language | Value |
|---|---|
| English | en |
| French | fr |
| German | de |
| Italian | it |
| Japanese | ja |
| Korean | ko |
| Mandarin Chinese | zh |
| Portuguese | pt |
| Spanish | es |
Supported Platforms
The platform body parameter accepts one of the following values:
| Platform | Value |
|---|---|
| Linux | linux |
| macOS | mac |
| Windows | windows |
| Raspberry Pi | raspberry-pi |
| WebAssembly | wasm |
| Android | android |
| iOS | ios |