Audit your AI middleman before it audits you
A zero-dependency Python script that probes third-party LLM relays for prompt injection, model swapping, and Web3 wallet tampering—locally, with your key going only where you point it.

What it does
API Relay Audit is a local security scanner for third-party AI API relays and LLM proxies. You point it at a relay URL with your API key; it runs 14 structured checks and spits out a Markdown report with a LOW / MEDIUM / HIGH verdict. No pip install, no web dashboard holding your credentials—just curl a single Python file and run it.
The interesting bit
The tool treats “inconclusive” as a first-class citizen. Blocked probes and ambiguous responses don’t get quietly marked clean; they stay visible in the report. That’s a deliberate design choice in a space where many scanners would rather give you a green checkmark than admit uncertainty.
Key highlights
- Zero dependencies: standalone
audit.pyuses only Python stdlib pluscurl - Detects prompt injection, model substitution, tool-call rewriting, SSE stream anomalies, and error-response leakage
- Web3 profile adds wallet-safety probes: ETH transfer guidance, signed-transaction refusal, private-key refusal
- Modular dev version (
api_relay_audit/package) with tests for contributors - Agent skill integrations for OpenClaw and Hermes workflows
- AGPL-3.0 license, with explicit intent to keep modified network-service deployments accountable
Caveats
- The tool does not certify safety; it produces evidence for human review
- Some probes are model-agnostic by necessity, which may limit specificity for niche model behaviors
- Web3 checks are profile-gated and may not cover all wallet interaction patterns
Verdict
Worth a run if you buy API access through resellers, use Claude/OpenAI-compatible proxies, or let agent workflows touch package installs or wallet operations. Skip it if you only hit first-party APIs directly—though reading the fixture report is still decent threat-modeling homework.
Frequently asked
- What is toby-bridges/api-relay-audit?
- A zero-dependency Python script that probes third-party LLM relays for prompt injection, model swapping, and Web3 wallet tampering—locally, with your key going only where you point it.
- Is api-relay-audit open source?
- Yes — toby-bridges/api-relay-audit is open source, released under the AGPL-3.0 license.
- What language is api-relay-audit written in?
- toby-bridges/api-relay-audit is primarily written in Python.
- How popular is api-relay-audit?
- toby-bridges/api-relay-audit has 764 stars on GitHub.
- Where can I find api-relay-audit?
- toby-bridges/api-relay-audit is on GitHub at https://github.com/toby-bridges/api-relay-audit.