Last Updated: February 18, 2025 Migrating from Assembly Transcription to Salad Transcription API will require you to replace your Assembly Python functions with Salad compatible ones. Whilst we do not offer an SDK, we do have example Python functions that you can use in replacement.
FeaturesSaladCloud TranscriptionAssembly Transcription
Translation
Audio Transcription
Video Transcription
Multilingual Transcription
SummarizationRequires Additional API
Speaker Identification
SRT Output
Transcribe Multiple Files
Max Length2.5 Hours10 Hours
Text Sentiment AnalysisRequires Additional API
Text ClassificationRequires Additional API
Custom LLM PromptRequires Additional API
Custom VocabularyRequires Additional API

1. Get your Salad API Key.

  • Open up https://portal.salad.com and sign up/log into your account.
  • Navigate to your profile at the top right, and select API Access. Here you can find your API Key.

2. Updating job creation API calls.

The Salad Transcription API uses a Job Queue system for processing transcription requests, rather than a Python function that returns the data like Assembly. With Salad Transcription API, you’ll use two steps. Submit the job, and then request the results.

Assembly Transcription

Your existing Python code for Assembly Transcription should look something like this:
import assemblyai as aai

aai.settings.api_key = "<YOUR_API_KEY>"

# You can use a local filepath:
# audio_file = "./example.mp3"

# Or use a publicly-accessible URL:
audio_file = (
    "https://assembly.ai/wildfires.mp3"
)

transcriber = aai.Transcriber()

transcript = transcriber.transcribe(audio_file)

if transcript.status == aai.TranscriptStatus.error:
    print(f"Transcription failed: {transcript.error}")
    exit(1)

print(transcript.text)

Salad Transcription API Equivalent

When using Salad Transcription API, you’ll update that job creation function to instead look like this:
import requests

def salad_transcribe(file, Salad-Api-Key):

    url = "https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs"

    payload = {
        "input": {
       	    "url": file,
       	    "language_code": "en",
       	    "return_as_file": true,
       	    "word_level_timestamps": true
        }
    }
    headers = {
        "Salad-Api-Key": Salad-Api-Key,
        "Content-Type": "application/json"
    }

    response = requests.request("POST", url, json=payload, headers=headers)
    return response

Salad-Api-Key = "{Salad-Api-Key}"

file = "https://example.com/path/to/file.mp3"

job = salad_transcribe(file)
print(job.text)
  • For this code snippet, you’ll need to insert your Salad Organization name into the API url field.
  • You will also need to insert your Salad API Key we obtained earlier lower down in the code snippet.
  • Put the URL to the file to be transcribed into the file string. Please note that Salad Transcription API can only process files up to 2.5 hours. Make sure the URL provided is to a direct download of the file. Header based security is not compatible with Salad Transcription API, so you’ll need to use a signed URL like that offered by Salad Simple Storage Service.
The response will look like this:
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "inference_endpoint_name": "transcribe",
  "input": {
    "property1": "value1",
    "property2": "value2"
  },
  "metadata": null,
  "organization_name": "example-corp",
  "status": "pending",
  "events": [],
  "create_time": "2025-01-016T19:00:00Z",
  "update_time": "2025-01-016T19:00:00Z"
}

3. More advanced jobs

If you are utilizing additional features offered by Assembly to apply LLMs, or summarize intent, you can integrate these features into the same API call with Salad Transcription API.

Using an LLM:

Salad Transcription API offers direct a integration to use LLMs to answer questions about your audio, or any other custom prompts. To use it, just add custom_prompt as an input option.
curl -X POST https://api.salad.com/api/public/organizations/{my-organization}/inference-endpoints/transcribe/jobs \
   -H "Salad-Api-Key: {your-api-key}" \
   -H "Content-Type: application/json" \
   -d '{
  	"input": {
     	"url": "https://example.com/path/to/file.mp3",
  	    "custom_prompt": "List all action items discussed in the meeting."
     	"language_code": "en",
     	"return_as_file": true,
     	"word_level_timestamps": true
  	},
  	}
When you obtain the job results in the next step, an additional field will be included in the JSON response, and it’ll look like this:
"llm_result": "- Prepare the project proposal by Friday.\n- Schedule a follow-up meeting next Monday.\n- Allocate resources for the development team."

Intent/summarization:

If you’re also using Assembly services to obtain the intent or summarization of transcribed text, you can also integrate this easily with Salad Transcription API with the same API call. For this, you’ll add the summarize input parameter, with the word limit for the summarization.
curl -X POST https://api.salad.com/api/public/organizations/{my-organization}/inference-endpoints/transcribe/jobs \
   -H "Salad-Api-Key: {your-api-key}" \
   -H "Content-Type: application/json" \
   -d '{
  	"input": {
     	"url": "https://example.com/path/to/file.mp3",
  	"llm_translation": "italian, french",
	"summarize: 50,
     	"language_code": "en",
     	"return_as_file": true,
     	"word_level_timestamps": true
  	},
  	}

4. Obtaining job results

In the response from submitting your job with the above step, you’ll receive the Job ID which is required to obtain the results of your transcription. The Job status and transcription results are combined into a single API call. With this Python function, you’ll check the status, and once the job is completed it will also retrieve the transcription results.
def get_result(job_id, Salad-Api-Key):
    url = "https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs/" + job_id

    headers = {"Salad-Api-Key": Salad-Api-Key}

    response = requests.request("GET", url, headers=headers)

    return response

job_id = "{JOB_ID FROM BEFORE}"

Salad-Api-Key = "{Salad-Api-Key}"

result = get_result(job_id, Salad-Api-Key)
print(result.text)
  • Make sure to again update the organization name above to your organization name.
  • You will need to insert the Job ID that you obtained from the previous step as well.
  • And again make sure to include your Salad API Key.
Once the status of your job has reached succeeded, the output object will include the URL to the completed transcription via a directly downloadable URL.
{
  "id": "7c425fc0-dd3d-4c6c-8b6a-a010187492dd",
  "input": {
    "url": "https://example.com/path/to/file.mp3",
    "language_code": "en",
    "return_as_file": true,
    "word_level_timestamps": true
  },
  "inference_endpoint_name": "transcribe",
  "status": "succeeded",
  "events": [
    {
      "action": "created",
      "time": "2025-01-22T15:57:26.0815348+00:00"
    },
    {
      "action": "started",
      "time": "2025-01-22T15:57:26.2061428+00:00"
    },
    {
      "action": "succeeded",
      "time": "2025-01-22T15:58:13.9323189+00:00"
    }
  ],
  "organization_name": "salad",
  "output": {
    "url": "https://storage-api.salad.com/organizations/salad/files/transcription/73b2ee75-664e-4332-a853-9210dde5c5fd?token=ac34664a-088d-4c72-b53c-c99cfbf538",
    "duration_in_seconds": 320.4135,
    "duration": 0.09,
    "processing_time": 46.076966285705566
  },
  "create_time": "2025-01-22T15:57:26.0815348+00:00",
  "update_time": "2025-01-22T15:58:13.9323189+00:00"
}