SaidwireDevelopers

Guide · LiteLLM

Saidwire speech-to-text with LiteLLM

LiteLLM routes calls to many providers through one OpenAI-style interface. Saidwire plugs in as an OpenAI-compatible transcription provider: the openai/ model prefix plus api_base. That works in the Python SDK and in the LiteLLM proxy (AI gateway).

you need
LiteLLMpip install litellm (SDK) or pip install 'litellm[proxy]' (proxy). Checked with 1.83.
Saidwire API keysk_live_... from saidwire.com/dev (120 free hours, no card)

Python SDK

# pip install litellm
import os
import litellm

with open("meeting.mp3", "rb") as f:
    r = litellm.transcription(
        model="openai/saidwire-en",                 # openai/ = OpenAI-compatible provider
        file=f,
        api_base="https://api.saidwire.com/v1",
        api_key=os.environ["SAIDWIRE_API_KEY"],
    )
print(r.text)

response_format, timestamp_granularities and language are passed through to Saidwire unchanged, for example response_format="verbose_json", timestamp_granularities=["word"].

Proxy: config.yaml

Add a model entry with mode: audio_transcription:

model_list:
  - model_name: saidwire-en
    litellm_params:
      model: openai/saidwire-en
      api_base: https://api.saidwire.com/v1
      api_key: os.environ/SAIDWIRE_API_KEY
    model_info:
      mode: audio_transcription

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY   # optional: keys for your own users
export SAIDWIRE_API_KEY=sk_live_xxxxxxxx.yyyyyyyyyyyyyyyy
export LITELLM_MASTER_KEY=sk-change-me
litellm --config config.yaml          # listens on http://0.0.0.0:4000

api_base must end in /v1. Without it, requests return 404 Not Found.

Call the proxy

curl -s http://localhost:4000/v1/audio/transcriptions \
  -H "Authorization: Bearer $LITELLM_MASTER_KEY" \
  -F model=saidwire-en \
  -F file=@meeting.mp3
from openai import OpenAI
client = OpenAI(base_url="http://localhost:4000/v1", api_key="sk-change-me")   # your LiteLLM key
with open("meeting.mp3", "rb") as f:
    print(client.audio.transcriptions.create(model="saidwire-en", file=f).text)

Clients send the LiteLLM key. Only the proxy holds the Saidwire key. LiteLLM's own budgets, rate limits and spend logs apply to these calls like any other model.

Response formats

Troubleshooting

you seefix
404 Not Foundapi_base must be https://api.saidwire.com/v1.
AuthenticationError ... Incorrect API key providedThe proxy's SAIDWIRE_API_KEY is wrong or unset. LiteLLM reports Saidwire's 401 as an OpenAIException, because the provider type is openai.
BadRequestError ... languageSaidwire transcribes English only. Send en or no language.
RateLimitErrorToo many files at once for your Saidwire key (trial keys allow 4), or your free hours are used up.
Model not found on the proxyThe client's model must match model_name in config.yaml (saidwire-en above).

Good to know

Stuck? Email support@saidwire.com with the x-request-id from the failed call.

OpenAI is a trademark of OpenAI. Open WebUI, n8n, LiteLLM, Dify, Flowise, Vercel and the AI SDK belong to their respective owners. Saidwire is not affiliated with OpenAI or with these projects.