Skip to content
AudonDocs
Esc
  • OverviewGet started
  • Provider setupGet started
  • Free auditGet started
  • REST APIDevelopers
  • Fixes and Auto-applyDevelopers
  • MCP serverDevelopers
  • Security overviewTrust
  • StatusTrust
  • SubprocessorsTrust
  • Terms of ServiceLegal
  • Privacy PolicyLegal
  • Data Processing AddendumLegal
  • Cookie PolicyLegal
  • Acceptable Use PolicyLegal
  • AI Data Use PolicyLegal
  • Billing and Cancellation PolicyLegal
  • Auto-apply Add-on TermsLegal
Documentation menu: DevelopersAuto-apply

Developers

Fixes and Auto-apply

The fix behind every finding, and how Auto-apply carries it out through your agent (MCP) or the Audon gateway.

Every finding comes with a fix: the exact change for your provider and model, with steps, code, a prompt for a coding agent, how to roll it back and how the saving is measured. Fixes are free on every plan. With the Auto-apply add-on ($49 a month, or $39 on yearly billing, on a paid plan), a person approves a fix in one click and Audon carries it out, through your own agent or through the Audon gateway.

The fix

Open a finding, or call fix_get (GET /v1/findings/{finding_id}/fix). The response has the kit (steps, snippets, rollback, measurement, caveats), a ready prompt in agent_instructions, and whether the gateway can enforce it.

Through your agent (MCP)

Your coding agent does the change in your code. Audon never gets access to your repository.

  1. A person with approval rights clicks Apply with your agent on the finding (fix_apply with mode: "agent"; agents can’t approve).
  2. Your agent calls fix_next. It gets the job and exact instructions: change only what the fix needs, behind a flag, and open a pull request.
  3. The agent calls fix_report with outcome: "applied" and the pull request URL (or "failed" with the reason).
  4. Rollbacks come through fix_next as well (action: "rollback"), reported with outcome: "rolled_back".
Claude Code
claude mcp add --transport http audon https://audon.ai/mcp
# then: "Check Audon for approved fixes and apply them."

Through the Audon gateway

Point your client at the gateway and approved fixes run on matching requests with no code change. Turn the gateway on in Auto-apply, create an API key with the gateway:use scope, and send it as x-audon-key. Your provider key stays in its usual header; Audon passes it through and never stores it.

Endpoints
OpenAI     https://audon.ai/api/gateway/openai/v1
Anthropic  https://audon.ai/api/gateway/anthropic
xAI        https://audon.ai/api/gateway/xai/v1
OpenAI SDK (TypeScript)
const client = new OpenAI({
  baseURL: 'https://audon.ai/api/gateway/openai/v1',
  defaultHeaders: { 'x-audon-key': process.env.AUDON_GATEWAY_KEY },
});

What the gateway can enforce

  • Output limit: requests that ask for more output tokens than the limit (or for no limit) get the limit. Requests with extended thinking and reasoning models are left unchanged.
  • Model routing: a canary share of requests to one model goes to a cheaper one, optionally only for requests with an x-audon-task header. If the cheaper model returns a server error, the request is sent once more to the original model, and your provider bills both.
  • Prompt caching (Anthropic): a long system prompt without a cache marker is marked as cacheable.
  • Retry limit: identical requests beyond a per-minute limit get a 429 instead of reaching the provider.

Shadow mode

Start a gateway fix in shadow mode (the default in the app, options.shadow: true over the API). The gateway logs which requests it would have changed and, for an output limit, how many output tokens it would have saved, without changing anything. Enforce it with one click (fix_enforce) when the numbers look right.

Auto-stop for routing

A routing fix compares the cheaper model with the original over the last hour. It rolls itself back when the cheaper model’s error rate is more than 5 points higher, or its p95 latency more than 50% higher, once each side has at least 30 requests. Requests that needed the fallback count as errors.

Safety

  • Only the provider hosts and endpoints listed in the app are forwarded. Requests up to 4 MB. Model names match with or without a date suffix (gpt-4o and gpt-4o-2024-08-06).
  • If a fix can’t be applied, the request is forwarded unchanged. If the add-on ends, everything is passed through unchanged.
  • Pass everything through stops all fixes at once; fix_rollback stops one, and agents may call it.
  • Prompts and outputs pass through in memory and are never stored. Audon records metadata per request (model, fixes applied, status, latency, tokens) for 90 days. Every response carries x-audon-request-id and, when a fix applied, x-audon-policies.

Keep a direct path

If Audon is unreachable, requests through the gateway fail. Configure your client to fall back to the provider directly.

Fallback to the provider (TypeScript)
const direct = new OpenAI();
const viaAudon = new OpenAI({ baseURL: 'https://audon.ai/api/gateway/openai/v1', maxRetries: 0,
  defaultHeaders: { 'x-audon-key': process.env.AUDON_GATEWAY_KEY } });

async function chat(params) {
  try { return await viaAudon.chat.completions.create(params); }
  catch (e) {
    const fromGateway = !e?.status || e?.headers?.get?.('x-audon-gateway') === 'error';
    if (fromGateway) return direct.chat.completions.create(params); // Audon down or refused: go direct
    throw e;                                                         // a provider error
  }
}

Going live

An agent fix has an open pull request until it is merged. Add the GitHub webhook from Auto-apply → Go live on merge (pull request events, JSON, with the secret shown once), and a merged pull request marks the fix live on its own. Otherwise use Mark as live or fix_mark_live. The live date is where the measurement starts.

Measuring the saving

Applying a fix doesn’t create a saving. Send outcome telemetry, record baseline and treatment on the proposal, and a second person verifies the result. Gateway routing experiments show control and treatment traffic separately in Auto-apply → Requests.