Transcription
POST /v1/audio/transcriptions turns speech into text: meetings, calls, voice notes, podcasts. Send an audio file or a URL and get back the transcript with word-level timings. The current model is grok-stt-1-0, billed per hour of audio.
Upload a file
curl https://api.cloakray.com/v1/audio/transcriptions \
-H "Authorization: Bearer $CLOAKRAY_API_KEY" \
-F "model=grok-stt-1-0" \
-F "file=@meeting.wav"
import fs from "node:fs";
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.cloakray.com/v1", apiKey: process.env.CLOAKRAY_API_KEY });
const transcript = await client.audio.transcriptions.create({
model: "grok-stt-1-0",
file: fs.createReadStream("meeting.wav"),
});
console.log(transcript.text);
Common formats work: WAV, MP3, OGG, Opus, FLAC, AAC, MP4 and M4A. Request bodies are limited to 64 MiB; for longer recordings, pass a URL.
Pass a URL
curl https://api.cloakray.com/v1/audio/transcriptions \
-H "Authorization: Bearer $CLOAKRAY_API_KEY" \
-F "model=grok-stt-1-0" \
-F "url=https://example.com/podcast-episode.mp3"
Options
All fields are multipart form fields, so booleans are the strings true and false.
| Field | What it does |
|---|---|
model | Required. |
file or url | Required, one of the two. |
language | A language code such as en. Numbers and currencies are then written out properly. |
diarize | true to label each word with its speaker. |
filler_words | true to keep "uh" and "um". |
keyterm | A name or term to recognise reliably, such as a product name. Repeat the field for several. |
The response
{
"text": "The balance is $167,983.15.",
"language": "English",
"duration": 3.45,
"words": [
{ "text": "The", "start": 0.24, "end": 0.48 },
{ "text": "balance", "start": 0.48, "end": 0.96 }
]
}
start and end are seconds from the beginning. With diarize=true, each word also has a speaker.
The response is always this JSON. Plain text, SRT and VTT output via response_format are not offered; build subtitles from words if you need them.