Skip to content
Fourohtwo

agents.writerslogic.com/api/v1/citation-span

Finds each quote an agent attributes to a source text and returns where it sits: exact offsets in UTF-16, code points, UTF-8 bytes and graphemes, so the span slices back to the matched text. Tries an exact match, then a match tolerant of whitespace, curly vs straight quotes, dash types, ellipses, invisible characters and Unicode forms (NFC/NFD, ligatures), naming which normalizations were needed,

BaseAnswering
POSThttps://agents.writerslogic.com/api/v1/citation-span

Uptime100% of 3 checks 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/citation-span", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"quotes":[{"id":"q1","text":"the \"pilot\" would run for six months - ending in March"},{"id":"q2","text":"the pilot will last half a year"}],"source":"The committee said the “pilot” would run for six months — ending in March — before a review."}),
});
console.log(await res.json());

Example input

{
  "quotes": [
    {
      "id": "q1",
      "text": "the \"pilot\" would run for six months - ending in March"
    },
    {
      "id": "q2",
      "text": "the pilot will last half a year"
    }
  ],
  "source": "The committee said the “pilot” would run for six months — ending in March — before a review."
}