Endpoint
Parameters
Code Examples
Subtitle Generation (SRT)
Supported Languages
Whisper supports 99 languages including English, Spanish, French, German, Japanese, Chinese, Arabic, Hindi, Portuguese, and more.Pricing
whisper-1: **0.006)Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Transcribe audio files to text using Whisper and other transcription models.
POST https://api.samuraiapi.in/v1/audio/transcriptions
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file | ✅ | Audio file (mp3, mp4, wav, m4a, webm, ogg) |
model | string | ✅ | whisper-1 |
language | string | — | ISO-639-1 language code (e.g. "en", "ja") |
prompt | string | — | Context hint to improve accuracy |
response_format | string | — | json (default), text, srt, vtt |
temperature | number | — | Sampling temperature 0–1 |
from openai import OpenAI
client = OpenAI(
api_key="sk-samurai-YOUR_KEY",
base_url="https://api.samuraiapi.in/v1"
)
with open("audio.mp3", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file,
language="en",
response_format="text"
)
print(transcript)
import fs from 'fs';
const transcript = await client.audio.transcriptions.create({
model: 'whisper-1',
file: fs.createReadStream('audio.mp3'),
language: 'en',
response_format: 'text'
});
console.log(transcript);
curl https://api.samuraiapi.in/v1/audio/transcriptions \
-H "Authorization: Bearer sk-samurai-YOUR_KEY" \
-F model="whisper-1" \
-F file="@audio.mp3" \
-F language="en"
with open("video_audio.mp3", "rb") as f:
srt = client.audio.transcriptions.create(
model="whisper-1",
file=f,
response_format="srt"
)
with open("subtitles.srt", "w") as f:
f.write(srt)
whisper-1: **0.003/minute∗∗(SamuraiAI500.006)