Skip to content

Commit 229f270

Browse files
committed
docs assembly ai eu endpoints
1 parent ab761b9 commit 229f270

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Diff for: docs/my-website/docs/pass_through/assembly_ai.md

+27
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ litellm
3535
Let's call the Assembly AI `/v2/transcripts` endpoint
3636

3737
```python
38+
import assemblyai as aai
39+
3840
LITELLM_VIRTUAL_KEY = "sk-1234" # <your-virtual-key>
3941
LITELLM_PROXY_BASE_URL = "http://0.0.0.0:4000/assemblyai" # <your-proxy-base-url>/assemblyai
4042

@@ -53,3 +55,28 @@ print(transcript)
5355
print(transcript.id)
5456
```
5557

58+
## Calling Assembly AI EU endpoints
59+
60+
If you want to send your request to the Assembly AI EU endpoint, you can do so by setting the `LITELLM_PROXY_BASE_URL` to `<your-proxy-base-url>/eu.assemblyai`
61+
62+
63+
```python
64+
import assemblyai as aai
65+
66+
LITELLM_VIRTUAL_KEY = "sk-1234" # <your-virtual-key>
67+
LITELLM_PROXY_BASE_URL = "http://0.0.0.0:4000/eu.assemblyai" # <your-proxy-base-url>/eu.assemblyai
68+
69+
aai.settings.api_key = f"Bearer {LITELLM_VIRTUAL_KEY}"
70+
aai.settings.base_url = LITELLM_PROXY_BASE_URL
71+
72+
# URL of the file to transcribe
73+
FILE_URL = "https://assembly.ai/wildfires.mp3"
74+
75+
# You can also transcribe a local file by passing in a file path
76+
# FILE_URL = './path/to/file.mp3'
77+
78+
transcriber = aai.Transcriber()
79+
transcript = transcriber.transcribe(FILE_URL)
80+
print(transcript)
81+
print(transcript.id)
82+
```

0 commit comments

Comments
 (0)