Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.airrating.io/llms.txt

Use this file to discover all available pages before exploring further.

Endpoints

MethodPathDescription
GET/api/keys/validateCheck if a key is active and retrieve its metadata
GET/api/keys/usageGet monthly usage history for a key
GET/api/keys/createCreate a new API key (admin only)

Validate a key

Check whether an API key is valid and retrieve its metadata.

Request

api_key
string
required
The API key to validate.

Response

valid
boolean
true if the key is active, false otherwise.
prefix
string
The first 14 characters of the key (safe to display/log).
name
string
Label assigned to the key when it was created.
monthly_limit
integer
Maximum number of API calls per calendar month.
month_count
integer
Number of calls made in the current calendar month.
total_requests
integer
Total API calls made with this key across all time.
created_at
string
ISO 8601 timestamp of when the key was created.

Example

curl "https://app.airrating.io/api/keys/validate?api_key=YOUR_API_KEY"
{
  "valid": true,
  "prefix": "ar_live_xxxxxx",
  "name": "My Integration",
  "monthly_limit": 1000,
  "month_count": 42,
  "total_requests": 387,
  "created_at": "2026-01-15T10:30:00Z"
}

Get usage history

Returns current-month usage and up to 24 months of historical usage for your key.

Request

api_key
string
required
Your API key.
year
integer
Filter history to a specific year (optional).
month
integer
Filter history to a specific month, 1–12 (optional).

Response

key_prefix
string
Key prefix identifier.
name
string
Key label.
current_month
object
Usage for the current calendar month.
history
array
Past months, up to 24 entries, most recent first.
total_requests_all_time
integer
Cumulative total calls across all months.

Example

curl "https://app.airrating.io/api/keys/usage?api_key=YOUR_API_KEY"
{
  "key_prefix": "ar_live_xxxxxx",
  "name": "My Integration",
  "current_month": {
    "year": 2026,
    "month": 4,
    "requests": 87,
    "monthly_limit": 1000,
    "period": "current"
  },
  "history": [
    {
      "year": 2026,
      "month": 3,
      "requests": 312,
      "monthly_limit": 1000,
      "usage_pct": 31.2,
      "logged_at": "2026-04-01T00:05:00Z",
      "period": "historical"
    }
  ],
  "total_requests_all_time": 399
}

Create a key

This endpoint is restricted to admin use during private beta. It is not available to general API users.
Creates a new API key and stores it in the database.

Request

name
string
required
A label for the key (e.g. company name or integration name).
email
string
required
Contact email associated with the key.
monthly_limit
integer
default:"100"
Maximum API calls per calendar month.

Response

api_key
string
The newly created API key. Store this immediately — it cannot be retrieved again.
prefix
string
The first 14 characters (safe reference).
monthly_limit
integer
Monthly request limit.
message
string
Reminder to save the key.

Example

{
  "api_key": "ar_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "prefix": "ar_live_xxxxxx",
  "monthly_limit": 100,
  "message": "Save this key — it will NOT be shown again."
}