Quickstart
Create a key, send a recording, read the transcript.
1. Get a key
Sign in to the console, open your project and choose API keys → Create key. The secret is shown once; keep it in an environment variable. The same page shows your project's API address — every request goes there.
Shell
export TWENTYSIX_API_KEY="sk_…"
export TWENTYSIX_BASE_URL="https://…" # your project's API address2. Transcribe a short clip
Audio up to a few minutes can be sent in one request and the transcript comes back in the response.
curl "$TWENTYSIX_BASE_URL/v1/audio/transcriptions" \
-H "Authorization: Bearer $TWENTYSIX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-F file=@clip.wav \
-F language=hi-IN \
-F mode=codemixfrom twentysix import Client
client = Client() # reads TWENTYSIX_API_KEY and TWENTYSIX_BASE_URL
result = client.transcribe("clip.wav", "hi-IN", mode="codemix")
print(result["text"])import { readFile } from "node:fs/promises";
import { Client } from "@26ai/sdk";
const client = new Client(); // reads TWENTYSIX_API_KEY and TWENTYSIX_BASE_URL
const result = await client.transcribe(new Blob([await readFile("clip.wav")]), "hi-IN", { mode: "codemix" });
console.log(result.text);3. Transcribe a long recording
For anything longer — up to two hours — upload the file, start a transcription and wait for it. The SDKs do all of it in one call.
result = client.transcribe_file("meeting.m4a", "ta-IN", diarization=True)
for s in result["segments"]:
print(f'{s["start"]:7.1f} {s.get("speaker", "")} {s["text"]}')const result = await client.transcribeFile(await readFile("meeting.m4a"), "ta-IN", { diarization: true });
for (const s of result.segments) console.log(s.start.toFixed(1), s.speaker ?? "", s.text);The step-by-step version, with plain HTTP, is in Long recordings.
What you get back
JSON
{
"id": "tr_…",
"object": "transcription.result",
"status": "completed",
"mode": "codemix",
"duration_seconds": 41.6,
"channels": 1,
"languages": ["hi-IN"],
"text": "कल की meeting का time बदलकर 4 बजे कर दीजिए…",
"segments": [
{ "id": 0, "start": 0.0, "end": 6.2, "text": "कल की meeting का time बदलकर 4 बजे कर दीजिए…" }
],
"warnings": []
}Every field is described in Results and timestamps.
Next
- Choose the right output mode for your users.
- Get a webhook instead of polling.
- Read Errors and retries before going to production.