The API
Two ways in: a WebSocket that returns punctuated text while somebody is still talking, and an HTTP pipeline for files. Every example below was taken from the running server rather than written to describe it.
On this page
Quickstart: your first request
Two minutes, one terminal. A WAV file in, text out.
Get a key
Create an account and confirm the email (unverified accounts get 403). Then create a key on the Devices page of your account. Treat it like a password.
Send a file
The synchronous endpoint takes WAV only. Anything else, or a long file, goes to the job queue (second tab).
curl -X POST https://vibevoice.net/api/transcribe \ -H "X-API-Key: your_api_key_here" \ -F "file=@/path/to/meeting.wav"
curl -X POST https://vibevoice.net/api/jobs/submit \ -H "X-API-Key: your_api_key_here" \ -F "file=@/path/to/interview.m4a" \ -F "include_timestamps=true" curl -H "X-API-Key: your_api_key_here" \ https://vibevoice.net/api/jobs/1234
Read the answer
/api/transcribeanswers with the transcript as plain text, not JSON, when the file is done.Can we move the review to Thursday? I need one more day for the figures.
/api/jobs/submitanswers at once with a job id. PollGET /api/jobs/{id}untilstatusiscompletedorfailed.{"job_id": 1234, "status": "pending", "message": "Job submitted successfully"}
Streaming in six frames
Endpoint wss://vibevoice.net/api/v2/stream. Audio is raw 16 kHz mono int16 PCM, no header. The key goes in the first frame, never in the URL.
| Direction | Frame | What it is |
|---|---|---|
| you send | start | JSON with api_key, audio, optional language and vocabulary |
| you get | ready | Key accepted. Carries the resume token. Wait for it before sending audio. |
| you send | binary | Raw PCM audio, 16 kHz mono int16. |
| you get | segment | Committed text with idx, never changes. Append in order. |
| you send | end | No more audio. For one short utterance send this, not flush. |
| you get | end | The last frame, with last_idx and billed_ms. |
No progress frame for 3 seconds means the link is dead: reconnect with the resume token. Also on the wire: flush and flushed, ping and pong, warning and restarting.
What can I build on the VibeVoice API?
Two things. The WebSocket at wss://vibevoice.net/api/v2/stream takes 16 kHz mono PCM — with typed frames, per-session vocabulary and explicit cuts. Existing desktop installs use the frozen v1 path at /api/stream. The HTTP endpoints transcribe files you already have. Both authenticate with an API key from your account.
There is no local or on-premise deployment: audio is transcribed on our servers, so an integration needs a network connection. If your constraint is that audio must never leave the machine, a self-hosted transcriber is the right tool and this is not one — we would rather say so here than after you have built against us.
Authentication
HTTP requests carry the key in an X-API-Key header, or the same key as Authorization: Bearer. Either works on every HTTP endpoint here. The WebSocket does neither: it takes the key in the first text frame after the connection opens. There is no query-parameter form — connecting with ?api_key= fails the handshake without explanation, which is the single most common way a first integration goes wrong.
X-API-Key: 0123456789abcdef... # HTTP
Authorization: Bearer 0123456789abcdef... # HTTP, same key
{"type": "start", "api_key": "...", "audio": {...}} # v2 first frame (recommended)
{"api_key": "0123456789abcdef..."} # v1 legacy first frameKeys are per-device rather than per-account: treat a key as a password, as it is not scoped. Unverified accounts return 403 until the link in the confirmation email is clicked.
What comes back
Text arrives in pieces while the speaker is still going. On protocol v2, every text frame is a JSON object whose first key is type: a ready frame after start, followed by committed segment frames with text and sequence position idx. The segments never overlap: append them in order and you have the transcript.
# v2 (recommended) — typed JSON frames
{"type": "ready", "session": "...", "resume": {"token": "..."}, ...}
{"type": "segment", "idx": 1, "text": "Can we move the review to Thursday? I need one more day for the figures. ", "ack_ms": 27400}
{"type": "segment", "idx": 2, "text": "Everything else stays as planned.", "ack_ms": 31200}
{"type": "end", "last_idx": 2, "billed_ms": 31200}
# v1 (legacy) — raw pieces followed by final marker
{"text": "Can we move the review to Thursday? I need one more day for the figures. ", "idx": 1, "ack_ms": 27400}
{"text": "Everything else stays as planned.", "idx": 2, "ack_ms": 31200}
{"text": "", "is_final": true, "idx": 2}Each piece carries idx (counting from 1, continuing across resumes) and ack_ms (audio timestamp in ms before which every word has been delivered). v2 also emits progress once a second and confirms manual cuts with flushed. Segments are whole stretches of speech cut at a pause, about every half minute in a long stream, not single words. For one utterance, a command or a short note, send end rather than flush: it is the fastest way to all of the text.
If the connection drops
A phone switching between Wi-Fi and mobile data drops its socket mid-sentence. On protocol v2, every ready frame automatically carries a resume token. Reconnect with that token and the last segment you received to resume the same stream seamlessly. No progress frame for 3 seconds means the link is dead: reconnect then, rather than waiting for TCP to give up, which on a phone can take a minute.
# v2 reconnect
{"type": "start", "api_key": "...", "audio": {...},
"resume": {"token": "<token>", "last_idx": 3, "ttl_s": 60}}
{"type": "ready", "resume": {"token": "...", "resumed": true, "received_ms": 9024}}
{"type": "segment", "idx": 4, "text": "...", "ack_ms": 9000} # what you missed
# v1 legacy reconnect (requires resumable: true on connect)
{"api_key": "...", "resumable": true, "resume": "<token>", "last_idx": 3}
{"status": "authenticated", "resumed": true, "received_ms": 9024}When resumed is true, the server replays missed segments and you stream audio from received_ms onward. The session is held for 30 seconds by default (configurable up to 120 seconds in ttl_s). If expired, resumed is false: resend from your last ack_ms.
Error handling & close codes
Protocol v2 delivers errors as explicit JSON frames followed immediately by an RFC 6455 application close code (4000–4029). Every error specifies whether reconnecting can succeed in retryable.
{"type": "error", "code": "invalid_api_key", "retryable": false} # close 4001
{"type": "error", "code": "quota_exceeded", "retryable": false} # close 4002
{"type": "error", "code": "rate_limited", "retryable": true,
"retry_after_ms": 60000} # close 4029
# Mid-stream server drain before restart:
{"type": "restarting", "reconnect_after_ms": 4000}Close codes map directly to failure reasons. The last three are retryable.
| Close | Code | Retry | Meaning |
|---|---|---|---|
| 4000 | bad_startunknown_message | no | The first frame is missing, not JSON, has the wrong type or a wrong field; or a text frame whose type is not flush, end or ping. |
| 4001 | invalid_api_key | no | Key unknown or revoked. |
| 4002 | quota_exceededtrial_exhausted | no | The minutes of the plan or of the trial are used up. |
| 4003 | device_key_refused | no | This key may not stream here. |
| 4004 | unsupported_audiounsupported_language | no | The audio format or language code is not supported; the error frame lists what is. |
| 4010 | server_restarting | yes | The server restarted before the stream began. Mid-stream you get a restarting frame instead. |
| 4011 | internal_error | yes | An internal error. |
| 4029 | rate_limited | yes | Too many streams: 300 opened an hour per API key, 600 per IP address. Wait retry_after_ms before reconnecting. |
A working client
# Install: pip install websockets
import asyncio
import json
import websockets
API_KEY = "your_api_key_here"
URL = "wss://vibevoice.net/api/v2/stream"
async def stream_audio_v2(pcm_chunks):
"""pcm_chunks yields raw int16 PCM bytes, 16 kHz mono."""
async with websockets.connect(URL) as ws:
# 1. Start frame: format required; optional language & vocabulary.
await ws.send(
json.dumps({
"type": "start",
"api_key": API_KEY,
"audio": {"encoding": "pcm_s16le", "sample_rate": 16000, "channels": 1},
"language": "de", # or "auto", or omit to use account default
"vocabulary": ["Home Assistant", "Zigbee", "Wohnzimmer"],
})
)
# 2. Server answers with ready frame containing session and limits.
ready = json.loads(await ws.recv())
if ready.get("type") != "ready":
raise RuntimeError(ready)
# 3. Read committed segment frames while audio is streaming.
async def reader():
async for message in ws:
frame = json.loads(message)
kind = frame.get("type")
if kind == "segment":
print(frame["text"], end="", flush=True)
elif kind == "progress":
pass # frame["received_ms"], frame["ack_ms"]
elif kind == "flushed":
pass # flush cut complete up to frame["ack_ms"]
elif kind == "end":
break
elif kind == "error":
raise RuntimeError(f"Error {frame.get('code')}: {frame.get('message')}")
reading = asyncio.create_task(reader())
# 4. Stream audio as binary frames.
for chunk in pcm_chunks:
await ws.send(chunk)
# Optional, for long streams: flush cuts at the latest pause.
# Words after that pause arrive later, at the latest with "end".
# await ws.send(json.dumps({"type": "flush"}))
# 5. Send end control frame when finished.
await ws.send(json.dumps({"type": "end"}))
await reading
asyncio.run(stream_audio_v2(my_pcm_source()))// Streaming client (browser or Node.js) — protocol v2
const API_KEY = 'your_api_key_here';
const socket = new WebSocket('wss://vibevoice.net/api/v2/stream');
socket.binaryType = 'arraybuffer';
let isReady = false;
socket.onopen = () => {
// 1. Dispatch start payload declaring key, format, and vocabulary.
socket.send(
JSON.stringify({
type: 'start',
api_key: API_KEY,
audio: { encoding: 'pcm_s16le', sample_rate: 16000, channels: 1 },
language: 'de',
vocabulary: ['Home Assistant', 'Zigbee', 'Wohnzimmer'],
})
);
};
socket.onmessage = (event) => {
const frame = JSON.parse(event.data);
if (!isReady) {
// 2. Await ready confirmation from the server.
if (frame.type !== 'ready') throw new Error(frame.message || 'Expected ready');
isReady = true;
startSendingAudio(); // raw int16 PCM, 16 kHz mono binary frames (ArrayBuffer)
return;
}
// 3. Receive committed segment frames and progress.
if (frame.type === 'segment') {
if (typeof process !== 'undefined' && process.stdout) {
process.stdout.write(frame.text);
} else {
console.log(frame.text);
}
} else if (frame.type === 'progress') {
// frame.received_ms, frame.ack_ms
} else if (frame.type === 'flushed') {
// flush cut complete up to frame.ack_ms
} else if (frame.type === 'end') {
socket.close();
} else if (frame.type === 'error') {
throw new Error('Error ' + frame.code + ': ' + frame.message);
}
};
function finish() {
// 4. Conclude session by sending the end control payload.
socket.send(JSON.stringify({ type: 'end' }));
}// Cargo.toml: tokio = { version = "1", features = ["full"] }
// tokio-tungstenite = "0.20", futures-util = "0.3", serde_json = "1"
// Streaming client — protocol v2
use futures_util::{SinkExt, StreamExt};
use serde_json::json;
use tokio_tungstenite::{connect_async, tungstenite::Message};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let (mut ws, _) = connect_async("wss://vibevoice.net/api/v2/stream").await?;
// 1. Send start frame with connection credentials and audio settings.
let start = json!({
"type": "start",
"api_key": "your_api_key_here",
"audio": { "encoding": "pcm_s16le", "sample_rate": 16000, "channels": 1 },
"language": "de",
"vocabulary": ["Home Assistant", "Zigbee", "Wohnzimmer"]
});
ws.send(Message::Text(start.to_string())).await?;
// 2. Verify server readiness before dispatching audio.
match ws.next().await {
Some(Ok(Message::Text(msg))) => {
let frame: serde_json::Value = serde_json::from_str(&msg)?;
if frame["type"] != "ready" {
return Err(format!("expected ready frame, got: {:?}", frame).into());
}
}
other => return Err(format!("connection failed: {:?}", other).into()),
}
let (mut write, mut read) = ws.split();
// 3. Spawn asynchronous task to stream transcript segments.
let reader = tokio::spawn(async move {
while let Some(Ok(Message::Text(msg))) = read.next().await {
let frame: serde_json::Value = serde_json::from_str(&msg)?;
match frame["type"].as_str() {
Some("segment") => {
print!("{}", frame["text"].as_str().unwrap_or(""));
}
Some("end") => break,
Some("error") => {
eprintln!("Error {}: {}", frame["code"], frame["message"]);
break;
}
_ => {} // progress, flushed, pong
}
}
Ok::<(), Box<dyn std::error::Error + Send + Sync>>(())
});
// 4. Stream raw int16 PCM audio chunks as binary frames.
for chunk in pcm_chunks() {
write.send(Message::Binary(chunk)).await?;
}
// 5. Close cleanly by sending the end frame.
write.send(Message::Text(json!({ "type": "end" }).to_string())).await?;
reader.await??;
Ok(())
}# Legacy v1 protocol (/api/stream)
# Install: pip install websockets
import asyncio
import json
import websockets
API_KEY = "your_api_key_here"
URL = "wss://vibevoice.net/api/stream"
async def stream_audio(pcm_chunks):
"""pcm_chunks yields raw int16 PCM bytes, 16 kHz mono."""
async with websockets.connect(URL) as ws:
# 1. Authenticate. The key goes in a text frame, not the URL.
await ws.send(json.dumps({"api_key": API_KEY}))
ack = json.loads(await ws.recv())
if ack.get("status") != "authenticated":
raise RuntimeError(ack)
# 2. Read transcript pieces while audio is still going out.
async def reader():
async for message in ws:
frame = json.loads(message)
if frame.get("is_final"):
break
if frame.get("text"):
print(frame["text"], end="", flush=True)
reading = asyncio.create_task(reader())
# 3. Send audio as binary frames, then close the input explicitly.
for chunk in pcm_chunks:
await ws.send(chunk)
await ws.send("END_STREAM")
await reading
asyncio.run(stream_audio(my_pcm_source()))// Streaming client (browser or Node.js) — legacy v1
const API_KEY = 'your_api_key_here';
const socket = new WebSocket('wss://vibevoice.net/api/stream');
socket.binaryType = 'arraybuffer';
let authenticated = false;
socket.onopen = () => {
// The API key is sent as the first text frame. There is no query-parameter
// auth: connecting with ?api_key=... will fail the handshake.
socket.send(JSON.stringify({ api_key: API_KEY }));
};
socket.onmessage = (event) => {
const frame = JSON.parse(event.data);
if (!authenticated) {
if (frame.status !== 'authenticated') throw new Error(frame.message);
authenticated = true;
startSendingAudio(); // int16 PCM, 16 kHz mono, as binary frames
return;
}
if (frame.is_final) {
socket.close();
} else if (frame.text) {
process.stdout.write(frame.text);
}
};
function finish() {
socket.send('END_STREAM'); // text frame — flushes the buffered tail
}// Cargo.toml: tokio = { version = "1", features = ["full"] }
// tokio-tungstenite = "0.20", futures-util = "0.3", serde_json = "1"
// Legacy v1 streaming client
use futures_util::{SinkExt, StreamExt};
use serde_json::json;
use tokio_tungstenite::{connect_async, tungstenite::Message};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let (mut ws, _) = connect_async("wss://vibevoice.net/api/stream").await?;
// 1. Authenticate with a text frame.
ws.send(Message::Text(json!({ "api_key": "your_api_key_here" }).to_string()))
.await?;
match ws.next().await {
Some(Ok(Message::Text(ack))) if ack.contains("authenticated") => {}
other => return Err(format!("auth failed: {:?}", other).into()),
}
// 2. Audio goes out as binary frames: int16 PCM, 16 kHz, mono.
for chunk in pcm_chunks() {
ws.send(Message::Binary(chunk)).await?;
}
ws.send(Message::Text("END_STREAM".into())).await?;
// 3. Collect text until the final marker.
while let Some(Ok(Message::Text(text))) = ws.next().await {
let frame: serde_json::Value = serde_json::from_str(&text)?;
if frame["is_final"].as_bool().unwrap_or(false) {
break;
}
print!("{}", frame["text"].as_str().unwrap_or(""));
}
Ok(())
}# Synchronous batch transcription. WAV only, and the response is plain # text — not JSON. The only form field read is prompt. curl -X POST https://vibevoice.net/api/transcribe \ -H "X-API-Key: your_api_key_here" \ -F "file=@/path/to/meeting.wav" # Anything that is not a WAV, or is long enough to be worth queueing, goes # through the asynchronous job pipeline instead. It accepts mp3, m4a, wav, # flac, ogg, opus, aac, wma, amr, 3gp, mp4, mov, mkv, avi, webm, mpeg, mpg # and wmv, and returns immediately with an id to poll. curl -X POST https://vibevoice.net/api/jobs/submit \ -H "X-API-Key: your_api_key_here" \ -F "file=@/path/to/interview.m4a" \ -F "include_timestamps=true" curl -H "X-API-Key: your_api_key_here" \ https://vibevoice.net/api/jobs/1234
Endpoints
wss://vibevoice.net/api/v2/streamRecommended streaming protocol (v2) for live dictation and speech applications.
Typed frames · per-session language & vocabulary · explicit flush · automatic resume tokens · close codes
wss://vibevoice.net/api/streamLegacy streaming protocol (v1), frozen for existing desktop installs.
Additive maintenance only · /stream is the legacy alias · new integrations should use /api/v2/stream
/api/transcribeSynchronous transcription of a single WAV file. Nothing transcodes first, so other formats belong on /api/jobs/submit.
Optional prompt field biases vocabulary · up to 30MB, the same for every plan
/api/jobs/submitThe queued pipeline, and the one to use for anything long or not already a WAV. Returns a job id immediately; poll GET /api/jobs/{id} for status and the finished transcript. Optional word-level timestamps (Pro and Ultra) and speaker diarization (Ultra).
Accepts audio and video · include_timestamps, word_level_timestamps, enable_diarization · up to 100MB free, 1GB on Pro, 10GB on Ultra
/oauth/device/codeDevice Code Grant, for a client with no browser of its own — the desktop app and CLI tools use it. Pair with /oauth/device/token to exchange an approved code for a key.
Same flow the desktop client runs on first launch
The complete parameter and response reference is in the Redoc explorer (opens in a new tab), generated from openapi.json (opens in a new tab).
30min / month
Included every month on every account, Free plan and up — no credit card needed to test the API.

What the API does not do
- It does not run on your infrastructure. There is no self-hosted build, no container and no on-premise licence — audio is transcribed on our servers.
- It does not work offline, and it has no local fallback. A dropped connection can be resumed for 30 seconds by default (configurable up to 120 seconds on protocol v2); after that, or without resume, the stream is gone.
- POST /api/transcribe takes WAV only. Other formats belong on /api/jobs/submit, which transcodes; sending an mp3 to the synchronous endpoint currently returns a 500 rather than a helpful error.
- There is no custom model or terminology training. You can bias recognition with a per-session vocabulary list on streaming v2 (up to 200 terms, capped at 400 characters in total via limits.max_vocabulary_chars; whole terms from the end are dropped and ready.vocabulary.truncated reports when terms are omitted) or the prompt field on batch requests, which condition the decoder rather than retraining the model.
- Speaker diarization runs on the job pipeline only, not on the live stream, and requires Ultra.
- There is no webhook or push callback yet. Job completion is polled.
Common questions
Related
Last updated .