{"type":"object","properties":{"model":{"type":"string","pattern":"^(clairic-flash|@cf/cloudflare/clairic-flash)$","default":"clairic-flash","description":"Required. The model selector: \"clairic-flash\"."},"state":{"type":"string","default":"","description":"The text to read and predict from. Must be non-empty unless images or documents are sent. Text answers are spans of this string."},"fields":{"type":"object","description":"Required. Map of field name to a typed field spec. At least one field; no upper limit. Each prompt (state plus fields) must fit in 65,273 input tokens; input is never truncated and oversized requests are rejected. Unknown keys for a field's type are rejected.","minProperties":1,"propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["text","number","compute","date","time","datetime","duration","boolean","enum","object","list","estimate","forecast"],"description":"compute: a number derived from the input. boolean, enum, object: generated answers constrained to that shape."},"instructions":{"type":"string","description":"What the field should contain."},"nullable":{"type":"boolean","default":true,"description":"When false, text, number, boolean, enum and object answers cannot be null. compute requires true."},"unit":{"type":"string","description":"number, compute, duration, list, estimate, forecast. For durations, one of seconds, minutes, hours, days, weeks, months, years (default seconds)."},"integer":{"type":"boolean","description":"number, compute, duration and number lists only."},"decimals":{"type":"integer","minimum":0,"maximum":6,"description":"number, compute, duration and number lists only. Values are rounded half-up."},"knowledge":{"type":"boolean","default":false,"description":"text, number, and text/number lists only. Allows answers from prior knowledge that do not appear in the input. Not combinable with source_only."},"source_only":{"type":"boolean","description":"number, date, time, datetime, and number/date lists only. The answer must be printed in the input and is normalized from the printed text. Not combinable with null_threshold or knowledge."},"minLength":{"type":"integer","minimum":0,"description":"text only."},"maxLength":{"type":"integer","minimum":0,"description":"text only."},"pattern":{"type":"string","description":"text only. Regular expression the answer must match."},"minimum":{"type":"number","description":"number only."},"maximum":{"type":"number","description":"number only."},"exclusiveMinimum":{"type":"number","description":"number only."},"exclusiveMaximum":{"type":"number","description":"number only."},"enum":{"type":"array","minItems":1,"description":"Allowed values. Required for enum fields; optional for text, number and list fields."},"properties":{"type":"object","minProperties":1,"description":"Required for object fields and object list items. Map of property name to a spec whose type is text, number, boolean or enum.","propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$"},"additionalProperties":{"type":"object","properties":{"type":{"type":"string","enum":["text","number","boolean","enum"]}},"required":["type"]}},"items":{"description":"Required for list fields: \"text\", \"number\", \"date\", or an object item spec.","anyOf":[{"type":"string","enum":["text","number","date"]},{"type":"object","title":"Object item","properties":{"type":{"type":"string","enum":["object"]},"properties":{"type":"object","minProperties":1}},"required":["type","properties"]}]},"max_items":{"type":"integer","minimum":0,"description":"List only. Maximum number of items to return."},"min":{"description":"Required for estimate/forecast: a number, or an ISO date for date estimates."},"max":{"description":"Required for estimate/forecast: a number, or an ISO date for date estimates."},"step":{"description":"Estimate grid: a positive number (days for date estimates), or \"month\" / \"year\"."},"scale":{"type":"string","enum":["linear","log"]},"null_threshold":{"type":"number","exclusiveMinimum":0,"maximum":1,"description":"compute, date, time, datetime and duration only. Probability of null above which the value is null (default 0.5)."},"horizon":{"type":"integer","minimum":1,"maximum":64,"description":"Forecast only: number of steps."},"interval":{"type":"string","enum":["step","minute","hour","day","week","month","quarter","year"],"description":"Forecast only."}},"required":["type"]}},"images":{"type":"array","description":"Optional embedded PNG, JPEG or WebP images placed before the state (max 4; 4 MiB each, 8 MiB total decoded across images and documents; request body max 16 MiB). Remote URLs are not accepted.","maxItems":4,"items":{"anyOf":[{"type":"string","title":"Data URL","pattern":"^[Dd][Aa][Tt][Aa]:"},{"type":"object","title":"Base64 image","properties":{"content_type":{"type":"string"},"base64":{"type":"string"},"rotation":{"type":"integer","enum":[0,90,180,270],"description":"Clockwise rotation to apply. Orientation is detected automatically when omitted."}},"required":["content_type","base64"]}]}},"documents":{"type":"array","description":"Optional embedded PDFs (4 MiB each). Rendered pages plus images must total at most 4. Encrypted PDFs are rejected.","maxItems":4,"items":{"anyOf":[{"type":"string","title":"Data URL","pattern":"^[Dd][Aa][Tt][Aa]:[Aa][Pp][Pp][Ll][Ii][Cc][Aa][Tt][Ii][Oo][Nn]/[Pp][Dd][Ff];[Bb][Aa][Ss][Ee]64,"},{"type":"object","title":"Base64 PDF","properties":{"content_type":{"type":"string","enum":["application/pdf"]},"base64":{"type":"string"}},"required":["content_type","base64"]}]}},"reference_date":{"type":"string","description":"ISO date that anchors dates written without a year."},"options":{"type":"object","properties":{"include_quantiles":{"type":"boolean","default":false,"description":"Add 99 percentiles to estimates."},"return_state_text":{"type":"boolean","default":false,"description":"Return the text that spans index into."}}}},"required":["model","fields"]}