Skip to content

Commit

Permalink
docs assembly ai eu endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Feb 7, 2025
1 parent ab761b9 commit 229f270
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/my-website/docs/pass_through/assembly_ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ litellm
Let's call the Assembly AI `/v2/transcripts` endpoint

```python
import assemblyai as aai

LITELLM_VIRTUAL_KEY = "sk-1234" # <your-virtual-key>
LITELLM_PROXY_BASE_URL = "http://0.0.0.0:4000/assemblyai" # <your-proxy-base-url>/assemblyai

Expand All @@ -53,3 +55,28 @@ print(transcript)
print(transcript.id)
```

## Calling Assembly AI EU endpoints

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`


```python
import assemblyai as aai

LITELLM_VIRTUAL_KEY = "sk-1234" # <your-virtual-key>
LITELLM_PROXY_BASE_URL = "http://0.0.0.0:4000/eu.assemblyai" # <your-proxy-base-url>/eu.assemblyai

aai.settings.api_key = f"Bearer {LITELLM_VIRTUAL_KEY}"
aai.settings.base_url = LITELLM_PROXY_BASE_URL

# URL of the file to transcribe
FILE_URL = "https://assembly.ai/wildfires.mp3"

# You can also transcribe a local file by passing in a file path
# FILE_URL = './path/to/file.mp3'

transcriber = aai.Transcriber()
transcript = transcriber.transcribe(FILE_URL)
print(transcript)
print(transcript.id)
```

0 comments on commit 229f270

Please sign in to comment.