{"name":"SIGTREX API","description":"AI execution contract layer for prompt guarding, drift control, output/diff verification, replayable proof, and cost-aware governance.","version":"1.6","coreLoop":["Prompt / Agent Guard","Safer Prompt","Execution Contract","Output Guard","Replay Trace"],"endpoints":[{"method":"POST","path":"/api/strict-guard","description":"Checks a prompt or agent instruction for drift, scope creep, cost risk, and execution risk. Returns a safer prompt and execution contract.","auth":"Public demo access"},{"method":"POST","path":"/api/strict-execute","description":"Runs one strict guarded step with API key auth, drift checks, safer prompt generation, execution contract output, usage tracking, and replayable trace output.","auth":"Requires SIGTREX API key"},{"method":"POST","path":"/api/output-guard","description":"Checks AI output or a proposed diff against the original request and flags forbidden scope such as billing, auth, routing, redesigns, or unrelated changes.","auth":"Public demo access"},{"method":"GET","path":"/api/executions","description":"Returns persisted execution records for the dashboard, execution feed, and analytics.","auth":"Protected"},{"method":"GET","path":"/api/executions/replay","description":"Returns replayable trace data for a specific execution, including safer prompt and execution contract details when available.","auth":"Protected"},{"method":"POST","path":"/api/generate-api-key","description":"Generates a SIGTREX API key for authenticated execution.","auth":"Public demo access"},{"method":"POST","path":"/api/revoke-api-key","description":"Revokes an API key and blocks future execution access.","auth":"Requires SIGTREX API key"},{"method":"GET","path":"/api/usage","description":"Returns usage, quota, plan, remaining requests, and monthly consumption.","auth":"Requires SIGTREX API key"}],"examples":{"generateApiKey":"curl -X POST https://sigtrex-api.vercel.app/api/generate-api-key","strictGuard":"curl -X POST https://sigtrex-api.vercel.app/api/strict-guard \\\n-H \"Content-Type: application/json\" \\\n-d '{\"step\":\"Fix API auth\",\"mode\":\"strict\"}'","strictExecute":"curl -X POST https://sigtrex-api.vercel.app/api/strict-execute \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer YOUR_API_KEY\" \\\n-d '{\"step\":\"Validate dashboard metrics\",\"mode\":\"strict\"}'","outputGuard":"curl -X POST https://sigtrex-api.vercel.app/api/output-guard \\\n-H \"Content-Type: application/json\" \\\n-d '{\"originalRequest\":\"Only fix the API key copy button. Do not touch billing, auth, routing, layout, or unrelated files.\",\"output\":\"I changed the copy handler and also updated billing and auth.\"}'","usage":"curl -H \"Authorization: Bearer YOUR_API_KEY\" \\\nhttps://sigtrex-api.vercel.app/api/usage","revokeKey":"curl -X POST https://sigtrex-api.vercel.app/api/revoke-api-key \\\n-H \"Authorization: Bearer YOUR_API_KEY\""},"responseFields":{"saferPrompt":"A narrowed prompt that removes broad or risky secondary requests and adds execution guardrails.","executionContract":"A structured contract containing goal, original request, allowed scope, forbidden scope, success checks, risk, and output verification guidance.","outputGuard":"Returns safeToApply, decision, and violations for AI output or proposed diffs."},"limitations":["SIGTREX reduces drift risk but does not guarantee perfect AI behavior.","Output Guard currently checks obvious forbidden scope terms and should not replace human review.","Cost and token savings are estimates."]}