{"uid":"cap_vHhpoPlQXWddhg10cuB_i","slug":"fahce-claim-verification-and-repair-077a21e5","name":"FAHCE Claim Verification and Repair","description":"Review claims against evidence, resolve contradictions, and get a bounded repair plan with FAHCE.","url":"https://fahce.kinganlogic.com/api/v1/repair?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["schema","evidence","candidate_output"],"properties":{"schema":{"type":"string"},"evidence":{"type":"array"},"expected_output":{"type":"string","description":"Optional response-contract and repair-target context for all operations, including Diagnose. Supported response-format directives (for example, Return JSON) and implemented explicit constraints can affect the diagnosis. Ordinary matching or mismatching factual text is not compared for string equality and is not a trusted answer oracle or supporting evidence; supply independent evidence for factual claims."},"candidate_output":{"type":"string","description":"The exact candidate output to diagnose or verify. Never use payment evidence as semantic evidence."}}},"responseSchema":{"type":"object","required":["schema","operation","request_id","input_hash","diagnosis","repair","verification","billing","receipt","next_safe_action"],"properties":{"repair":{"anyOf":[{"type":"object","required":["plan","treatment","proposed_output","status"],"properties":{"plan":{"type":"object","required":["required","bounded_steps","authority_note"],"properties":{"required":{"type":"boolean"},"validated_ir":{"type":"object"},"bounded_steps":{"type":"array","items":{"type":"object","required":["step","boundary"],"properties":{"step":{"type":"string"},"boundary":{"type":"string"}},"additionalProperties":false}},"authority_note":{"type":"string"},"claim_corrections":{"type":"array","items":{"type":"object"}}}},"status":{"const":"PROPOSED_NOT_EXECUTED"},"treatment":{"type":["object","null"]},"proposed_output":{"type":["string","null"]}},"additionalProperties":false},{"type":"null"}]},"schema":{"const":"FAHCE_MACHINE_RESPONSE_V1"},"billing":{"type":"object","required":["billable","free_retry","reason","determination_status"],"properties":{"reason":{"type":["string","null"]},"billable":{"type":"boolean"},"free_retry":{"type":"boolean"},"determination_status":{"enum":["DETERMINATION_COMPLETE","DETERMINATION_COMPLETE_NEGATIVE","DETERMINATION_NOT_PRODUCED"]}}},"binding":{"type":"object","required":["actor_id","tenant_id","nonce","idempotency_key"],"properties":{"nonce":{"type":"string"},"actor_id":{"type":"string"},"tenant_id":{"type":"string"},"tenant_model":{"enum":["PILOT_USER_ISOLATION","PAYMENT_CONTEXT_ISOLATION"],"description":"Cloudflare wallet-only purchases use PAYMENT_CONTEXT_ISOLATION: one authorization-bound principal, no human account privileges. Legacy key calls use PILOT_USER_ISOLATION."},"credential_id":{"type":["string","null"],"description":"Null for wallet-only Cloudflare machine purchases. A credential exists only for legacy key-backed calls; it is never a prerequisite for an ordinary paid buyer."},"idempotency_key":{"type":"string"},"operation_scope":{"enum":["machine:diagnose","machine:repair","machine:verify","machine:repair-bundle"],"type":"string"},"payment_context_hash":{"type":["string","null"]}}},"receipt":{"type":"object","required":["case_id","run_id","input_hash","result_hash","hash_scheme","provider","model","engine_version","created_at","response_hash_scheme","response_hash","payment_status","payment_receipt","settled_price_atomic_units"],"properties":{"model":{"type":"string"},"run_id":{"type":"string","format":"uuid"},"case_id":{"type":"string","format":"uuid"},"provider":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"input_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"hash_scheme":{"enum":["SHA256_CANONICAL_JSON_RESULT_WITH_EMPTY_RESULT_HASH_V1","SHA256_SORTED_JSON_RESULT_WITH_EMPTY_RESULT_HASH_V2"]},"result_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"response_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"engine_version":{"type":"string"},"payment_status":{"enum":["PILOT_KEY_NO_PAYMENT","AUTHORIZED_PENDING_GATEWAY_SETTLEMENT"]},"payment_receipt":{"type":"null","description":"Immutable origin receipt; separate gateway PAYMENT-RESPONSE is retained by the buyer."},"response_hash_scheme":{"enum":["SHA256_JSON_RESPONSE_WITH_EMPTY_RESPONSE_HASH_V1","SHA256_SORTED_JSON_RESPONSE_WITH_EMPTY_RESPONSE_HASH_V2"]},"settled_price_atomic_units":{"type":"null","description":"Origin has no confirmed gateway settlement amount. Financial confirmation is recorded separately; the original response remains immutable and settlement is never inferred."}},"additionalProperties":false},"authority":{"type":"object","properties":{"payment_approval":{"type":"string"},"integrity_support":{"type":"string"},"external_verification":{"const":"NOT_ESTABLISHED"},"permission_to_execute":{"const":"NOT_GRANTED"}}},"diagnosis":{"type":"object","required":["state","claims","contradictions","missing_evidence","missing_evidence_details","claim_ceiling"],"properties":{"state":{"enum":["HOLD","BLOCK","QUARANTINE","REPAIR_REQUIRED","CLEAR_WITH_CEILING"]},"claims":{"type":"array","items":{"type":"object","required":["id","claim","source","support","evidence_refs"],"properties":{"id":{"type":"string"},"claim":{"type":"string"},"review":{"type":"object"},"source":{"type":"string"},"support":{"enum":["SUPPORTED","UNSUPPORTED","CONTRADICTED","UNVERIFIED"]},"evidence_refs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"hold_reason":{"type":"object"},"claim_ceiling":{"type":"string"},"contradictions":{"type":"array","items":{"type":"object","required":["id","claim_id","reason","evidence_refs"],"properties":{"id":{"type":"string"},"reason":{"type":"string"},"claim_id":{"type":"string"},"evidence_refs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"missing_evidence":{"type":"array","items":{"type":"string"}},"evidence_coverage":{"type":"array","items":{"type":"object","required":["item_id","status","available_characters","inspected_characters","reasons"],"properties":{"status":{"enum":["INSPECTED","PARTIAL","OMITTED"]},"item_id":{"type":"string"},"reasons":{"type":"array","items":{"type":"string"}},"byte_inspection":{"enum":["INSPECTED","OMITTED"],"description":"Source bytes inspected; this does not establish semantic interpretation of every field."},"semantic_fields":{"type":"array","items":{"type":"object","required":["ref","source_location","subject","context","field","value","semantic_status","reason","relevant_to_claim"],"properties":{"ref":{"type":"string"},"field":{"type":"string"},"value":{},"reason":{"type":["string","null"]},"context":{"type":"object","additionalProperties":{"type":"string"}},"subject":{"type":"string"},"semantic_status":{"enum":["INTERPRETED","UNINTERPRETED"]},"source_location":{"type":"object","properties":{"line":{"type":["integer","null"]},"json_pointer":{"type":"string"}}},"relevant_to_claim":{"type":"boolean"}}}},"available_characters":{"type":"integer","minimum":0},"inspected_characters":{"type":"integer","minimum":0}}}},"missing_evidence_details":{"type":"array","items":{"type":"object","required":["scope","family","requirement"],"properties":{"scope":{"enum":["CLAIM","CASE"]},"family":{"type":"string"},"claim_id":{"type":"string"},"requirement":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false},"operation":{"enum":["diagnose","repair","verify","repair-bundle"]},"input_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"request_id":{"type":"string","format":"uuid","description":"Determination UUID, identical to receipt.case_id and receipt.run_id. Use this UUID as receipt_id in GET /api/v1/receipts/{receipt_id}. Error-envelope request_id is a separate HTTP trace; use its receipt_id when present."},"verification":{"type":"object","required":["verified","scope","external_execution_verified"],"properties":{"scope":{"type":"string"},"verified":{"type":"boolean"},"external_execution_verified":{"const":false}},"additionalProperties":false},"execution_state":{"type":"object","properties":{"notes":{"type":"string"},"action_details":{"type":"array","items":{"type":"object"}},"claimed_execution":{"enum":["ASSERTED","NOT_ASSERTED"]},"provable_execution":{"enum":["NOT_PROVEN","PARTIALLY_PROVEN"]},"action_classification":{"type":"array","items":{"enum":["PERMISSION","APPROVAL","INTENT","REQUESTED_ACTION","QUEUED_ACTION","ATTEMPTED_ACTION","FAILED_ACTION","NONEXECUTION","REVERSED_ACTION","CLAIMED_COMPLETED_ACTION"]}}}},"next_safe_action":{"type":"object","required":["action","reason"],"properties":{"action":{"type":"string"},"reason":{"type":"string"}},"additionalProperties":false},"evidence_provenance":{"type":"array","items":{"type":"object","required":["id","item_id","sha256","source_label","trust"],"properties":{"id":{"type":"string"},"trust":{"const":"CALLER_SUPPLIED_NOT_AUTHENTICATED_SOURCE"},"sha256":{"type":"string"},"item_id":{"type":"string"},"source_label":{"type":"string"}}}}},"additionalProperties":false},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.15","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.15/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.15","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.15","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_q2mox9TcMR8Me58-L8lcL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.15","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Reviews a candidate output's claims against supplied evidence, diagnoses contradictions, and returns a bounded step-by-step repair plan with a proposed corrected output.","exampleAgentPrompt":"Check this draft answer against my evidence documents and give me a bounded repair plan — here's the schema I'm using, the evidence array, and the candidate output I want diagnosed for contradictions.","exampleUseCases":[{"title":"Fact-check LLM response against sources","prompt":"I have an AI-generated answer about our product specs and a set of source documents as evidence. Can you run it through FAHCE to find any claims that contradict the evidence and get a repair plan with the corrected output?"},{"title":"Audit medical summary for unsupported claims","prompt":"Here's a generated patient summary and the clinical notes it was based on — please diagnose any contradictions or unsupported claims and give me a step-by-step bounded repair plan I can act on."},{"title":"Validate RAG pipeline output before delivery","prompt":"Before I send this RAG-generated report to the client, can you verify each claim against the retrieved evidence chunks and flag anything that needs fixing, along with a proposed corrected version?"}],"resultDescription":"Returns a structured FAHCE_MACHINE_RESPONSE_V1 object containing: a diagnosis of contradictions and unsupported claims, a repair plan with bounded step-by-step corrections (each step scoped with a boundary), a proposed corrected output string, verification results, billing determination (billable flag, free-retry eligibility, reason), a receipt, and a recommended next safe action. The repair is proposed but not automatically executed (status: PROPOSED_NOT_EXECUTED).","failureModes":["Missing required fields (schema, evidence, or candidate_output) returns a 4xx validation error","Evidence array is empty or malformed, leading to an inconclusive diagnosis","Candidate output is too long or exceeds token limits","Payment not received or invalid x402 payment header results in 402 Payment Required","Idempotency key collision may return a cached prior result","Billing determination not produced (DETERMINATION_NOT_PRODUCED) if service cannot assess the request"],"whenToPreferThis":"Choose FAHCE when you need to programmatically verify that a generated or candidate text is consistent with a specific set of evidence documents, and you want not just a diagnosis but an actionable, bounded repair plan with a proposed corrected output. It is especially well-suited for agent pipelines that need grounded, evidence-anchored outputs before delivering results to users, or when auditing LLM responses for hallucinations against retrieved context.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-15T12:32:31.009Z","isFirstParty":false,"canonicalSlug":"fahce-claim-verification-and-repair-25a89b4b"}