> For the complete documentation index, see [llms.txt](https://docs.slingdata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.slingdata.io/connections/api-connections/assemblyai.md).

# AssemblyAI

Connect & Ingest data from AssemblyAI

AssemblyAI is an AI-powered speech-to-text platform that provides highly accurate transcription, speaker diarization, content moderation, and other speech understanding capabilities. The Sling AssemblyAI connector extracts transcript data, including full transcript details, sentences, and paragraphs.

{% hint style="success" %}
**CLI Pro Required**: APIs require a [CLI Pro token](/sling-cli/cli-pro.md) or [Platform Plan](/sling-platform/platform.md).
{% endhint %}

## Setup

The following credentials and inputs are accepted:

**Secrets:**

* `api_key` **(required)** -> Your AssemblyAI API key

### Getting Your API Key

1. Go to the [AssemblyAI Dashboard](https://www.assemblyai.com/dashboard/signup)
2. Sign up for a free account (no credit card required, includes free transcription hours)
3. Once logged in, your API key is displayed on the dashboard home page
4. Copy the API key and use it in the `api_key` secret

### Using `sling conns`

{% code overflow="wrap" %}

```bash
sling conns set ASSEMBLYAI type=api spec=assemblyai secrets='{ api_key: "${ASSEMBLYAI_API_KEY}" }'
```

{% endcode %}

### Environment Variable

See [here](https://docs.slingdata.io/connections/api-connections/pages/eAdVs2BHCgdr6RS8GoJC#dot-env-file-.env.sling) to learn more about the `.env.sling` file.

{% code overflow="wrap" %}

```bash
export ASSEMBLYAI='{ type: api, spec: assemblyai, secrets: { api_key: "${ASSEMBLYAI_API_KEY}" } }'
```

{% endcode %}

### Sling Env File YAML

See [here](https://docs.slingdata.io/connections/api-connections/pages/eAdVs2BHCgdr6RS8GoJC#sling-env-file-env.yaml) to learn more about the sling `env.yaml` file.

```yaml
connections:
  ASSEMBLYAI:
    type: api
    spec: assemblyai
    secrets:
      api_key: ${ASSEMBLYAI_API_KEY}
```

## Replication

Here's an example replication configuration to sync AssemblyAI data to a PostgreSQL database:

```yaml
source: ASSEMBLYAI
target: MY_POSTGRES

defaults:
  mode: full-refresh
  object: public.{stream_name}

streams:
  # sync all endpoints
  '*':

  # exclude sentences if not needed
  transcript_sentences:
    disabled: true
```

This replication syncs all AssemblyAI endpoints to PostgreSQL using full-refresh mode, except for `transcript_sentences` which is disabled.

## Endpoints

| Endpoint                | Description                                                                                         | Incremental |
| ----------------------- | --------------------------------------------------------------------------------------------------- | ----------- |
| `transcripts`           | List of all transcripts with metadata (ID, status, audio URL, timestamps)                           | No          |
| `transcript_details`    | Full transcript details including text, entities, content safety labels, and analysis results       | No          |
| `transcript_sentences`  | Individual sentences from each transcript with timestamps, confidence scores, and word-level detail | No          |
| `transcript_paragraphs` | Paragraphs from each transcript with timestamps, confidence scores, and word-level detail           | No          |

{% hint style="info" %}
The `transcript_details`, `transcript_sentences`, and `transcript_paragraphs` endpoints iterate over transcript IDs from the `transcripts` endpoint. The `transcripts` endpoint must run first.
{% endhint %}

## Notes

* The free tier includes a generous amount of transcription hours. See [AssemblyAI pricing](https://www.assemblyai.com/pricing) for details.
* The `transcript_details` endpoint returns detected entities, content safety labels, IAB categories, auto-highlights, and more. The fields depend on the features that were on when the transcript was created.

If you are facing issues connecting, please reach out to us at <support@slingdata.io>, on [discord](https://discord.gg/q5xtaSNDvp) or open a Github Issue [here](https://github.com/slingdata-io/sling-cli/issues).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.slingdata.io/connections/api-connections/assemblyai.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
