agents.writerslogic.com/api/v1/union-branch
Evaluates a JSON value against every branch of a oneOf or anyOf in a caller-supplied JSON Schema 2020-12 (or OpenAPI schema converted to it) and reports which branches match, the exact errors of each branch that fails with the JSON pointer of each offending value, the closest branch, and which branch an OpenAPI `discriminator` points to. For agents debugging why a tool or API payload is rejected w
POST
https://agents.writerslogic.com/api/v1/union-branchUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.writerslogic.com/api/v1/union-branch", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"value":{"card":"4111","iban":"DE89"},"schema":{"oneOf":[{"type":"object","required":["card"],"properties":{"card":{"type":"string"}}},{"type":"object","required":["iban"],"properties":{"iban":{"type":"string"}}}]}}),
});
console.log(await res.json());Example input
{
"value": {
"card": "4111",
"iban": "DE89"
},
"schema": {
"oneOf": [
{
"type": "object",
"required": [
"card"
],
"properties": {
"card": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"iban"
],
"properties": {
"iban": {
"type": "string"
}
}
}
]
}
}