Skip to main content

Cloudflare/clairic

@swamp/cloudflare/clairicv2026.10.27.1· AGPL-3.0-or-later· 1d agoBEHAVIORS
01README

Cloudflare Clairic extraction model on Workers AI: typed values extracted from text and images, null when undetermined

02Release Notes
  • Added: extraction
03Behaviors1
@swamp/cloudflare/clairic/extractionv2026.10.27.1extraction.ts

Global Arguments

ArgumentTypeDescription
model?enumClairic model that extracts the fields.
fn extract(state?: string, fields: preprocess, images?: preprocess, referenceDate?: iso.date, includeQuantiles?: boolean, returnStateText?: boolean, name?: string)
Extract typed fields from text and images; stores each value (null when undetermined) with its confidence
ArgumentTypeDescription
state?stringThe text to read and extract from. May be empty only when images are sent. Text answers are spans of this string.
fieldspreprocessMap of field name to {type, instructions, ...}. Pass with --input fields:json='{...}' or --input fields=@fields.json.
images?preprocessUp to 4 embedded PNG, JPEG, or WebP images placed before the state, as base64 data URLs or {"content_type","base64"} objects. Pass with --input images=@images.json. Remote URLs are not accepted.
referenceDate?iso.dateISO date (YYYY-MM-DD) that anchors dates written without a year.
includeQuantiles?booleanAdd 99 percentiles to estimate answers.
returnStateText?booleanStore the text that answer spans index into as stateText.
name?stringSuffix for the stored resource instance, so several extractions can coexist. Defaults to 'latest'.

Resources

extraction(infinite)— Typed answers for every field from the `extract` method
04Stats
A
100 / 100
Downloads
0
Archive size
19.4 KB
Verified by Swamp
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
05Platforms
06Labels