Using the Guardia AI API

Programmatic access for CI pipelines and custom tooling.

The REST API lets you drive scans and pull compliance data from your own tooling. It's how the CI integrations work under the hood.

Authentication

  1. Create a key at Dashboard → API Keys. The key is shown once — store it in a secrets manager.
  2. Send it on every request:
Authorization: Bearer <your-api-key>

Example: trigger a scan from CI

curl -X POST https://guardia-ai.com/api/ci/scan \
  -H "Authorization: Bearer $GUARDIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"packages": ["openai", "langchain"], "repo": "my-service"}'

The response lists detected AI usage with risk indicators, in the same format the GitHub Action consumes.

Practical notes

  • API access is a Pro-plan feature (included in the 14-day trial).
  • Requests are rate-limited; CI-triggered scans well within normal usage never hit the limits.
  • Treat keys like passwords: one key per consumer, rotate on personnel changes, revoke instantly from the API Keys page.
  • The in-app CI/CD Integration page generates ready-made GitHub and GitLab snippets that use this API — see the GitHub Integration Guide.

Didn't find what you need?

Guardia AI provides compliance tooling, not legal advice. For official regulatory text, see EU Regulation 2024/1689.