Base URL: https://api.mergeguide.ai/v1
All API requests require authentication using an API key passed in the Authorization header.
Authorization: Bearer mg_live_xxxxxxxxxxxxxxxxxxxxAPI keys are managed in your MergeGuide dashboard under Settings → API Keys. Keys are scoped to your organization and carry your tier's rate limits.
| Parameter | Type | Description |
|---|---|---|
| code required | string | The source code to evaluate |
| language required | string | Programming language: python, javascript, typescript, go, java, ruby, rust, php, csharp, cpp, scala, kotlin, swift |
| frameworks | string[] | Override active frameworks for this evaluation. Defaults to organization's configured frameworks. |
| context | object | Optional: repository, branch, actor for evidence generation |
curl -X POST https://api.mergeguide.ai/v1/evaluate \
-H "Authorization: Bearer mg_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"code": "conn = psycopg2.connect(password=\"admin123\")",
"language": "python",
"context": {
"repository": "acme/payments",
"actor": "developer@acme.com"
}
}'| Parameter | Type | Description |
|---|---|---|
| repository required | string | Repository in owner/repo format |
| commit_sha required | string | Full SHA of the commit to evaluate |
| actor | string | Identity of the person who authored the commit |
| Parameter | Type | Description |
|---|---|---|
| start_date required | string | ISO 8601 date. Evidence from this date forward. |
| end_date required | string | ISO 8601 date. Evidence through this date. |
| frameworks | string[] | Filter to specific frameworks. Defaults to all. |
| document_types | string[] | ssp, sap, sar, poam, component. Defaults to all. |
Free: 100 evaluations/day. Pro: 1,000/day. Team: 10,000/day. Business: 50,000/day. Enterprise: custom. Rate limit headers are returned on every response: X-RateLimit-Remaining, X-RateLimit-Reset.