API keys

Create and revoke the keys your integration sends to the Data API, and read their usage, under My organization on the Moonlit platform.

Enable your organization

The Data API is enabled per organization, agreed with our team; see Get access. Once agreed, three steps hand key management to you:

  1. Sign in at app.moonlit.ai with the account that will manage the keys. Signing in creates the account if you do not have one.
  2. Tell us which account signed in, at support@moonlit.ai.
  3. We assign your organization to that account. From then on it manages keys and roles itself.

Who can manage keys

Your organization's Owner, or a member with the Developer role, creates and revokes keys and calls the Data API. Owners and members with the Admin role change a member's role under My organization.

Generate a key

  1. Open My organization on the Moonlit platform.
  2. Choose Data API, then Keys.
  3. Click Generate key.
  4. Copy the key now; the platform shows it once. Keys start with mdk_live_.

Each key belongs to one region, Europe or United States. The key list shows its region, who created it, its use, its last use and its limit.

Send the key on every request as a Bearer token:

Authorization: Bearer YOUR_API_KEY

The Data API quickstart takes the key to a first result in two requests.

Treat API keys like passwords. Keep them in environment variables or a secret manager, never in code or in configuration that leaves your control. Revoke a key the moment it leaks.

Regions

Keys in Europe call https://api.moonlit.ai. Keys in the United States call https://us.api.moonlit.ai. The US deployment serves the Data API only, under an enterprise agreement. Where each deployment processes data is listed under Sub-processors and Sub-processors, US deployment.

Revoke a key

Open Keys and click Revoke on the key. Requests that still carry it return 401. To rotate a key without downtime, generate the new key first, switch your service to it, then revoke the old one.

Usage

The Usage tab shows calls and units per key or per endpoint, for a region and a date range. A call is any request. A unit is a call that counts toward your usage and your invoice. Searches and document retrievals are one unit per call.

These endpoints are calls with zero units:

Your plan's monthly allowance counts units. When it is used up, every request returns 429; see Errors. Calls from the Try it panel on the reference count like any other call.

Where next

  • The quickstart runs a first search and reads a document with your key.
  • The reference documents every endpoint, parameter and response field.
esc
↑↓ navigateenter openesc close