Transcription for apps and SaaS products
Use an asynchronous REST API to add voice notes, meeting transcripts, captions, or searchable audio to your product. Upload the file, start a job, handle the webhook, and save the segments.
The production flow
- Your backend calls
POST /uploadfor the user's file and either returns the signed form to the client or uploads the file directly (up to 100 MiB). - Start the job by passing the returned
fileUrlasaudio_urlalong with yourwebhook_url. - Verify the webhook signature, deduplicate using
X-KolWrite-Delivery-Id, and callGET /transcribe/{jobId}ifresult_omittedis true. - Save the
segments(text, timestamps, and speakers) to display in your app, and exportsrtortxtwhen needed.
Job request:
{
"audio_url": "<fileUrl from POST /upload>",
"model": "oracle",
"language": "auto",
"include_diarization": true,
"output_format": "json",
"webhook_url": "https://api.example.com/hooks/kolwrite",
"webhook_secret": "<random secret>"
}
Verify webhooks
import crypto from "node:crypto";
// Express-style handler; rawBody is the exact request body as received.
export function verifyKolWrite(req, rawBody, secret) {
const timestamp = req.headers["x-kolwrite-timestamp"];
const expected = "sha256=" + crypto.createHmac("sha256", secret)
.update(timestamp + "." + rawBody).digest("hex");
const given = req.headers["x-kolwrite-signature"] || "";
return given.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected));
}
Webhooks are delivered at least once and retried if they fail. Treat GET /transcribe/{jobId} as your source of truth.
Pick the model per job
| Product need | Setting | Why |
|---|---|---|
| Low-cost, clean audio at volume | model: "base" | 0.40 credits (US$0.48) per hour |
| Default for user uploads | model: "oracle" | Production quality, with translation available |
| Transcript in another language | Oracle model + translate_to | Translated text in a single job |
| Who said what | include_diarization: true | +0.10 credits (US$0.12) per hour |
| Captions | output_format: "srt" | Works directly in video players |
Limits to plan for
- Inline Base64 uploads cap out at 4 MiB of decoded media. Signed uploads go up to 100 MiB.
- A signed upload form expires after 60 minutes, and the read URL expires after 24 hours.
- Jobs run asynchronously, so use the
PENDINGandIN_PROGRESSstates to show progress. - You cannot use
channel_speaker_separationtogether with diarization.
Questions and answers
Is there an SDK?
The API uses standard HTTPS and JSON, so any HTTP client will work. You can also feed our OpenAPI 3.1 spec at /openapi.json into a code generator.
How do I avoid double-processing webhooks?
Use X-KolWrite-Delivery-Id to deduplicate requests, since retries send the same value.
How is usage billed?
You pay per second of audio at the model's credit rate, with no minimum. 1 credit costs US$1.20.