> ## Documentation Index
> Fetch the complete documentation index at: https://docs.margovia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Local development

> Point the SDK at a local Margovia API while developing another app.

Run the Margovia API locally:

```bash theme={null}
pnpm dev:api
```

Then configure the app consuming the SDK:

```env theme={null}
MARGOVIA_API_KEY=mg_test_xxx
MARGOVIA_BASE_URL=http://localhost:4010
MARGOVIA_DEBUG=1
```

This is the recommended way to test the SDK from another local product, such as a demo SaaS app or internal AI feature.

## Production

For Margovia Cloud, remove `MARGOVIA_BASE_URL` in production and keep only your project API key:

```env theme={null}
MARGOVIA_API_KEY=mg_live_xxx
```

Set `MARGOVIA_BASE_URL` in production only if you self-host Margovia or run a compatible receiver.
