Create Transcription

Create a new transcription

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
infoobjectRequired
Transcription parameters
audio_urlstringOptional

URL to a downloadable audio file. Must be a direct link to the file (not a streaming or preview link). If the URL is not directly downloadable, consider using our Link API to extract a downloadable link from supported sites. Either audio_url or audio_file must be provided, but not both.

audio_filestringOptional

Base64 encoded audio file content. Either audio_url or audio_file must be provided, but not both.

Base64 Encoding Example

Python:

1import base64
2from soferai import SoferAI
3
4# Initialize client
5client = SoferAI(api_key="your_api_key_here")
6
7# Read and encode audio file
8with open("audio.mp3", "rb") as f:
9 base64_audio = base64.b64encode(f.read()).decode('utf-8')
10
11# Create transcription request
12response = client.transcribe.create_transcription(
13 audio_file=base64_audio,
14 info={
15 "model": "v1",
16 "primary_language": "en",
17 "hebrew_word_format": ["he"],
18 "title": "My Shiur Transcription"
19 }
20)
21
22print(f"Transcription ID: {response}")

Response

The unique identifier for the newly created transcription. Use this ID to check the status of the transcription or to retrieve the transcription result.

Errors

401
Authentication Error
429
Rate Limit Error