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.
info
Transcription parameters
audio_url
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_file
Base64 encoded audio file content. Either audio_url or audio_file must be provided, but not both.
## Base64 Encoding Example
**Python:**
```python
import base64
from soferai import SoferAI
# Initialize client
client = SoferAI(api_key="your_api_key_here")
# Read and encode audio file
with open("audio.mp3", "rb") as f:
base64_audio = base64.b64encode(f.read()).decode('utf-8')
# Create transcription request
response = client.transcribe.create_transcription(
audio_file=base64_audio,
info={
"model": "v1",
"primary_language": "en",
"hebrew_word_format": ["he"],
"title": "My Shiur Transcription"
}
)
print(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.
