Catalog/llm-output-diff

LLM

Diff two LLM outputs API

Diffs two LLM outputs line-by-line and at the token level: a line-similarity ratio, added/removed lines, change count, and Jaccard token overlap — to detect regressions or measure prompt-change drift. Answers 'how different are these two model responses?', 'did my prompt change alter the output?'.

Price$0.02per request
MethodPOST
Route/v1/llm/output-diff
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
llmdiffcompareoutputregressiondriftsimilarityagent
API URLhttps://x402.hexl.dev/v1/llm/output-diff
Integration docs
Example request
{
  "a": "line1\nline2\nline3",
  "b": "line1\nlineX\nline3"
}
Example response
{
  "identical": false,
  "similarity": 0.667,
  "added": [
    "lineX"
  ],
  "removed": [
    "line2"
  ],
  "changedLines": 1,
  "jaccardTokens": 0.5
}
Input schema
{
  "type": "object",
  "required": [
    "a",
    "b"
  ],
  "properties": {
    "a": {
      "type": "string",
      "examples": [
        "line1\nline2\nline3"
      ]
    },
    "b": {
      "type": "string",
      "examples": [
        "line1\nlineX\nline3"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}