# Quickstart

Five minutes from key to first call.

## 1. Get a key

Sign in at [mivia.app](https://mivia.app) and open the keys page in
your dashboard. Create a key. You get one string that looks like
`mivia_a1b2c3d4e5f60718_<secret>`. Copy it now; the secret half is
shown once.

Every new account carries 1,000 free calls per month. No card needed.

## 2. First REST call

```bash
curl -X POST https://api.mivia.app/v1/models/mivia-small-json/extract \
  -H "Authorization: Bearer mivia_..." \
  -H "Content-Type: application/json" \
  -d '{"text": "ERROR [auth]: token expired"}'
```

The answer is a validated record:

```json
{
  "records": [
    {
      "result": {
        "type": "log_event",
        "level": "ERROR",
        "component": "auth",
        "message": "token expired"
      },
      "meta": {"routed_by": "model", "valid": true, "retries": 0}
    }
  ]
}
```

All five methods take the same shape: one POST, one JSON body, one
JSON answer. The [REST api](/docs/rest-api) page lists every method
with real request and response bodies.

## 3. First MCP call

Point your MCP client at the endpoint with the same key:

```json
{
  "mcpServers": {
    "mivia": {
      "url": "https://api.mivia.app/mcp",
      "headers": { "Authorization": "Bearer mivia_..." }
    }
  }
}
```

Smoke test from a shell:

```bash
curl -X POST https://api.mivia.app/mcp \
  -H 'Authorization: Bearer mivia_...' \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

The [MCP](/docs/mcp) page covers the tool list and call semantics.

## Next steps

- [Authentication](/docs/authentication) for key storage and rotation
- [Errors](/docs/errors) for the two kinds of 429
- [Pricing](/docs/pricing) for rates and the free tier
