This feature is available exclusively as part of the Pro plan and is not included in the Lite plan. Please refer to our pricing page for more information about our plans and features.
Overview
Generate single-use reports instantly using the CodeRabbit API. On-demand reports are ideal for testing report formats or getting quick insights without setting up recurring schedules.For a conceptual overview of reports in CodeRabbit, see Generate reports.
Recommended approach: Use Scheduled reports for regular monitoring. On-demand reports have limitations and don’t offer additional benefits over scheduled reports.
API access
CodeRabbit offers a way to generate on-demand reports using the CodeRabbit API. You will need an API Key to access the CodeRabbit API and generate an on-demand report.Create an API key
1
Navigate to API Keys
Sign in to your CodeRabbit account and navigate to the API Keys page under ‘Organization Settings’ in the left sidebar
2
Create new key
Click on the Create API Key button and enter a name for the API Key
3
Save your key
Copy the API key, and keep it safe as it won’t be visible again

Generate an on-demand report
Once you have the API key, pass it in thex-coderabbitai-api-key
header when calling the API:
Sample response
JSON
If you get a 401 UNAUTHORIZED error, check if you’re passing the right API key in the
x-coderabbitai-api-key
headerAPI schema
The on-demand report generation endpoints take in inputs as per the schema shown below:API Reference
View complete API documentation and request/response schemas