{"uid":"cap_kDyJ4WDG_P4V1kDflkbZx","slug":"fahce-repair-bundle-860e8eda","name":"FAHCE Repair Bundle","description":"Review claims against evidence, resolve contradictions, and get a bounded repair plan with FAHCE.","url":"https://fahce.kinganlogic.com/api/v1/repair-bundle?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.39","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.39/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.39","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.39","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_L_6b1uRMA6FolPGBBFtrm","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.39","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 against provided evidence, diagnoses contradictions or unsupported claims, and returns a bounded, step-by-step repair plan with a proposed corrected output.","exampleAgentPrompt":"I have a candidate answer my LLM just produced and a set of evidence documents — can you run it through FAHCE to diagnose any contradictions or unsupported claims, and give me a bounded repair plan with a corrected proposed output?","exampleUseCases":[{"title":"Hallucination check for RAG pipeline output","prompt":"My RAG system generated this answer about our product return policy, and I have the three source documents it was supposed to use. Can you diagnose whether any claims in the answer contradict or aren't supported by those documents, and give me a repair plan to fix it?"},{"title":"Legal brief claim verification","prompt":"I've drafted a summary of a legal case and I have the court ruling as evidence. Can you check the draft for any claims that contradict or go beyond what's in the ruling, and propose a corrected version with a step-by-step fix plan?"},{"title":"Medical content accuracy review","prompt":"Here's a patient-facing explanation of a drug interaction written by our content team, and here are the clinical trial abstracts we used as sources. Please diagnose any unsupported or contradicted claims and give us a bounded repair plan with a proposed corrected output."}],"resultDescription":"Returns a structured FAHCE_MACHINE_RESPONSE_V1 object containing: a diagnosis of the candidate output's issues against the evidence, a repair plan with bounded numbered steps and authority notes, a proposed corrected output string, a billing determination (billable/free-retry), a receipt, and a next_safe_action recommendation. The repair is proposed but not automatically executed.","failureModes":["Missing required fields (schema, evidence, or candidate_output) returns a validation error","Evidence array is empty or uninterpretable, leading to an indeterminate diagnosis","Candidate output is too long or malformed, causing a parse failure","Contradictions cannot be resolved due to conflicting evidence items","Billing determination fails, returning DETERMINATION_NOT_PRODUCED and a free retry flag","Payment not confirmed, resulting in a 402 response before processing"],"whenToPreferThis":"Choose FAHCE Repair Bundle when you need to not just detect factual errors in a generated output but also receive an actionable, bounded repair plan and a proposed corrected output in a single call. It is best suited for LLM output grounding workflows, RAG pipeline QA, and any scenario where you supply structured evidence and need a verifiable, step-limited fix — rather than open-ended rewriting or generic plagiarism checking.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-15T12:32:01.756Z","isFirstParty":false,"canonicalSlug":"fahce-repair-bundle-860e8eda"}