Unterstützt vonChatGPTClaudeGoogle Gemini
Kompatibel mitGoogle DriveDropboxOneDrive

Getting started

LLM Gateway

Chat completions through the same API and key you already use for transcription.

The LLM Gateway gives your application chat completions through the same base URL and rtvk_ API key you already use for transcription: one account, one key, one billing relationship, and a managed language model behind a single stable endpoint.

POST/v2/llm/chat-completionsCreate a chat completion

It is built for voice workflows: an optional transcript_id grounds the completion in one of your finished transcripts, so drafting a follow-up email from a call or answering questions about a meeting takes a single request.

Request shape

FieldTypeRequiredDescription
messagesarrayYes1 to 32 message objects, oldest first. Each has a role ("system", "user", or "assistant") and a content string of 1 to 24,000 characters.
modelstringNoOptional model override. Omit it to use the default model.
transcript_idstringNoId of a completed transcript created through POST /v2/transcripts on the same account. Its text is injected as source context for the completion.
response_formatstringNo"text" (default) or "json". With "json", describe the object you want in a message and parse the returned content.

Message roles work the way you expect from chat APIs: system sets behavior and tone, user carries the request, and assistant carries prior model replies when you continue a conversation.

Quickstart

bash
curl -X POST https://api.realtimevoicekit.com/v2/llm/chat-completions \
  -H "Authorization: Bearer rtvk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      { "role": "system", "content": "You write release notes for a voice AI product." },
      { "role": "user", "content": "Draft one sentence announcing subtitle export in SRT and VTT." }
    ]
  }'

Response shape

Example response
{
  "id": "chat_7d41f0aa",
  "object": "chat.completion",
  "created_at": "2026-07-22T14:10:42Z",
  "model": "default",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "You can now export any transcript as ready-to-use SRT or VTT subtitles in one click."
      },
      "finish_reason": "stop"
    }
  ]
}
FieldTypeDescription
idstringId of this completion.
objectstringAlways "chat.completion".
created_atstringISO 8601 timestamp.
modelstringThe model that produced the completion.
choicesarrayCompletion choices. Each has an index, a message object with role and content, and a finish_reason ("stop").

Read the answer from choices[0].message.content.

Multi-turn conversations

The endpoint is stateless: each request carries the full conversation in messages. To continue a conversation, append the returned assistant message and the next user message, then send the array again. Keep the history within the limits of 32 messages and 24,000 characters per message.

Continuing a conversation
const API = "https://api.realtimevoicekit.com";
const headers = {
  Authorization: "Bearer rtvk_your_api_key",
  "Content-Type": "application/json",
};

const history = [
  { role: "system", content: "You are a concise assistant." },
  { role: "user", content: "Name three uses for meeting transcripts." },
];

let res = await fetch(API + "/v2/llm/chat-completions", {
  method: "POST",
  headers,
  body: JSON.stringify({ messages: history }),
});
let completion = await res.json();

// Append the assistant reply, then continue the conversation.
history.push(completion.choices[0].message);
history.push({ role: "user", content: "Expand on the second one." });

res = await fetch(API + "/v2/llm/chat-completions", {
  method: "POST",
  headers,
  body: JSON.stringify({ messages: history }),
});
completion = await res.json();
console.log(completion.choices[0].message.content);

Ground completions in a transcript

There are two ways to bring audio content into a completion. The simplest is transcript_id: pass the id of a completed transcript and the gateway injects its text as source context, so your messages can refer to this call or this meeting directly. Alternatively, paste transcript text into a user message yourself when you only need an excerpt or want full control over the context.

bash
curl -X POST https://api.realtimevoicekit.com/v2/llm/chat-completions \
  -H "Authorization: Bearer rtvk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "transcript_id": "tr_abc123",
    "messages": [
      { "role": "user", "content": "Draft a follow-up email to the customer based on this call. Keep it under 120 words." }
    ]
  }'

If the transcript is still processing, the request returns 409 with code not_ready; an unknown id or one from another account returns 404. For single-question workflows over a transcript, the dedicated Speech Understanding endpoint offers the same grounding with a simpler prompt-in, answer-out shape.

JSON output

Set response_format to "json" when your pipeline needs structured data. Name every key, type, and allowed value in a message; the assistant content then comes back as a JSON string for you to parse.

Structured output
curl -X POST https://api.realtimevoicekit.com/v2/llm/chat-completions \
  -H "Authorization: Bearer rtvk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "response_format": "json",
    "messages": [
      { "role": "user", "content": "Return a JSON object with keys \"title\" (string) and \"tags\" (array of 3 short strings) for a blog post about voice dictation." }
    ]
  }'
4.2aus 21 Bewertungen