# Subscriptions and API keys (/docs/subscriptions)

A subscription gives your quarry account a set number of questions per month on one
dataset. Every agent connected to your account shares them. You need a quarry
account: [sign up](/login) if you don't have one.

## 1. Subscribe to a dataset [#subscribe]

Open the dataset's public page from [Explore](/explore) and click **Subscribe**.
Review the monthly price, the number of questions, and the usage terms, then pay by
card in Stripe Checkout. Access starts once Stripe confirms the payment.

An assistant connected to your account can also prepare the Checkout link for you
when it needs a dataset you don't subscribe to. Preparing the link charges nothing.

## 2. Connect your agents [#connect-your-agents]

Open [Subscriptions](/subscriptions). Under **Connected agents**:

* For Claude, click **Add to Claude**: Claude opens with quarry filled in. Choose
  Sign in when needed, and connect your quarry account when Claude asks (see
  [Chat assistants](/docs/connect/assistants#claude)).
* For other assistants, copy the **Sign-in address**,
  `https://quarry.market/api/agent/mcp`, and add it as a remote MCP server (see
  [Connect your tool](/docs/connect)). When the assistant asks, sign in to quarry
  and click **Connect agent**.

![The Connected agents panel of the Subscriptions page: the Add to Claude button, and the sign-in address for other agents with a Copy button.](/docs/screenshots/connected-agents-light-7762c547.png)

A connected agent can see your subscriptions and a list of your latest purchases,
without what was asked, use your subscriptions' questions, and prepare Checkout links. It can't edit your datasets, change your billing details, or
withdraw money. To cut off one agent, click **Revoke** next to it: that takes
effect right away and doesn't cancel your subscription.

## Or use an API key [#api-keys]

Code that can't run a sign-in, such as a script or an agent built with LangChain or
the AI SDK, uses an API key instead. On the [Subscriptions](/subscriptions) page,
click **Create key** under **API keys**, name the key, and click **Create key**
again. Copy the key right away: it's shown only once. Then click **Done**.

![The API keys panel, with its Create key button.](/docs/screenshots/api-keys-light-08fec5ef.png)

Send it with every request to the free address, `https://quarry.market/api/mcp`:

```text
Authorization: Bearer qk_...
```

A key can do what a connected agent can, nothing more: it can't sign in to your
quarry account. You can have up to 10 active keys, and **Revoke** stops one immediately.
Setup for each tool is in [Connect your tool](/docs/connect).

## Share with your team [#teams]

A subscription belongs to one quarry account, and that account can stand for your
organization. To share its subscriptions:

1. Subscribe from your organization's quarry account.
2. On its [Subscriptions](/subscriptions) page, create an API key for each teammate,
   agent, or server, named so you can tell them apart.
3. Give each person their key, to set as `QUARRY_API_KEY` in their tools: see
   [Coding agents](/docs/connect/coding-agents) and
   [Other platforms](/docs/connect/platforms).

Every key uses the same monthly questions, and **Revoke** cuts off one key without
affecting the others. Every question asked with one of the account's keys is listed
with its text on the account's **Purchases** page, whoever asked it. Claude and ChatGPT can't use API keys: they use the
subscriptions of the quarry account they sign in with. The dataset's usage terms,
shown on its page, still apply.

## Your monthly questions [#your-monthly-questions]

What counts as one question is on [How paying works](/docs/paying#what-you-pay-for).
For a subscription:

* Your questions reset each month you pay for. Unused questions don't carry over.
* When you run out, your agent can wait for the next month or, if the dataset also
  sells single questions, pay per question from its own wallet. quarry never buys
  extra questions for you.

## Manage and cancel [#manage-and-cancel]

**Your subscriptions** on the [Subscriptions](/subscriptions) page shows what's left
this month and when it renews. Subscriptions that have ended are folded under
**Ended**, at the bottom.

* **Continue checkout** picks up a payment you didn't finish.
* **Check payment status** asks Stripe again if access hasn't started.
* **Manage billing** opens Stripe, where you update your card, download invoices,
  or cancel.

Canceling stops the renewal; you keep access until the end of the month you paid
for. If a seller stops selling a dataset, you keep access until your paid month
ends.

Building something that checks access or subscribes on its own? See the
[Subscription API](/docs/api/subscriptions). Selling your own data by subscription?
See [Set your price](/docs/creators/pricing#monthly-subscriptions).
