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

# Quickstart

> Create an API key and make your first levios API requests.

This guide uses an API key to list the Instagram accounts available to you,
then reads metrics for one account.

## Create an API key

1. Open [API key settings](https://levios.app/settings/api-keys) and sign in.
2. Create a key with the `metrics:read` scope.
3. Give the key access to the account you want to query.
4. Copy the key when levios shows it. You cannot retrieve the secret later.

Keep the key outside your source code and never expose it in client-side code.

## Set your environment variable

Store the key in your shell for this session:

```bash theme={null}
export LEVIOS_API_KEY="<YOUR_LEVIOS_API_KEY>"
```

## List your accounts

Send the key as a Bearer credential:

```bash theme={null}
curl --request GET \
  --url "https://levios.app/api/v1/accounts?limit=1" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer ${LEVIOS_API_KEY}"
```

Choose an `id` from the response and store it for the next request:

```bash theme={null}
export LEVIOS_ACCOUNT_ID="<YOUR_ACCOUNT_ID>"
```

## Read account metrics

Request the seven-day metrics window:

```bash theme={null}
curl --request GET \
  --url "https://levios.app/api/v1/metrics?account_id=${LEVIOS_ACCOUNT_ID}&window=7d" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer ${LEVIOS_API_KEY}"
```

The response includes the selected window, KPI values, and up to five top
automations.

## Continue

* Read [Authentication](/guides/authentication) before you handle credentials
  in production.
* Use [Pagination](/guides/pagination) for larger account, automation, or
  contact lists.
* Check [Errors](/guides/errors) and [Rate limits](/guides/rate-limits) before
  adding retries.
* Open the [API v1 overview](/api/v1/overview) to browse every endpoint.
