# Plans, prices, features and server time

URL: https://neattrim.com/docs/api/get-config

GET /v1/config: Plans, prices, features and server time.

Endpoint: `GET /v1/config`

Who can call it: Anyone: no key or sign-in.

## Examples

Set NEATTRIM_API_KEY to your key, then copy an example. A tool that draws from your allowance reads an uploaded file: upload a sample file as in the quickstart and set VIDEO_FILE_ID (or AUDIO_FILE_ID, IMAGE_FILE_ID, SUBTITLES_FILE_ID) to its file_id. Any other id in an example, such as JOB_ID, is read from a variable of the same name.

### curl

```bash
curl -X GET "https://api.neattrim.com/v1/config"
```

### TypeScript

```ts
// @neattrim/sdk is not on npm yet: it arrives with the first client release. Use the curl example today.
import { api, Neattrim, unwrap } from "@neattrim/sdk";

const client = new Neattrim({ apiKey: process.env.NEATTRIM_API_KEY });
const result = unwrap(
  await api.getConfig({
    client: client.client,
  }),
);
console.log(result);
```

### Python

```python
# neattrim is not on PyPI yet: it arrives with the first client release. Use the curl example today.
import os

from neattrim import Neattrim
from neattrim_generated.api.discovery import get_config

with Neattrim(api_key=os.environ["NEATTRIM_API_KEY"], base_url="https://api.neattrim.com") as client:
    result = get_config.sync(client=client.client)
    print(result)
```

## Response 200

Config

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `min_web_build` | string | no | Oldest web build still accepted; older clients reload |
| `vapid_key_id` | string | no |  |
| `vapid_public_key` | string | no |  |
| `products` | array of object | no |  |
| `allowances` | object | no |  |
| `features` | object | no | Public feature flags keyed without the `public.` prefix. `sale.active` describes a running sale while it is on: `{ active: boolean, code: string, percent: integer 1 to 99, ends_at: ISO 8601 string or null }`. The pricing page, paywall sheet and checkout hand-off read it; the checkout API applies the code itself (`checkoutDiscountCodes`). |
| `billing` | object | no | How payments run. `test`: the payment provider is in test mode, so paid plans are shown as not open yet and only test accounts can buy (Me.test_payments). `live`: real payments. |
| `server_now` | string | no |  |
| `consent_required` | boolean | no | Whether the visitor's region needs prior cookie consent (from the visitor's country). Absent means unknown, which clients treat as required |
| `region` | string | no | Country code the consent record is filed under; no IP address |

## Errors

- `429`: RATE_LIMITED
