Environments
There are two places to run against: production, with live keys, and staging, with test keys. They are separate deployments with separate accounts, and a key only works on its own.
| Production | Staging | |
|---|---|---|
| Base URL | https://api.esfera.audio | https://staging-api.esfera.audio |
| Keys | esf_sk_live_… | esf_sk_test_… |
| Who it is for | Your pipeline, once the integration goes live | Design partners, while they build |
| Real conversions | Yes, metered against your plan | Yes, on the staging deployment |
A key presented to the other host is refused as invalid-api-key. That is deliberate: a misconfigured environment fails loudly instead of converting against the wrong account.
Staging
Staging is for integrations that need a place to develop before they touch production. It is available to design partners on request: ask when you get access. It serves the same API as production, but it is a separate deployment, so ids, keys, webhooks and conversions do not carry across.
There is no self-serve sandbox. Design partners start on staging; production access is switched on for an account when its integration is ready to go live. If you do not have staging access yet, write to us and ask for it.
Pointing the tools at an environment
The SDK defaults to production. Pass baseUrl for staging:
const esfera = new Esfera({
apiKey: process.env.ESFERA_API_KEY!,
baseUrl: "https://staging-api.esfera.audio",
});A pasted test key is stored against staging automatically; esfera login --key esf_sk_test_… needs nothing else. Browser sign-in (esfera login with no key) defaults to production, so to sign in to staging that way, set ESFERA_API_URL first:
export ESFERA_API_URL=https://staging-api.esfera.audio
export ESFERA_API_KEY=esf_sk_test_v1_…
esfera statusESFERA_API_URL overrides the host even when one was stored at login, so you can aim a single command at staging without signing in again. The CLI's banner names the environment it is talking to.
The OpenAPI document
Each environment serves its own copy at /v1/openapi.json. The document needs no key. This site's reference is generated from a snapshot of it.