# Getting started

The Livepush API is a REST API over HTTPS. Requests and responses are JSON, and every
endpoint is authenticated with a bearer token.

## Base URLs

Livepush splits its API across three hosts. Each endpoint page in this reference states
which host it belongs to, so you rarely need to think about this — but it matters when
you configure a client.

| Base URL | Covers |
| --- | --- |
| `https://octopus.livepush.io` | Streams, destinations, videos, recordings, zones, scheduler |
| `https://squid.livepush.io` | Account details and subscriptions |
| `https://vod-web-import-api.livepush.io` | Importing videos from a direct URL |

Because the hosts differ, a single "base URL" setting in a generated client will not work
for the whole API. Configure the host per resource group, or use the `servers` entry that
each path declares in the [OpenAPI specification](/openapi.yaml).

## Your first request

Fetch the authenticated account. This is the cheapest way to confirm a token works.

```bash
curl -X GET 'https://squid.livepush.io/account/this' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

A `200` response returns your profile, preferences and basic billing metadata. A `401`
means the token is missing, malformed, or expired — see [Authentication](/guides/authentication/).

## Create a stream

Streams are the central object in the API. Everything else — destinations, recordings,
scheduled events — hangs off a stream.

```bash
curl -X POST 'https://octopus.livepush.io/streams' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "category": "simulcast",
    "name": "Sunday service"
  }'
```

The `category` decides what the stream is for:

- `simulcast` — you push RTMP into Livepush and it fans the feed out to social platforms.
- `schedule` — Livepush plays a playlist of uploaded videos on a schedule, no live encoder needed.

A new stream is assigned to a default processing zone. Use
[List available rtmp ingestion zones](/stream-zones/list-available-rtmp-ingestion-zones/)
to see the regions available to your account.

## Where to go next

- [Authentication](/guides/authentication/) — how tokens work and how requests fail without them.
- [Multistreaming walkthrough](/guides/multistreaming/) — attach YouTube, Facebook and custom RTMP outputs.
- [Pre-recorded streams](/guides/pre-recorded-streams/) — schedule and loop uploaded videos.
- [Errors](/guides/errors/) — the status codes you should handle.
