API docs · beta
Make a prop talk in three calls.
FrightVoice hears a visitor, works out a reply in character and speaks it. You register a prop once, then send it what visitors say.
Adding it to an app you already have? The integration guide has the order to do things in, with examples you can run.
Quickstart
Your key arrives by email with the base URL for your account. Put both in your shell:
export FV_BASE="https://…" # the base URL sent with your key export FV_KEY="fv_beta_…" # your key
1. Register a prop
curl -s "$FV_BASE/v1/props" \ -H "Authorization: Bearer $FV_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "Bones", "persona": "skelly", "location": "by the front gate"}'
{
"id": "prop_3f9a1c07be",
"name": "Bones",
"persona": "skelly",
"location": "by the front gate",
"voice": null,
"custom_prompt": null
}
2. Say something to it
This saves the spoken reply as an MP3 you can play:
curl -s "$FV_BASE/v1/props/prop_3f9a1c07be/turn?stream=audio&output_format=mp3_44100_128" \ -H "Authorization: Bearer $FV_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "Are you a real skeleton?"}' \ -o reply.mp3
3. Send a recording instead of text
curl -s "$FV_BASE/v1/props/prop_3f9a1c07be/turn?stream=audio&output_format=mp3_44100_128" \ -H "Authorization: Bearer $FV_KEY" \ -F "audio=@visitor.wav" \ -o reply.mp3
That is a working talking prop. The rest of this page is the detail.
Your key
Send your key with every call, in either header:
Authorization: Bearer fv_beta_… xi-api-key: fv_beta_…
- A key belongs to one account: one display and its props. Props on the same account can banter and share memory.
- Beta keys start with
fv_beta_and come with limits. - We store only a one-way hash of your key, so we cannot show it to you again. If you lose it, ask for a new one.
- Keep it out of public web pages and public code. If it leaks, tell us and we will replace it.
- If your app has many users, each one needs their own key. Ask us for them during the beta.
Props
A prop is one talking character in your display.
Lists the characters. Each has an id, a name, a kind and a one-line blurb.
| persona | Character | Kind |
|---|---|---|
skelly | Bones | Skeleton |
witch | Morgana | Witch |
ghost | Jeeves | Ghost butler |
pumpkin | Pip | Jack-o’-lantern |
reaper | Grim | Grim reaper (scary) |
wraith | Hollow | Wraith (scary) |
frost | Frost | Snowman |
santa | Santa | Santa Claus |
| Field | Needed | What it is |
|---|---|---|
name | Yes | What the prop is called. Up to 40 characters. It can differ from the character’s own name. |
persona | No | A character id from the table above. |
location | No | Where it stands, in a few words: “on the porch, next to a cauldron”. Up to 120 characters. |
custom_prompt | No | Your own notes for this prop: its job, a running joke, what to mention. Up to 600 characters. |
voice | No | A voice id from GET /v1/voices, if you want a different voice from the character’s own. |
scare_level | No | family, spooky or horror. Leave it out, or send null, for the character’s own level. See scare levels. |
Every prop comes back with two related fields: scare_level is what you chose, or null, and level is what the prop actually runs at.
PATCH takes any of the fields above. DELETE removes the prop and the stored text of its conversations.
Do not use custom_prompt to collect things about visitors. A prop must not be told to ask for full names, addresses, schools, phone numbers or anything similar. See the Acceptable Use Policy.
Scare levels
How dark a prop is allowed to go. You set it per prop, so a friendly pumpkin and a menacing reaper can share one display.
| Level | What it is | Who can use it |
|---|---|---|
family | Spooky fun for all ages. Playful threats and silly curses, nothing frightening or gory. | Every key. |
spooky | A real villain: menace, dread and dark threats. Nothing graphic or gory. | Every key. |
horror | Gory, graphic horror, for attractions whose visitors are teenagers and adults. Not for small children. | Only accounts we have switched it on for. Ask us. |
- Not every character goes dark. Santa, Pip and Frost are always
family. Bones, Morgana, Jeeves, Grim and Hollow allow all three. Grim and Hollow start atspooky; the others start atfamily. GET /v1/personastells you this for each character (default_level,levels), and lists the levels with whether your key may use each one.GET /v1/accountincludes"horror": trueorfalse.- Asking for a level a character does not have answers
400 level_not_allowed. Asking forhorrorwithout it switched on answers403 horror_not_enabled. - A level changes the tone. It does not switch off the safety rules, which apply at every level.
A turn
One thing a visitor said, and the prop’s reply.
Send what the visitor said in one of three ways:
| Body | Content-Type |
|---|---|
JSON: {"text": "…"} | application/json |
A form with an audio file | multipart/form-data |
| The recording itself | audio/* or application/octet-stream |
A recording must be under 5 MB. Query options:
| Option | Values | What it does |
|---|---|---|
stream | events (default), audio | events returns text and audio as a stream of JSON lines. audio returns only the spoken reply. |
audio | wav (default), mp3 | How audio is packed when stream=events. mp3 sends far less data. |
output_format | pcm_24000, mp3_44100_128, ulaw_8000, wav… | The audio format when stream=audio. Default pcm_24000. |
fx | on, off | Switches the character effect (pitch and echo) for this turn. Scary characters have it on unless you turn it off. |
Reading the reply
With stream=events the reply is newline-delimited JSON. Each line is one event, sent as soon as it exists:
| type | Meaning |
|---|---|
transcript | What the service heard, as text. |
text | One sentence of the reply, with its index. |
audio | Speech for a sentence: a WAV file in b64, with the sentence’s index, a piece number, sample_rate and seconds. One sentence arrives as several pieces. Play them in the order they come. |
done | The reply is complete. Carries the timings for the turn, the level the prop ran at, and guard: which safety rule answered in place of the character, if one did. |
error | Something failed. stage says where: input, stt, tts or turn. |
With audio=mp3, each audio event is {"type": "audio", "format": "mp3", "b64": "…"}. These are slices of one continuous MP3 stream, not separate files: feed them to your player in order, or join them, and do not try to play one slice alone.
Replies are short on purpose: up to three brief sentences, and the first few words come quickly so the prop is never silent for long.
Audio only, for small devices
A microcontroller that cannot parse JSON can ask for the spoken reply alone and feed it straight to its speaker:
POST /v1/props/{id}/turn?stream=audio&output_format=pcm_24000
The body of the reply is raw 16-bit mono audio, streamed as it is made. If nothing could be spoken the call returns an error status. It never returns an empty success.
Open microphone
The fastest path. The prop opens one WebSocket and sends its microphone as it records, so by the time the visitor stops talking, the audio is already with us.
- You send binary frames of 16-bit mono PCM at
sample_rate. Frames of 20 ms work well. Allowed rates: 8000, 16000, 24000, 48000. - You receive JSON events, and binary frames of reply audio as 16-bit mono PCM. Add
output_format=pcm_24000(or another rate) to choose the rate of the reply, andfx=onorfx=offto switch the character effect. - Your key goes in the
Authorizationheader. A browser cannot set headers on a WebSocket, so it may send{"type": "auth", "key": "…"}as its first message instead.
| From the service | Meaning |
|---|---|
listening | Connected. Carries the pause lengths in use. |
speech_start, speech_end | A visitor started, then finished, speaking. |
transcript, text | What was heard, then each sentence of the reply. |
audio_start | Reply audio follows as binary frames. Carries sample_rate and since_speech_end_ms. |
done | The reply is complete, with timings. |
error | Something failed. stage says where. |
| You may send | Meaning |
|---|---|
{"type": "end"} | Push-to-talk: the visitor has finished. Do not wait for a pause. |
{"type": "playback_done"} | Your speaker has finished the reply. The microphone is listened to again. |
{"type": "config", "end_silence_ms": 700, "speculate_ms": 250} | Changes how long a pause must be before the visitor counts as finished. |
While the prop is speaking its microphone is ignored, so the prop does not answer itself. That also means a visitor cannot interrupt it yet.
The 0.7 second pause is a trade. Shorter, and the prop talks over people who pause between sentences. Longer, and every reply waits. Work on the reply starts after 0.25 seconds of quiet, so the pause costs little. If the visitor carries on talking, that early work is thrown away unheard and unstored.
Banter
Two props on the same account talk to each other.
{
"prop_a": "prop_3f9a1c07be",
"prop_b": "prop_81d2aa4c10",
"topic": "the empty candy bowl",
"exchanges": 2
}
topic is optional, up to 120 characters. exchanges is 1 to 4. Add "audio": "mp3" for MP3 audio events, as in a turn. The reply is the same stream of events as a turn, with each event marked with the prop that is speaking.
The topic is treated as something a visitor said to both props, so the props may remember it like anything else they are told.
Memory
Every prop on an account knows two things: the notes you write, and what visitors have told any of the props lately.
- Your notes describe the display: “A family-friendly home haunt. The candy is by the garage.” Send
{"notes": "…"}, up to 1,000 characters. - What visitors said is picked out as short facts: a first name, a costume, something they like. Every prop on the account can use them for 12 hours. Then they are deleted.
GETreturns both.DELETEforgets everything visitors said, at once.
{
"notes": "A family-friendly home haunt. The candy is by the garage.",
"learned": [
{"fact": "The visitor's name is Sam", "at": 1795634000.0},
{"fact": "Sam is dressed as a pirate", "at": 1795634012.4}
]
}
Usage and timings
{
"month": "2026-12",
"active_props": 2,
"totals": {"turns": 412, "tts_chars": 38140, "audio_seconds": 2903.4, …},
"props": [
{"prop_id": "prop_3f9a1c07be", "prop_name": "Bones", "turns": 300, "tts_chars": 27015, "audio_seconds": 2051.9},
{"prop_id": "prop_81d2aa4c10", "prop_name": "Morgana", "turns": 112, "tts_chars": 11125, "audio_seconds": 851.5}
]
}
month is optional and defaults to the current month. active_props is the number of props that had at least one turn.
How long recent replies took to start, against the two-second bar.
Your account
What your key may do, how much of that is in use, and which Terms you agreed to.
{
"account_id": "acct_1a2b3c4d5e6f",
"name": "Maple Street Haunt",
"created_at": 1795640000.0,
"terms": {"version": "beta-draft-2026-11-25", "recorded_at": 1795640000.0},
"limits": {"props": 5, "at_once": 3, "replies_per_day": 1500, "characters_per_month": 500000},
"horror": false,
"in_use": {"props": 2, "at_once": 0, "replies_last_24h": 41, "characters_this_month": 1280}
}
A limit of null means there is none.
Deleting what we hold
Deletes every word said to and by your props, what they learned from visitors, and your notes. Your props, your key and your usage counts stay. It answers with how much was removed: {"deleted": {"turns": 212, "learned": 3}}.
Deletes the account and everything under it: props, text, usage and keys. It cannot be undone, so it only works when confirm matches your account_id. Without that it answers 400 confirm_required and deletes nothing.
Switching from ElevenLabs
If your code already calls ElevenLabs for speech, change two things: the base URL and the key. These addresses behave the same way:
- The body is
{"text": "…"}, up to 5,000 characters. Other fields your client sends, such asvoice_settings, are accepted and ignored. output_formatworks as it does there:mp3_44100_128by default, orpcm_16000,pcm_24000,ulaw_8000.- Errors have the same shape, so your error handling keeps working.
Voice IDs already saved in a prop
You do not have to update the prop. Map its old voice ID to one of ours:
curl -X PUT "$FV_BASE/v1/voices/YOUR_OLD_VOICE_ID/alias" \ -H "xi-api-key: $FV_KEY" \ -H "Content-Type: application/json" \ -d '{"voice": "A_VOICE_ID_FROM_/v1/voices"}'
An ID we do not recognise is spoken in the default voice, and the reply carries the header X-FV-Voice-Fallback: 1 so you can tell.
This replaces speech only. To replace your chat model as well, use a turn: it does the thinking and the speaking in one call.
Errors
{"detail": {"status": "prop_not_found", "message": "No prop prop_123 on this account"}}
| HTTP | status | What happened |
|---|---|---|
| 400 | empty_turn, invalid_json, unknown_persona, invalid_output_format, same_prop, confirm_required, unknown_level, level_not_allowed | Something in the request is wrong. The message says what. |
| 401 | invalid_api_key | The key is missing or wrong. |
| 403 | prop_limit | Your key has all the props it is allowed. Delete one, or ask for more. |
| 403 | horror_not_enabled | The horror level is not switched on for your account. |
| 404 | prop_not_found | No such prop on this account. |
| 413 | audio_too_large | The recording is over 5 MB. |
| 415 | unsupported_media_type | Send JSON text, a form with audio, or an audio body. |
| 422 | nothing_heard | The recording had no speech we could make out. |
| 429 | too_many_at_once | Too many of your props are talking at this moment. Try again when one finishes. |
| 429 | daily_limit, quota_exceeded | The key has used its replies for the last 24 hours, or its plain text-to-speech characters for the month. |
| 502 | no_audio, voice_unavailable, stt_unavailable | A model behind the service failed. Safe to try again. |
On the open microphone, limits arrive as an event, not a status: {"type": "error", "stage": "limit", "message": "…"}. If the key is already at its at-once limit when you connect, the connection then closes with code 4429.
If the thinking part fails mid-conversation, the prop says a short stumble line in character. It does not go silent.
Limits
- English only.
- Recordings sent to a turn: under 5 MB.
- Text sent to text-to-speech: up to 5,000 characters.
- Replies: up to three short sentences.
- A beta key starts with these limits, and
GET /v1/accountshows yours:- 5 props;
- 3 things running at once. A turn, a banter or a speech request counts while it runs. An open microphone counts for as long as it is connected;
- 1,500 replies in any 24 hours;
- 500,000 characters of plain text-to-speech a month.
- The service is pre-release. It may be slow, wrong or down. There is no uptime promise during the beta.
Safety you get
Props talk to children, so every account gets these at every scare level, and they cannot be switched off.
A prop never
- dares or helps a visitor to do something that could hurt them;
- keeps a secret from a parent, or asks a visitor to keep one;
- asks where anyone lives, or for other personal details;
- leads a visitor away from the people they came with;
- is cruel about real people. Teasing a costume is fine.
A prop drops its act
- for a visitor who is truly scared, or says stop;
- for a visitor who is lost or alone;
- for a visitor talking about someone who is ill or has died;
- for a visitor who talks about hurting themselves, who is pointed kindly to a grown-up.
When a visitor’s words trip one of these, the prop says a kind line we wrote in advance and the model is not asked at all. The done event names the rule in guard, with values such as scared, unsafe, secret, alone, personal and tender.
Also on every reply
- Every sentence is checked before it is spoken. A bad one is replaced.
- Asked whether it is real, a character says it is a decoration.
- Phone numbers, email addresses and street addresses are removed from text before it is stored.
What these are, honestly. They are word-matching rules plus the instructions the model is given. They catch what we thought of. A visitor can say something no list anticipates, and a second model that checks every reply is not built yet. Keep a grown-up near the prop, and tell us when one gets through.
What you must do
- Show the visitor notice. Anywhere a prop listens, people must be able to see that it listens and that the words are kept. Print the sign, or show its text in your app before the first conversation.
- Keep an adult in charge. Someone 18 or older owns the account and is responsible for where the prop is and who it talks to.
- Use it where people expect it. A porch, a yard, a haunt, a display. Not a bedroom, a bathroom or anywhere hidden.
- Do not collect personal details through a prop.
The full rules are in the Acceptable Use Policy and the Beta Terms.
Not built yet
- Interrupting a prop while it speaks.
- A chat-style address that swaps in for a Claude or OpenAI key.
- Languages other than English.
- Telling speech from background noise in a loud yard. End of speech is judged by loudness for now.
- A page for managing your own keys. For a new or replacement key, email contact@frightmaps.com.
- Voice cloning. Not planned for the beta.