Whisper Transcription
Audio transcription via OpenAI Whisper API.
Overview
Artemis proxies audio transcription requests to OpenAI's Whisper API, providing the same usage tracking and key management as LLM requests.
Endpoint: POST /v1/audio/transcriptions
Usage
Python
from openai import OpenAI
client = OpenAI(
api_key="your-artemis-key",
base_url="https://artemis.meetrhea.com/v1"
)
with open("audio.mp3", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file
)
print(transcript.text)
curl
curl https://artemis.meetrhea.com/v1/audio/transcriptions \
-H "Authorization: Bearer $ARTEMIS_KEY" \
-F file="@audio.mp3" \
-F model="whisper-1"
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file | Yes | Audio file to transcribe |
model | string | Yes | Model to use (whisper-1) |
language | string | No | ISO-639-1 language code |
prompt | string | No | Guide the model's style |
response_format | string | No | json, text, srt, vtt, verbose_json |
temperature | float | No | Sampling temperature (0-1) |
Supported Formats
Audio files must be in one of these formats:
- mp3
- mp4
- mpeg
- mpga
- m4a
- wav
- webm
Maximum file size: 25 MB
Response
JSON (default)
{
"text": "Hello, this is a transcription of the audio file."
}
Verbose JSON
{
"task": "transcribe",
"language": "english",
"duration": 5.5,
"text": "Hello, this is a transcription.",
"segments": [
{
"id": 0,
"start": 0.0,
"end": 2.5,
"text": "Hello, this is"
}
]
}
SRT/VTT
Subtitle formats for video use.
Usage Tracking
Whisper requests are logged with:
- Audio duration (seconds)
- Cost (based on duration pricing)
- Provider key used
Pricing
OpenAI Whisper pricing: $0.006 per minute of audio.
Provider Key
Whisper uses OpenAI provider keys. Ensure you have an OpenAI key configured in your group's provider settings.
Error Handling
{
"error": {
"message": "File too large. Maximum size is 25MB.",
"type": "invalid_request_error",
"code": "file_too_large"
}
}
Common Errors
| Error | Cause |
|---|---|
file_too_large | Audio file exceeds 25MB |
invalid_file_format | Unsupported audio format |
no_provider_key | No OpenAI key configured |
provider_error | OpenAI API error |
Integration with Speaches
For local Whisper transcription without OpenAI, use Speaches service instead.