REST API

POST /api/v1/analyze for deterministic agent configuration analysis.

Overview

| Item | Value |

|------|-------|

| Base URL | Your Foo Guard deployment URL |

| Analysis endpoint | `POST /api/v1/analyze` |

| Authentication | Bearer API key |

| Plan requirement | Pro (personal) or Team entitlement (service keys) |

| Max payload | 1 MB |

Request body

{
  "content": "<JSON or YAML configuration>",
  "format": "json",
  "name": "optional label",
  "sourceFilename": "optional filename"
}

Only documented fields are accepted. Unknown fields return 400.

Example

curl -X POST https://your-domain.com/api/v1/analyze \
  -H "Authorization: Bearer agt_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "{\"name\":\"my-agent\",\"tools\":[]}",
    "format": "json"
  }'

Response

Returns an AnalysisResult with score, grade, risk, findings, and sanitizedConfig. Finding rule IDs follow AG-001 through AG-023. Raw secrets are never included.

Severity, score, and pass/fail status are computed server-side and cannot be supplied by the client.

Related pages