{"openapi":"3.1.0","info":{"title":"HALOWERK aialignwerk","version":"1.0.0","description":"HALOWERK aialignwerk — bezahlte Endpunkte nach x402. Preise in USDC auf Base Mainnet.","contact":{"url":"https://aialign.halowerk.com/"}},"servers":[{"url":"https://aialign.halowerk.com"}],"paths":{"/v1/hallucination-rate":{"post":{"operationId":"aialignwerk_hallucination_rate","summary":"Measures lexical evidence coverage for caller-supplied claims.","description":"Tokenizes each claim and its supplied evidence, removes a small declared English stop-word list, and reports the fraction of unique claim tokens present in evidence. Coverage below a supplied threshold is flagged. This is lexical grounding screening only: overlap does not prove truth, low overlap does not prove hallucination, and the service does not retrieve or validate evidence.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["claims","minimum_coverage_fraction"],"additionalProperties":false,"properties":{"claims":{"type":"array","minItems":1,"maxItems":5000,"items":{"type":"object","required":["claim_id","claim_text","evidence_texts"],"additionalProperties":false,"properties":{"claim_id":{"type":"string","minLength":1,"maxLength":128},"claim_text":{"type":"string","minLength":1,"maxLength":20000},"evidence_texts":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":50000}}}}},"minimum_coverage_fraction":{"type":"number","minimum":0,"maximum":1}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/sycophancy-detect":{"post":{"operationId":"aialignwerk_sycophancy_detect","summary":"Measures whether a response becomes more lexically aligned with a supplied leading position.","description":"Compares term-frequency cosine similarity between a leading user position and paired independent/conditioned responses, then reports the positive similarity shift. It is a reproducible surface-form signal, not proof of agreement, truthfulness, motive or sycophancy; paraphrases and legitimate corrections can evade or trigger it.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scenarios","shift_threshold"],"additionalProperties":false,"properties":{"scenarios":{"type":"array","minItems":1,"maxItems":5000,"items":{"type":"object","required":["scenario_id","leading_position","independent_response","conditioned_response"],"additionalProperties":false,"properties":{"scenario_id":{"type":"string","minLength":1,"maxLength":128},"leading_position":{"type":"string","minLength":1,"maxLength":20000},"independent_response":{"type":"string","minLength":1,"maxLength":50000},"conditioned_response":{"type":"string","minLength":1,"maxLength":50000}}}},"shift_threshold":{"type":"number","minimum":0,"maximum":1}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/goal-drift":{"post":{"operationId":"aialignwerk_goal_drift","summary":"Quantifies change between supplied initial and current goal-weight vectors.","description":"Aligns caller-labeled dimensions, computes cosine similarity and a normalized L1 difference, and flags drift against a supplied cosine threshold. It does not infer goals from behavior, decide which goal is correct or detect deception; results depend entirely on the supplied vector representation.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["dimensions","minimum_cosine_similarity"],"additionalProperties":false,"properties":{"dimensions":{"type":"array","minItems":1,"maxItems":10000,"items":{"type":"object","required":["name","initial_weight","current_weight"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":128},"initial_weight":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"current_weight":{"type":"number","minimum":-1000000000000,"maximum":1000000000000}}}},"minimum_cosine_similarity":{"type":"number","minimum":-1,"maximum":1}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/jailbreak-defense":{"post":{"operationId":"aialignwerk_jailbreak_defense","summary":"Screens a supplied prompt for common instruction-bypass and secret-request patterns.","description":"Applies a small fixed set of defensive regular-expression categories and returns category names, a bounded risk score and a review recommendation. It does not execute, transform or forward the prompt. Pattern matching is incomplete and can produce false positives; it should be one signal in layered controls, not the sole access decision.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt","review_threshold","block_threshold"],"additionalProperties":false,"properties":{"prompt":{"type":"string","minLength":1,"maxLength":100000},"review_threshold":{"type":"number","minimum":0,"maximum":1},"block_threshold":{"type":"number","minimum":0,"maximum":1}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/resource-hog":{"post":{"operationId":"aialignwerk_resource_hog","summary":"Compares supplied agent resource usage with explicit per-agent budgets.","description":"Divides observed CPU, memory-time, network, tool-call and wall-time usage by caller-supplied budgets, reports exceeded dimensions and ranks observations by the maximum ratio. It does not collect telemetry, infer intent, identify inefficient algorithms or terminate an agent.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["budgets","observations"],"additionalProperties":false,"properties":{"budgets":{"type":"object","required":["cpu_seconds","memory_gb_seconds","network_mb","tool_calls","wall_seconds"],"additionalProperties":false,"properties":{"cpu_seconds":{"type":"number","minimum":0.000001,"maximum":1000000000000000},"memory_gb_seconds":{"type":"number","minimum":0.000001,"maximum":1000000000000000000},"network_mb":{"type":"number","minimum":0.000001,"maximum":1000000000000000},"tool_calls":{"type":"number","minimum":0.000001,"maximum":1000000000000},"wall_seconds":{"type":"number","minimum":0.000001,"maximum":1000000000000000}}},"observations":{"type":"array","minItems":1,"maxItems":100000,"items":{"type":"object","required":["agent_id","cpu_seconds","memory_gb_seconds","network_mb","tool_calls","wall_seconds"],"additionalProperties":false,"properties":{"agent_id":{"type":"string","minLength":1,"maxLength":128},"cpu_seconds":{"type":"number","minimum":0,"maximum":1000000000000000},"memory_gb_seconds":{"type":"number","minimum":0,"maximum":1000000000000000000},"network_mb":{"type":"number","minimum":0,"maximum":1000000000000000},"tool_calls":{"type":"integer","minimum":0,"maximum":1000000000000},"wall_seconds":{"type":"number","minimum":0,"maximum":1000000000000000}}}}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/bias-audit":{"post":{"operationId":"aialignwerk_bias_audit","summary":"Computes aggregate outcome-rate disparities across caller-supplied groups.","description":"Calculates each group positive-outcome rate, compares it with an explicit or automatically selected reference group, and reports rate differences and selection-rate ratios. Aggregate disparity metrics do not establish discrimination, fairness, causation or legal compliance and can conceal intersectional or sampling effects.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["groups"],"additionalProperties":false,"properties":{"groups":{"type":"array","minItems":2,"maxItems":1000,"items":{"type":"object","required":["group_id","total_count","positive_count"],"additionalProperties":false,"properties":{"group_id":{"type":"string","minLength":1,"maxLength":128},"total_count":{"type":"integer","minimum":1,"maximum":1000000000},"positive_count":{"type":"integer","minimum":0,"maximum":1000000000}}}},"reference_group_id":{"type":"string","minLength":1,"maxLength":128},"minimum_selection_rate_ratio":{"type":"number","minimum":0,"maximum":1}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/capability-eval":{"post":{"operationId":"aialignwerk_capability_eval","summary":"Aggregates supplied capability-test outcomes by category and overall.","description":"Computes weighted pass rates and weighted scores from caller-labeled test outcomes, with deterministic category summaries. It does not run tests, validate labels, measure untested capabilities or establish deployment safety; the result is only as representative as the supplied evaluation set.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["test_cases"],"additionalProperties":false,"properties":{"test_cases":{"type":"array","minItems":1,"maxItems":100000,"items":{"type":"object","required":["case_id","category","passed","score","weight"],"additionalProperties":false,"properties":{"case_id":{"type":"string","minLength":1,"maxLength":128},"category":{"type":"string","minLength":1,"maxLength":128},"passed":{"type":"boolean"},"score":{"type":"number","minimum":0,"maximum":1},"weight":{"type":"number","minimum":0.000001,"maximum":1000000}}}}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/agent-collusion":{"post":{"operationId":"aialignwerk_agent_collusion","summary":"Measures pairwise action coordination using observed agreement and Cohen-style kappa.","description":"Requires the same agents in each supplied round, computes each pair’s observed action agreement, expected agreement from marginal action frequencies and chance-corrected kappa, then flags high positive agreement against a supplied threshold. Coordination can be benign or task-driven; this metric does not prove communication, intent or collusion.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rounds","kappa_threshold"],"additionalProperties":false,"properties":{"rounds":{"type":"array","minItems":2,"maxItems":10000,"items":{"type":"object","required":["round_id","actions"],"additionalProperties":false,"properties":{"round_id":{"type":"string","minLength":1,"maxLength":128},"actions":{"type":"array","minItems":2,"maxItems":50,"items":{"type":"object","required":["agent_id","action"],"additionalProperties":false,"properties":{"agent_id":{"type":"string","minLength":1,"maxLength":128},"action":{"type":"string","minLength":1,"maxLength":128}}}}}}},"kappa_threshold":{"type":"number","minimum":-1,"maximum":1}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/memory-sanitize":{"post":{"operationId":"aialignwerk_memory_sanitize","summary":"Redacts common credential and personal-data patterns from supplied memory text.","description":"Replaces private-key blocks, credential assignments, email addresses, Luhn-valid payment-card candidates, IPv4 addresses and phone-like digit strings, returning only sanitized text and per-category counts. The request archive stores only input field names and the result archive stores only this method via the endpoint factory. Pattern redaction is incomplete: it cannot identify every secret, name, address or contextual identifier and must not be treated as irreversible anonymization.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"additionalProperties":false,"properties":{"text":{"type":"string","minLength":1,"maxLength":200000},"replacement_style":{"type":"string","enum":["typed","generic"]}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/confidence-calib":{"post":{"operationId":"aialignwerk_confidence_calib","summary":"Calculates Brier score and binned calibration error for supplied predictions.","description":"Compares scalar confidence with binary correctness, calculates mean squared Brier loss, partitions confidence into caller-selected equal-width bins and reports expected and maximum calibration error. It does not validate labels, correct class imbalance or prove calibration beyond the supplied sample.","tags":["aialignwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["predictions"],"additionalProperties":false,"properties":{"predictions":{"type":"array","minItems":1,"maxItems":100000,"items":{"type":"object","required":["prediction_id","confidence","correct"],"additionalProperties":false,"properties":{"prediction_id":{"type":"string","minLength":1,"maxLength":128},"confidence":{"type":"number","minimum":0,"maximum":1},"correct":{"type":"boolean"}}}},"bin_count":{"type":"integer","minimum":2,"maximum":100}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}}},"components":{"schemas":{"PaymentRequired":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}}}}},"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 Zahlungsnachweis"}}}}