Com tecnologia deChatGPTClaudeGoogle Gemini
Funciona comGoogle DriveDropboxOneDrive

Getting started

API Reference

Base URL, authentication, error handling, and the full endpoint index for the RealtimeVoiceKIT API.

The RealtimeVoiceKIT API gives you speech-to-text, realtime streaming transcription, voice agents, and speech intelligence over plain HTTPS and WebSockets. This page covers the conventions every endpoint shares. The pages in the sidebar document each endpoint in full, with request parameters, response fields, and runnable examples.

Base URL

All REST endpoints live under a single base URL. WebSocket endpoints use the same host over wss://.

Base URL
https://api.realtimevoicekit.com/v2

A machine-readable schema of every endpoint is available at GET /v2/openapi.json. It is the same contract this reference documents, filtered to the public surface.

Authentication

Authenticate with an API key in the Authorization header using the Bearer scheme. Keys start with rtvk_ and are created in your workspace under Settings, API keys. Every endpoint requires a key except GET /v2/models and GET /v2/pricing, which are public.

Authenticated request
curl https://api.realtimevoicekit.com/v2/credits \
  -H "Authorization: Bearer rtvk_your_api_key"
API keys are secrets. Call the API from your server, never from browser or mobile code. For realtime features, mint a short-lived session token server-side and hand only that token to the client.

A missing, malformed, or revoked key returns 401 with the error code unauthorized.

Content types

  • Request bodies are JSON. Send Content-Type: application/json on POST requests with a body.
  • Responses are JSON, with two exceptions: subtitle exports return plain text (application/x-subrip for SRT, text/vtt for VTT), and media files are uploaded with a direct PUT to a signed storage URL using the file's own content type.
  • Timestamps in responses are ISO 8601 strings in UTC. Word and segment timings (start, end) are integer milliseconds from the start of the audio.

Errors

Errors return a JSON envelope with a human-readable message and a stable machine-readable code. Branch on code, not on the message text.

Error envelope
{
  "error": {
    "message": "Your free API credit is used up. Add a payment method to continue.",
    "code": "v2_billing_required"
  }
}
StatusCodeMeaning
401unauthorizedMissing, malformed, revoked, or unknown API key.
400unknown_modelThe model id is not in the model catalog.
400bad_modelThe model exists but is the wrong family for this endpoint, for example a pre-recorded model sent to /v2/realtime/token.
400unsupported_media_typeThe upload is not a recognized audio or video file.
400invalid_sizesize_bytes was provided but is not a positive integer.
400upload_incompleteUpload completion was requested before the file reached storage. Retry the PUT, then complete again.
400missing_queryWord search was called without any search terms.
400bad_formatSubtitle format must be srt or vtt.
400invalid_webhook_urlwebhook_url is not a public http(s) URL. Private, loopback, and cloud metadata hosts are rejected.
402v2_billing_requiredYour free credit is used up, or estimated_duration_sec projects a cost above your remaining credit. Start a subscription via POST /v2/billing/checkout.
404not_foundThe resource does not exist or does not belong to your account.
409not_readyThe transcript has not completed yet. Poll GET /v2/transcripts/{transcript_id} until status is completed.
409already_api_subscribedCheckout was requested but an API subscription is already active.
413upload_too_largeThe file exceeds the 5 GiB upload limit.
502stripe_errorThe payment provider did not return a checkout URL. Retry later.
503billing_unconfiguredUsage billing is not configured on this deployment.

Requests whose body fails schema validation (for example a POST /v2/transcripts with neither audio_url nor upload_id) return 422 with the framework's standard validation shape: a detail array describing each failing field. All other errors use the envelope above.

Pagination

List endpoints (GET /v2/transcripts and GET /v2/usage) use offset pagination and return newest records first.

Query paramTypeDefaultDescription
limitinteger, 1 to 20050Maximum number of rows to return.
offsetinteger, 0 or more0Number of rows to skip from the newest record.

Results are wrapped in a data array. To page, increase offset by limit until fewer than limit rows come back.

Credits and billing

Every account starts with 10 USD of free API credit. Usage is metered per second against the per-hour rate of the model you use and drawn from that credit first. When the credit is exhausted, requests that would incur cost return 402 with code v2_billing_required until you start a pay-as-you-go subscription through POST /v2/billing/checkout.

Check your balance at any time with GET /v2/credits, and inspect per-request charges with GET /v2/usage.

Endpoint index

Uploads

POST/v2/uploads/signCreate an upload and get a signed PUT URL
POST/v2/uploads/{upload_id}/completeConfirm the file reached storage

Transcripts

POST/v2/transcriptsCreate a transcript from a URL or upload
GET/v2/transcriptsList transcripts
GET/v2/transcripts/{transcript_id}Get a transcript
GET/v2/transcripts/{transcript_id}/sentencesGet transcript sentences
GET/v2/transcripts/{transcript_id}/paragraphsGet transcript paragraphs
GET/v2/transcripts/{transcript_id}/word-searchSearch words in a transcript
GET/v2/transcripts/{transcript_id}/{fmt}Export SRT or VTT subtitles
DELETE/v2/transcripts/{transcript_id}Delete a transcript

Realtime

POST/v2/realtime/tokenMint a realtime session token
WSS/v2/realtime/wsStream audio, receive live transcripts

Voice agent

POST/v2/voice-agent/tokenMint a voice agent session token
WSS/v2/voice-agent/wsRun a realtime voice agent conversation

Speech intelligence

POST/v2/speech-understandingAsk a question grounded on one transcript
POST/v2/llm/chat-completionsChat completions, optionally grounded on a transcript

Account and billing

GET/v2/modelsList models and rates (public)
GET/v2/pricingAlias of /v2/models (public)
GET/v2/creditsGet your credit balance
GET/v2/usageList usage events
GET/v2/usage/summaryUsage totals grouped by product
POST/v2/billing/checkoutStart a pay-as-you-go subscription
4.2de 21 avaliações