API
Transcriptions
POST /audio/transcriptions: speech to text from an uploaded file, processed in memory only.
Request
`POST /audio/transcriptions` takes `multipart/form-data` with a `file` part (the audio, up to 25 MB), `model` (a transcription model id from `/models`) and optional `language`, `prompt` and `response_format` (`json`, the default; `text`; or `verbose_json`). The audio is read into memory, transcribed and dropped; the transcript is returned once and not kept.
Transcription models are priced `per_minute`. The upload's size sets the reservation (at least one minute); the charge is the audio's actual length, by the started minute, as the provider reports it, in `allwit.wit_charged` and the `x-allwit-wit-charged` header. `verbose_json` carries the reported `duration`.
from openai import OpenAI
client = OpenAI(
base_url="https://www.allwit.ai/api/v1",
api_key="aw_live_…", # from /app/account/api-keys
)
with open("meeting.mp3", "rb") as audio:
transcript = client.audio.transcriptions.create(
model="<a transcription model id from GET /models>",
file=audio,
language="en",
)
print(transcript.text)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://www.allwit.ai/api/v1",
apiKey: process.env.ALLWIT_API_KEY, // aw_live_…
});
import fs from "node:fs";
const transcript = await client.audio.transcriptions.create({
model: "<a transcription model id from GET /models>",
file: fs.createReadStream("meeting.mp3"),
language: "en",
});
console.log(transcript.text);curl https://www.allwit.ai/api/v1/audio/transcriptions \
-H "Authorization: Bearer $ALLWIT_API_KEY" \
-F model="<transcription model id>" \
-F file=@meeting.mp3