Build with the API / Your first API request

Your first request

In a few minutes, compare two statements and see the exact commitment that changed. This deterministic request needs no account, wallet, or model key.

1. Start the local service#

From the source repository’s app directory, use Node 24 or later and the prepared data:

npm run build
npm start

The local server prints its address. The default is http://localhost:4173. For an existing deployment, substitute that service’s origin.

2. Compare two claims#

const response = await fetch('/v1/claims/compare', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    a: 'This can improve performance.',
    b: 'This will improve performance.',
  }),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const result = await response.json();
console.log(result.relation, result.differences);

Run this in a client hosted on the same origin as the API. The example below sends that request to this site.

3. Read the result#

Expect different_strength, with “can” and “will” in the differences. basis: "wording_only" means the check identifies a wording change. It has not verified performance or inferred the speaker’s intent. calibrated: false means its scores should not be treated as measured probabilities.

4. Pick your next task#

Try it here

Compare two claims

Sent to this host’s deterministic API. This does not save an analysis or contact a model provider.