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

# Axiom

> Query Axiom datasets with APL and ingest events

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key comes from `AXIOM_TOKEN`.
* **Docs**: [https://axiom.co/docs/reference/tokens](https://axiom.co/docs/reference/tokens)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable      | Required | Description                                                                                                    |
| ------------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| `AXIOM_TOKEN` | Yes      | Axiom API token with query (and optionally ingest) permissions [Docs](https://axiom.co/docs/reference/tokens). |

## Setup

1. **Sign up for Axiom**: Create a free account at [https://app.axiom.co](https://app.axiom.co) - the free plan includes API access. Create a dataset and send a few test events so queries return data.
2. **Create an API token**: Go to Settings → API tokens ([https://app.axiom.co/settings/api-tokens](https://app.axiom.co/settings/api-tokens)) and create a token. Grant query permission on the datasets you want to read, and ingest permission if you will use Ingest Events.
3. **Set the environment variable**: Add the token to your .env as AXIOM\_TOKEN=...
4. **Verify access**: Run List Datasets, then Run APL Query with \['\<dataset>'] | limit 10.

* Requests authenticate with 'Authorization: Bearer \<token>' against [https://api.axiom.co](https://api.axiom.co)
* APL queries POST to /v1/query/\_apl; startTime/endTime accept RFC3339 timestamps or relative expressions like now-1d
* API tokens have granular dataset permissions - a query-only token cannot ingest; personal access tokens additionally require an org ID header and are not used here

Provider API reference: [https://axiom.co/docs/restapi/introduction](https://axiom.co/docs/restapi/introduction)

## Tools

| Tool          | Access | Description                                                  |
| ------------- | ------ | ------------------------------------------------------------ |
| List Datasets | Read   | List datasets in the Axiom organization                      |
| Get Dataset   | Read   | Get a dataset's details                                      |
| Run APL Query | Read   | Run an APL (Axiom Processing Language) query across datasets |
| Ingest Events | Write  | Ingest a batch of JSON events into a dataset                 |

## Example prompts

* Run an Axiom APL query for error-level events in my main dataset over the last hour and summarize them.
* List my Axiom datasets and tell me what kind of data each one holds.
