API

Errors and limits

Error shape, the codes you will actually hit, and what is rate limited.

Availability note — these docs describe both working and planned product areas. Account authentication, administrator-managed AIHK/AICA tenant regions and keys, signed-in Composer runs and public Guard scans are connected. Skills, Memory, Agents, Workflows, Apps, billing, the public SDK/CLI and the unified API are previews unless a section explicitly says otherwise.


{
  "error": "invalid_input",
  "message": "Human-readable explanation."
}
StatusCodeWhat to do
400invalid_json / invalid_inputSend a JSON object containing only fields accepted by that route.
401unauthenticated / invalid_api_keySend a valid gc_session cookie or a non-expired key carrying the route's required scope.
403bad_origin / forbidden / tenant_*Use the same origin and an account with the required role and active tenant.
404not_found / repository_unavailableThe requested record is absent, or Guard cannot access the requested public repository.
409already_* / tenant_ai_*Resolve the current tenant AI key or gateway lifecycle conflict first.
413body_too_large / remote_response_too_largeReduce the workspace JSON body or Guard collection input.
422no_scannable_contentSupply readable source or manifest content; Guard does not score zero-file collections.
429rate_limitedBack off; some auth responses include Retry-After.
500workspace_unavailableThe server could not safely read or write workspace storage.
502 / 504remote_*GitHub collection failed within Guard's network safety boundary.
503tenant_ai_disabled / tenant_ai_not_readyAssign the tenant gateway and provision one ready key with chat enabled.

Limits

  • Workspace JSON bodies are capped at 140 KB and reject unsupported top-level fields.
  • Guard scans are limited to 12/minute publicly, 60/minute per signed-in account and 120/minute per API key.
  • Guard analyses at most 40 files, 96 KB per file and 1.5 MB of collected content; GitHub collection has a 20-second overall deadline.
  • Composer accepts up to 16,000 prompt characters and 4,000 system characters, with 20 runs/minute per signed-in account or API key.