Locate quoted text in a source with exact offsets, or classify it as normalized, elided, paraphrased or absent

$0.005 USDC per call · Agent infrastructure · POST /api/v1/citation-span · Id 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, then bracket-ellipsis elisions, then flags a probable paraphrase by word overlap, else not-present. Does not judge whether the source is true or the quote is representative; a paraphrase is reported with its nearest span but never counted as a match.

What you get

Catches fabricated and paraphrased citations before they reach a user. 50 quotes per $0.005 call.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/citation-span. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/citation-span \
  -H 'content-type: application/json' \
  -d '{"source":"The committee said the “pilot” would run for six months — ending in March — before a review.","quotes":[{"id":"q1","text":"the \"pilot\" would run for six months - ending in March"},{"id":"q2","text":"the pilot will last half a year"}]}'

Input

FieldTypeRequiredDescription
sourcestring; length 1..100000yesText the quotes are claimed to come from.
quotesarray<object>; max 50 itemsyesUp to 50 quotes, 40000 characters in total.
ignoreCasebooleannoAlso tolerate case differences (reported as a normalization). Default false.
toleratearray<string; one of "whitespace", "quotes", "dashes", "ellipsis", "invisible", "unicode">; max 6 itemsnoNormalizations that still count as a match. Default: all six.
exactOnlybooleannoCount only byte-identical matches as pass; normalized matches become fail. Default false.
minLengthinteger; 1..200noQuotes shorter than this many characters (after trimming quote marks) are too-short and give unknown. Default 8.

Example request body

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

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
resultsarray<object>; max 50 itemsno
countsobjectno
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the context-evidence-kit package.

Machine-readable