# Live API

> Create, run and manage live captioning, translation and dubbing services over HTTP.

The Live API is SyncWords Live without the dashboard. A **service** is a live pipeline: it takes
a stream in and gives captions, translations and dubbed audio out, on the destinations you
choose. The API creates services, starts and stops them, reads their status and usage, and
manages what sits behind them: dictionaries and glossaries, schedules, widget outputs, logos and
QR codes.

- **[API reference](/live/api-reference)**: The interactive reference of API v2, and where v1 stands.
- **[Authentication](/vod-express/authentication)**: Keys and tokens are shared with VOD Express; that page applies to both APIs.

> **Note:**
> Guides for the Live API are being written. The reference is complete today, and these pages
> will grow around it.

## Base URL

The base URL is `https://api-live2.syncwords.com/v2`; every path on these pages is
relative to it.

## Authenticate

Every request carries a bearer token. Exchange your organization's **public key** and **secret
key** for one:

```bash
curl -s https://api-live2.syncwords.com/v2/token/create \
  -H 'Content-Type: application/json' -H 'Accept: application/json' \
  -d '{"username": "YOUR_PUBLIC_KEY", "password": "YOUR_SECRET_KEY"}'
```

The answer's `access_token` goes into every request as `Authorization: Bearer <token>`.
`POST /token/refresh` renews a token and `POST /token/revoke` ends it.
[Authentication](/vod-express/authentication) has the same exchange in Python and Node.js, and
what a 401 or 403 means.

## What the API covers

| Area | Calls |
|---|---|
| Services | Create, read, update, delete and archive a service; start, stop and upgrade it; read its status and output status; mute an output; download and export its results |
| Schedules | Schedules and their occurrences, so a service runs when the event does |
| Enums | The values a service accepts: builds, stream types and destinations, transcription and translation languages, engines, voices, locales and time zones |
| Dictionaries | Dictionaries, postprocessing dictionaries and glossaries |
| Usage | Usage summaries and breakdowns, per service and per event |
| Outputs | Widget settings, QR codes and the service logo |

## First call

```bash
curl -s https://api-live2.syncwords.com/v2/services \
  -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json'
```

lists your services. The [API reference](/live/api-reference) has every call, with a playground
to send them from the browser.
