# Environments

> Base URLs, where tokens come from, and what to check before going live.

| | |
|---|---|
| API base URL | `https://api-vod-express.syncwords.com/v1` |
| Token URL | `https://api-vod-express.syncwords.com/v1/token/create` |
| Token lifetime | `expires_in` in the token answer says; absent when a token does not expire by age |
| Processing builds | `GET /build-versions` lists them; your default is in `GET /whoami` |

## Keep the URL in one place

Tokens come from the API itself (`POST /token/create`), so the base URL is the only one a client
needs. Every example on this site reads it from an environment variable and falls back to the one
above, so a change of URL is configuration and not code:

```bash
export SW_VOD_API=https://api-vod-express.syncwords.com/v1
```

```bash cURL
API=${SW_VOD_API:-https://api-vod-express.syncwords.com/v1}
```

```python Python
import os

API = os.environ.get("SW_VOD_API", "https://api-vod-express.syncwords.com/v1")
```

```javascript Node.js
const API = process.env.SW_VOD_API ?? 'https://api-vod-express.syncwords.com/v1';
```

A token from the Live API's `POST /v2/token/create` works here too, so a client that already has
one need not create another.

In the [API reference](/vod-express/api-reference/introduction), the playground's server list names the
environment each request goes to.

## Before going live

- **Do not depend on a token lifetime.** Create a new token whenever a call answers `401`, as the
  [automation example](/vod-express/examples/automation) does; it works whatever the lifetime is.
- **Pin a build.** A project keeps its `buildVersion`, but a new project gets the default build of
  the day. Name the build you tested on in `POST /projects` if it must not change.
- **Browser uploads need your origin allowed.** See
  [From a browser](/vod-express/uploads/api-uploads#from-a-browser).
- **Give players and partners the project's feed URL.** An
  [output feed](/vod-express/concepts/inputs#the-output-feed) is published under the API base URL and
  is public, so it needs no token.
