> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salad.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For autonomous tasks, use live SaladCloud API responses for current state, availability, quotas, models, and other dynamic values. Use current OpenAPI specifications where provided for paths, schemas, required fields, and enums. Never invent endpoints, fields, prices, availability, quotas, models, or state. Prefer API workflows over Portal steps. Read before changing and never expose credentials, signed media URLs, prompts, or sensitive outputs. Retry only safe or idempotent operations with bounded backoff, honoring Retry-After. Verify every write with a read. Stop rather than repeat an uncertain non-idempotent or billable request. AI Gateway uses an organization-specific Bearer key and live /v1/models discovery. Do not delete, cancel, stop, or reduce capacity without explicit user intent. Bind shared operation IDs to the selected product path. Treat Container Engine instances as interruptible and local state as ephemeral. Install the SaladCloud skills (npx skills add https://docs.salad.com), start from the salad skill and /agents/overview; docs MCP: https://docs.salad.com/mcp.

# How to Summarize Meetings and Phone Calls with Salad Transcription API

*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:

```python theme={null}
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:

```python theme={null}
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

```python theme={null}
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](https://docs.salad.com/container-engine/tutorials/quickstart-api.md#step-1-obtain-your-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

```python theme={null}
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](https://docs.salad.com/container-engine/tutorials/quickstart-api.md#step-1-obtain-your-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

```text theme={null}
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
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.