Before you begin
You need three things: membership in an Antigen organization, a credential, and an approved target.
Organization roles are admin, member, and read-only. Admins manage membership and API keys, members
create and operate Runs, and read-only members read Runs and findings without creating them.
Authentication covers credential kinds, scopes, and authorization errors in full.
Confirm the target list returns the value you intend before you submit a Run. If the list is empty,
a target is rejected, or access is forbidden, stop rather than editing a target string or borrowing
another organization’s credential. Ask your administrator to verify membership and the credential,
and request a target change from Antigen if the target you need is absent.
Neither knowing a target value nor holding a Run ID grants access. Every request is authorized in
the caller’s organization context, which is also why the safe response to a permission error is to
fix the permission rather than to create a second Run.
Quick start: TypeScript SDK
Install the SDK, setANTIGEN_API_KEY to an organization API key, and set ANTIGEN_TARGET to one
of your approved targets.
assess.ts and run it on Node 22 or later with npx tsx assess.ts. It
confirms the requested target is approved, records the Run ID and event position in
application-owned files, then reports the first finding’s remediation.
Quick start: CLI
Install the CLI and sign in. Device login needs your organization UUID, from--organization-id or
ANTIGEN_ORGANIZATION_ID.
antigen run creates a Run, streams its events, and prints findings in one command. With no options
it assesses every approved target, so pass --targets when the assessment should be narrower.
ANTIGEN_API_KEY instead of signing in, and use --json so the Run
ID is machine-readable rather than copied by hand:
0; a failed or cancelled Run exits 1, so CI can gate on the result
directly. Continue in the CLI reference.
Quick start: HTTP API
The HTTP API is served fromhttps://api.antigen.sh. Authenticate every request with an
organization API key in x-api-key. These commands need curl and jq, with ANTIGEN_API_KEY set
in your environment.
List the targets approved for your organization:
--fail-with-body prints the service’s
structured error and returns a non-zero status if the request is rejected:
Use Platform instead
Platform is the visual workflow over the same organization, approved targets, Runs, and findings. Sign in, choose an approved target, start a Run, and follow its progress and findings in the browser. It suits review and triage work that does not need to be scripted, and it supplements the programmatic clients rather than replacing them. If you started a Run from the CLI,antigen open <run-id> opens that same Run in Platform.