Get an API Key

Creating a Spitch API key

Creating a Spitch API key

Screenshot of API key created

API key has been created

Create your API key at Spitch Studio. This will be used to securely access the API.

Install your library

Our official Python and Node SDKs allow you easily use the API. You can also install dotenv so that your API keys are set properly.
Install the official Spitch Python SDK
pip install spitch
pip install python-dotenv
More info on installation can be found on Installation

Set environment variable

Set your environment variable depending on your OS
MacOS/Linux
export SPITCH_API_KEY="your_api_key_here"
Alternatively, you can set it in your .env file
SPITCH_API_KEY=<your_api_key>

Write your script

app.py
from spitch import Spitch
client = Spitch()

response = client.speech.transcribe(
    content=open("file.wav", "rb"),
    language="en",
    model="mansa_v1"
)

print(response.text)

Run the code

python app.py
You should see the text displayed on console.