Getting started
Quickstart
Create an API key, send your first file and download the transcript in a few minutes.
1. Get an API key
Open Settings › API in your ScribeFiles account (Unlimited plan), name a key and click Create key. Copy it straight away: for your security it's only shown once.
Keep the key out of your code by putting it in an environment variable:
export SCRIBEFILES_API_KEY="sf_live_your_key"
2. Send a file
Upload an audio or video file. Turn on speaker_labels to find out who said what.
curl https://scribefiles.com/v1/transcripts \
-H "Authorization: Bearer $SCRIBEFILES_API_KEY" \
-F file=@meeting.mp3 \
-F speaker_labels=true
import os
import requests
API = "https://scribefiles.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['SCRIBEFILES_API_KEY']}"}
with open("meeting.mp3", "rb") as f:
res = requests.post(f"{API}/transcripts", headers=HEADERS,
files={"file": f}, data={"speaker_labels": "true"})
res.raise_for_status()
transcript = res.json()
print(transcript["id"], transcript["status"]) # e.g. 9f2c… queued
import { readFile } from "node:fs/promises";
const API = "https://scribefiles.com/v1";
const headers = { Authorization: `Bearer ${process.env.SCRIBEFILES_API_KEY}` };
const form = new FormData();
form.append("file", new Blob([await readFile("meeting.mp3")]), "meeting.mp3");
form.append("speaker_labels", "true");
const res = await fetch(`${API}/transcripts`, { method: "POST", headers, body: form });
const transcript = await res.json();
console.log(transcript.id, transcript.status); // e.g. 9f2c… queued
The response is a transcript object with status queued. Keep its id.
3. Wait until it's done
Most files take a few minutes. Check the status every few seconds until it's completed or failed. In production, a webhook saves you the polling.
curl https://scribefiles.com/v1/transcripts/TRANSCRIPT_ID \
-H "Authorization: Bearer $SCRIBEFILES_API_KEY"
import time
while transcript["status"] in ("queued", "processing"):
time.sleep(5)
transcript = requests.get(f"{API}/transcripts/{transcript['id']}", headers=HEADERS).json()
if transcript["status"] == "failed":
raise RuntimeError(transcript["error"])
print(transcript["text"])
let result = transcript;
while (result.status === "queued" || result.status === "processing") {
await new Promise((r) => setTimeout(r, 5000));
result = await (await fetch(`${API}/transcripts/${transcript.id}`, { headers })).json();
}
if (result.status === "failed") throw new Error(result.error);
console.log(result.text);
4. Use the transcript
A completed transcript includes the full text, timestamped segments with speakers, and a url to open it in the ScribeFiles editor. To get a file instead, export it:
curl "https://scribefiles.com/v1/transcripts/TRANSCRIPT_ID/export?format=docx" \
-H "Authorization: Bearer $SCRIBEFILES_API_KEY" \
-o meeting.docx
res = requests.get(f"{API}/transcripts/{transcript['id']}/export",
headers=HEADERS, params={"format": "docx"})
with open("meeting.docx", "wb") as f:
f.write(res.content)
import { writeFile } from "node:fs/promises";
const file = await fetch(`${API}/transcripts/${transcript.id}/export?format=docx`, { headers });
await writeFile("meeting.docx", Buffer.from(await file.arrayBuffer()));
Next steps
- Transcribe from a URL instead of uploading.
- Set up webhooks so you don't have to poll.
- Browse the API reference for every option.
Questions about the API? Contact us.