Last Updated: March 26, 2025 For summarizing, you have two options. You can either use the summarize input parameter, or you can use the custom_prompt input parameter. The summarize input parameter is a simple way to summarize the entire transcription in a given number of words. The custom_prompt input parameter allows you to provide a custom prompt to the LLM to generate a more advanced summary of the transcription with custom requirements or formatting.

Custom input parameters

summarize

In this example, we’ll use a Python script to transcribe an audio file and tell it to use the summarize input parameter set to 100 words. We’ll use the following input parameters:
payload = {"input": {
        "summarize": 100,
        "url": audio_file_url,
        "diarization": True,
        "language_code": "en",
        "return_as_file": False
    }}

custom_prompt

In this example, we’ll use a Python script to transcribe an audio file and tell it to use the custom_prompt input parameter to generate the summarization. We’ll use the following input parameters:
payload = {"input": {
        "custom_prompt": "The following is a virtual meeting/phone call transcription. Summarize the call and list the important items discussed. Format it in a markdown compatible list to make it easy to read.",
        "url": audio_file_url,
        "diarization": True,
        "language_code": "en",
        "return_as_file": False
    }}

Python script

We’re going to create a file and name it summarize.py. We’re then going to use the above parameters in the following Python script:

summarize

import requests
import time

audio_file_url = "url/to/audio/file.mp3" # replace with your audio file URL

salad_api_key = "YOUR_SALAD_API_KEY" # replace with your Salad API key
organization_name = "YOUR_ORGANIZATION_NAME" # replace with your organization name

payload = {"input": {
        "summarize": 100,
        "url": audio_file_url,
        "diarization": True,
        "language_code": "en",
        "return_as_file": False
    }}
headers = {
    "Salad-Api-Key": salad_api_key,
    "Content-Type": "application/json"
}


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

response = requests.post(url, json=payload, headers=headers)

response = response.json()
job_id=response["id"]
print (f'Job ID: {job_id}')

while True:
  time.sleep(5)
  try:
      result = requests.get(f"{url}/{job_id}", headers=headers)
      result = result.json()
      if result["status"] == "created" or result["status"] == "pending" or result["status"] == "started" or result["status"] == "running":
          print(f'Current job status is {result["status"]}')
      elif result["status"] == "failed":
          print(f'Job failed')
          break
      elif result["output"]:
          print(result["output"]["summary"])
          break
      else:
          print(f'Current job status is {result["status"]}')
  except Exception as e:
        print(f'Error retrieving transcription result: {e}')
        break
  • Make sure to replace url/to/audio/file.mp3 with the URL of your audio file.
  • Replace YOUR_SALAD_API_KEY with your Salad API key.
  • Replace YOUR_ORGANIZATION_NAME with your organization name.
  • Run the script using with python action-items.py.
In this script, we’re using the summarize input parameter to summarize the meeting to 100 words. We capture the output using the summary field. We’re then printing the result of this field to the console. You’ll also see the status of the transcription job as it progresses.

custom_prompt

import requests
import time

audio_file_url = "url/to/audio/file.mp3" # replace with your audio file URL

salad_api_key = "YOUR_SALAD_API_KEY" # replace with your Salad API key
organization_name = "YOUR_ORGANIZATION_NAME" # replace with your organization name

payload = {"input": {
        "custom_prompt": "The following is a virtual meeting/phone call transcription. Summarize the call and list the important items discussed. Format it in a markdown compatible list to make it easy to read.",
        "url": audio_file_url,
        "diarization": True,
        "language_code": "en",
        "return_as_file": False
    }}
headers = {
    "Salad-Api-Key": salad_api_key,
    "Content-Type": "application/json"
}


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

response = requests.post(url, json=payload, headers=headers)

response = response.json()
job_id=response["id"]
print (f'Job ID: {job_id}')

while True:
  time.sleep(5)
  try:
      result = requests.get(f"{url}/{job_id}", headers=headers)
      result = result.json()
      if result["status"] == "created" or result["status"] == "pending" or result["status"] == "started" or result["status"] == "running":
          print(f'Current job status is {result["status"]}')
      elif result["status"] == "failed":
          print(f'Job failed')
          break
      elif result["output"]:
          print(result["output"]["llm_result"])
          break
      else:
          print(f'Current job status is {result["status"]}')
  except Exception as e:
        print(f'Error retrieving transcription result: {e}')
        break
  • Make sure to replace url/to/audio/file.mp3 with the URL of your audio file.
  • Replace YOUR_SALAD_API_KEY with your Salad API key.
  • Replace YOUR_ORGANIZATION_NAME with your organization name.
  • Run the script using with python summarize.py.
In this script, we’re using the custom_prompt input parameter to tell the LLM to summarize the meeting and list the important items. We capture the output using the llm_result field. We’re then printing the result of this field to the console. You’ll also see the status of the transcription job as it progresses.

Output

Job ID: abcdef6c-1234-41e8-b81b-ecc1109033ed
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
The meeting discusses migrating to Salad Transcription API from our existing provider. It goes over the benefits of using Salad Transcription API, the cost savings, and the ease of use. The meeting also discusses the timeline for the migration and the steps involved. The meeting concludes with a decision to move forward with the migration.

* Migrating to Salad Transcription API
* Benefits of using Salad Transcription API
* Cost savings
* Ease of use
* Timeline for the migration
* Steps involved
* Decision to move forward with the migration