AgentQL Usage API reference
AgentQL's Usage API allows you to monitor your subscription usage data, giving you detailed insights into your API consumption. With an HTTP GET request including any valid API key, you can retrieve information about your subscription plan.
Any valid API key returns the same subscription usage data.
Query usage data
Track your subscription usage by sending an HTTP GET request to the usage endpoint.
curl -X GET https://api.agentql.com/v1/usage?api_key=<AGENTQL_API_KEY>
Make sure to replace $AGENTQL_API_KEY
with your actual API key.
{
"usage_limit": 4100,
"current_cycle_usage": 111,
"current_period_start": "2025-02-07T20:00:00Z",
"current_period_end": "2025-03-07T20:00:00Z"
}
Authentication
All requests to the AgentQL Usage API must include an api_key
query parameter with your API key.
You can generate an API key through Dev Portal.
Example requests
curl -X GET "https://api.agentql.com/v1/usage?api_key=<AGENTQL_API_KEY>"
Make sure to replace <AGENTQL_API_KEY>
with your actual API key.
Response
The usage endpoint returns a JSON object with the following structure:
-
usage_limit
integerThe maximum allowed usage
-
current_cycle_usage
integerThe amount of usage consumed in the current cycle
-
current_period_start
stringThe ISO 8601 formatted start date and time for the current usage period
-
current_period_end
stringThe ISO 8601 formatted end date and time for the current usage period