This project is not covered by Drupal’s security advisory policy.
AI Request Reports shows how your Drupal site uses AI. Site administrators can see which providers and models account for most token usage, estimate costs, and investigate recent failures in one report.
Features
- Review requests, failures, token usage, estimated costs, and average response times over the last 24 hours, 7 days, or 30 days.
- Break down usage by provider, model, and operation. Inspect recent requests with their tags, timing, status, and error details.
- Track provider-reported input, output, cached, and reasoning tokens where available. The usage report stores request metadata and errors without storing prompts or generated response bodies as separate fields.
- Estimate costs from configurable model rates, with defaults for selected OpenAI GPT and Anthropic Claude models. Calls with missing token counts or rates remain unpriced.
- Pause new OpenAI requests sent through Drupal AI. Integrations that support deferral can queue work and resume processing through Drupal cron.
Getting started
Enable the module, grant View AI usage statistics to the appropriate roles, and open Reports → AI usage (/admin/reports/ai-usage). Recording starts when the module is enabled. Drupal cron removes usage records after 180 days by default.
Configure retention and per-model rates in ai_request_reports.settings. The ai-usage:check-prices CLI command compares configured rates with published provider rates. Use your provider’s dashboard for billing totals.
Requirements
PHP 8.5, Drupal 11.3 or later in the 11.x series or Drupal 12, and Drupal AI 1.5.3 or later in the 1.x series.
Project information
- Project categories: Artificial Intelligence (AI)
- Ecosystem: AI (Artificial Intelligence)
- Created by mtomek on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Initial stable release with token usage reports, estimated costs, and OpenAI request controls.

