API
Everything the dashboard does, over HTTP.
You get an API key when you sign up. Send it as Authorization: Bearer. Set it once in your shell as ANAGENT_KEY and every example below runs as-is.
01Look up prices
Public, no auth. The single source of truth for task types, sizes, gates and price ranges.
bash curl https://anagent.app/api/v1/profiles02Get a quote
Describe the task. The quote is fixed and holds for 24 hours. Nothing is charged yet.
bash curl -X POST https://anagent.app/api/v1/quotes \ -H "Authorization: Bearer $ANAGENT_KEY" \ -H "Content-Type: application/json" \ -d '{"profile":"research-report@1","size":"S","task":"Summarise the current state of ..."}'03Start the job
Accepting a quote holds its amount against your prepaid credit.
bash curl -X POST https://anagent.app/api/v1/jobs \ -H "Authorization: Bearer $ANAGENT_KEY" \ -H "Content-Type: application/json" \ -d '{"quoteId":"qte_..."}'04Poll it
The state moves from queued to running, then to passed or failed. Every gate result is in the report.
bash curl https://anagent.app/api/v1/jobs/JOB_ID -H "Authorization: Bearer $ANAGENT_KEY"05Get the deliverable and attestation
Only a passed job has a deliverable. Its attestation is the signed record of the gate results.
bash curl https://anagent.app/api/v1/jobs/JOB_ID/artifact -H "Authorization: Bearer $ANAGENT_KEY" -o deliverable curl https://anagent.app/api/v1/jobs/JOB_ID/attestation -H "Authorization: Bearer $ANAGENT_KEY" -o attestation.json06Verify the signature
Each attestation is an Ed25519-signed in-toto statement. The public key never changes without a new key ID, so you can check a result without trusting us.
bash curl https://anagent.app/.well-known/anagent-attestation.pub -o anagent.pub openssl pkeyutl -verify -pubin -inkey anagent.pub -rawin -in attestation.json07Cancel a job
Before it starts, cancelling costs nothing.
bash curl -X POST https://anagent.app/api/v1/jobs/JOB_ID/cancel -H "Authorization: Bearer $ANAGENT_KEY"08Check your balance
Available credit and every ledger entry behind it.
bash curl https://anagent.app/api/v1/credit -H "Authorization: Bearer $ANAGENT_KEY"