[{"data":1,"prerenderedAt":841,"buildId":842},["ShallowReactive",2],{"\u002Fai":3,"\u002Fai-surround":566,"navigation":574},{"id":4,"title":5,"body":6,"description":557,"extension":558,"meta":559,"navigation":560,"path":562,"seo":563,"stem":564,"__hash__":565},"docs\u002F5.ai\u002F1.index.md","AI steps",{"type":7,"value":8,"toc":545},"minimark",[9,19,113,125,148,153,160,226,238,242,247,305,311,315,323,331,335,342,353,403,408,419,423,434,441,445,448,512,518,527,531,538],[10,11,12,13,18],"p",{},"AI steps send a file's text or image to an AI model through an ",[14,15,17],"a",{"href":16},"\u002Fconnections\u002Fai-providers","AI connection"," and use its answer in the workflow.",[20,21,22,53,64,84,95,101,107],"ul",{},[23,24,25,29,30,34,35,38,39,42,43,47,48,52],"li",{},[26,27,28],"strong",{},"AI classify"," puts a file in one of the categories you define, such as ",[31,32,33],"em",{},"receipt",", ",[31,36,37],{},"screenshot"," or ",[31,40,41],{},"document",". A ",[14,44,46],{"href":45},"\u002Freference\u002Fsteps#switch","Switch"," on its ",[49,50,51],"code",{},"category"," can then route the file.",[23,54,55,58,59,63],{},[26,56,57],{},"AI extract"," reads the values you ask for, such as a receipt's total and date, so later steps can put them in ",[14,60,62],{"href":61},"\u002Flibrary\u002Ffields","fields",", names or tags.",[23,65,66,69,70,73,74,34,77,38,80,83],{},[26,67,68],{},"AI detect"," answers a yes-or-no question, such as ",[31,71,72],{},"Is this a receipt?",", and continues on ",[26,75,76],{},"Yes",[26,78,79],{},"No",[26,81,82],{},"Unsure",".",[23,85,86,89,90,94],{},[26,87,88],{},"AI suggest tags"," picks fitting tags from yours, and can suggest new ones when none fit, for an ",[14,91,93],{"href":92},"\u002Freference\u002Fsteps#add-tags","Add tags"," step to add.",[23,96,97,100],{},[26,98,99],{},"AI describe image"," writes a description or alt text for an image.",[23,102,103,106],{},[26,104,105],{},"AI summarize"," summarizes text or an image in a sentence, a paragraph or bullet points.",[23,108,109,112],{},[26,110,111],{},"AI generate text"," writes what you ask for, such as a file name or a note for a notification.",[10,114,115,116,120,121,124],{},"To read the words in an image without sending it to an AI service, use ",[14,117,119],{"href":118},"\u002Focr","OCR",": its text goes straight into any AI step's ",[26,122,123],{},"Text",", so a text-only model is enough.",[10,126,127,128,132,133,137,138,142,143,147],{},"Classify and extract are described in ",[14,129,131],{"href":130},"\u002Fai\u002Fclassify-and-extract","AI classify and extract",", detect and suggest tags in ",[14,134,136],{"href":135},"\u002Fai\u002Fdetect-and-tag","AI detect and suggest tags",", and the writing steps in ",[14,139,141],{"href":140},"\u002Fai\u002Fdescribe-and-write","AI describe, summarize and write",". Every AI step only answers or writes; later steps act on what it returns. To see them working together, start from one of the ",[14,144,146],{"href":145},"\u002Fautomations\u002Ftemplates#built-in-templates","workflow templates"," for screenshots, receipts, image descriptions and upload summaries.",[149,150,152],"h2",{"id":151},"decision-models-and-language-models","Decision models and language models",[10,154,155,156,159],{},"AI classify, AI detect and AI suggest tags can ask two kinds of model, chosen with their ",[26,157,158],{},"Method"," setting:",[161,162,163,178],"table",{},[164,165,166],"thead",{},[167,168,169,172,175],"tr",{},[170,171],"th",{},[170,173,174],{},"Decision model",[170,176,177],{},"Language model",[179,180,181,193,204,215],"tbody",{},[167,182,183,187,190],{},[184,185,186],"td",{},"Answers with",[184,188,189],{},"A probability for every category, for yes, or for each tag",[184,191,192],{},"A JSON answer with the choice, an estimated confidence and, for classify and detect, a reason",[167,194,195,198,201],{},[184,196,197],{},"Confidence",[184,199,200],{},"Measured: the chosen category's probability",[184,202,203],{},"The model's own estimate",[167,205,206,209,212],{},[184,207,208],{},"Speed and cost",[184,210,211],{},"Usually well under a second, billed for input only",[184,213,214],{},"Slower, billed for input and output",[167,216,217,220,223],{},[184,218,219],{},"Connections",[184,221,222],{},"Those that offer decision models: OpenAI, Vercel AI Gateway, OpenRouter, Cloudflare Workers AI, llama.cpp",[184,224,225],{},"Every AI connection, including Ollama",[10,227,228,229,231,232,234,235,237],{},"Decision models are made for picking answers from a fixed list, so new AI classify steps and all AI detect steps use them by default. Classify steps saved before ",[26,230,158],{}," existed keep using language models. AI suggest tags uses a language model by default, because only a language model can suggest new tags or pick from hundreds of them; a decision model asks about each tag you choose, up to 50. When a step's connection doesn't offer decision models, the editor says so: choose another connection or set ",[26,233,158],{}," to ",[26,236,177],{},". Tessra never switches by itself.",[149,239,241],{"id":240},"extraction-models-and-language-models","Extraction models and language models",[10,243,244,245,159],{},"AI extract can also ask two kinds of model, chosen with its ",[26,246,158],{},[161,248,249,260],{},[164,250,251],{},[167,252,253,255,258],{},[170,254],{},[170,256,257],{},"Extraction model",[170,259,177],{},[179,261,262,272,286,296],{},[167,263,264,266,269],{},[184,265,186],{},[184,267,268],{},"Each value, with a confidence, or empty when the content doesn't state it",[184,270,271],{},"A JSON answer with each value",[167,273,274,276,283],{},[184,275,197],{},[184,277,278,279,282],{},"Measured, per value, in the step's ",[49,280,281],{},"confidence"," output",[184,284,285],{},"Not reported",[167,287,288,290,293],{},[184,289,208],{},[184,291,292],{},"Billed for input only",[184,294,295],{},"Billed for input and output",[167,297,298,300,303],{},[184,299,219],{},[184,301,302],{},"Those that offer extraction models: Cloudflare Workers AI, OpenRouter",[184,304,225],{},[10,306,307,308,310],{},"New AI extract steps use extraction models; steps saved before ",[26,309,158],{}," existed keep using language models. As with classify, the editor flags a connection that doesn't offer extraction models, and Tessra never switches by itself.",[149,312,314],{"id":313},"where-your-files-go","Where your files go",[10,316,317,318,322],{},"A step sends its text or image to the address of its connection, and only there. A model running on your own machine, such as one served by ",[14,319,321],{"href":320},"\u002Fconnections\u002Fai-providers#ollama","Ollama",", keeps files on your network. A hosted service or gateway receives what the step sends and handles it under its own terms. The connection dialog says what kind of service a preset usually is, but that's only a description: the address you enter decides where data goes.",[10,324,325,326,330],{},"AI steps are marked as sending file content to an outside service and as possibly costing money. A ",[14,327,329],{"href":328},"\u002Fautomations\u002Ftesting","test run"," runs them only when you allow sending files to outside services.",[149,332,334],{"id":333},"how-answers-are-checked","How answers are checked",[10,336,337,338,341],{},"A decision model's answer must name one of the options the step asked about, with probabilities from 0 to 1; anything else fails the step with ",[49,339,340],{},"ai_invalid_output",". An extraction model's values must have the type each value asked for, and confidences from 0 to 1; anything else fails the step the same way.",[10,343,344,345,348,349,352],{},"Every AI step that uses a language model to answer, rather than to write, asks for a JSON answer in a fixed shape. AI describe image, AI summarize and AI generate text take the model's text as it is, and record ",[49,346,347],{},"outputMode"," as ",[49,350,351],{},"text",". Tessra uses the strongest way the model offers to get it:",[161,354,355,368],{},[164,356,357],{},[167,358,359,362,365],{},[170,360,361],{},"Output",[170,363,364],{},"Used when",[170,366,367],{},"How",[179,369,370,381,392],{},[167,371,372,375,378],{},[184,373,374],{},"Structured output",[184,376,377],{},"The model supports structured output.",[184,379,380],{},"The provider holds the answer to the step's JSON Schema.",[167,382,383,386,389],{},[184,384,385],{},"JSON mode",[184,387,388],{},"The model supports JSON mode but not structured output.",[184,390,391],{},"The provider guarantees JSON; the schema is added to the instructions.",[167,393,394,397,400],{},[184,395,396],{},"Prompted",[184,398,399],{},"Neither is supported or known.",[184,401,402],{},"The schema is added to the instructions, and the answer is read from the text, also from a Markdown code block.",[10,404,405,406,83],{},"Whatever the provider promises, Tessra checks every answer against the schema. When it doesn't fit, Tessra asks the model once more with the problems listed. A second bad answer fails the step with ",[49,407,340],{},[10,409,410,411,414,415,418],{},"Turn on ",[26,412,413],{},"Require structured output"," on a step to refuse the weaker ways: the step then fails with ",[49,416,417],{},"ai_model_missing_feature"," when the model is known not to support structured output.",[149,420,422],{"id":421},"models","Models",[10,424,425,426,429,430,433],{},"A step either ",[26,427,428],{},"follows the connection's default model"," (leave ",[26,431,432],{},"Model"," empty) or names its own. A connection has one default for language models and, when it offers them, one for decision models and one for extraction models; a step follows the one for its method. Following the default means changing the connection's default changes those steps; the connection form lists the workflows that would change before you save. The step's picker names the model the default currently resolves to. A step that names a model keeps it.",[10,435,436,437,440],{},"Each run records the model the step asked for, whether it came from the step or the connection, the model the provider says answered, which provider served it behind a gateway when the gateway says so, the output method, the generation settings, and the token counts. You see these in the run's details under the step's ",[49,438,439],{},"ai"," output.",[149,442,444],{"id":443},"model-features","Model features",[10,446,447],{},"Tessra keeps what it knows about each model of a connection, and where that came from:",[161,449,450,460],{},[164,451,452],{},[167,453,454,457],{},[170,455,456],{},"Source",[170,458,459],{},"Means",[179,461,462,470,478,489,504],{},[167,463,464,467],{},[184,465,466],{},"Reported by the provider",[184,468,469],{},"The provider's model list says so, as OpenRouter and Vercel AI Gateway do.",[167,471,472,475],{},[184,473,474],{},"Guessed from the name",[184,476,477],{},"Tessra recognizes the model's name, such as a vision model. Guesses can be wrong.",[167,479,480,483],{},[184,481,482],{},"Checked with a request",[184,484,485,488],{},[26,486,487],{},"Check with test requests"," sent a small request using the feature.",[167,490,491,494],{},[184,492,493],{},"Set by you",[184,495,496,497,38,500,503],{},"You chose ",[31,498,499],{},"Supported",[31,501,502],{},"Not supported",". This wins over everything else.",[167,505,506,509],{},[184,507,508],{},"Not known",[184,510,511],{},"Nothing says either way. Tessra tries the feature and reports what happened.",[10,513,514,515,517],{},"The features are image input, structured output, JSON mode and temperature. A step that sends an image fails with ",[49,516,417],{}," before sending anything when the model is known not to take images. A temperature the model doesn't take is left out of the request and noted in the run.",[10,519,520,521,523,524,526],{},"The model picker shows the selected model's features. To override one or ",[26,522,487],{},", open the connection's page and use the menu next to the model under ",[26,525,422],{},". The check sends a few small requests, which count towards the connection's usage.",[149,528,530],{"id":529},"tokens-and-limits","Tokens and limits",[10,532,533,534,537],{},"Before each request, Tessra reserves an estimate of its tokens against the connection's daily token limit: the request's characters divided by three, about 1,600 tokens per image, plus the most the answer may use (64 tokens for a decision model, 256 for an extraction model). After the answer it charges what the provider reports instead. The estimate is rough: languages other than English, code and dense images can use more, and a request whose result is unclear stays charged at the estimate. Set ",[26,535,536],{},"Tokens per day"," under the connection's usage limits to cap spending.",[10,539,540,541,83],{},"Server administrators set the upper bounds every step and connection must stay within; see ",[14,542,544],{"href":543},"\u002Fai\u002Fclassify-and-extract#server-limits","Server limits",{"title":546,"searchDepth":547,"depth":548,"links":549},"",2,3,[550,551,552,553,554,555,556],{"id":151,"depth":547,"text":152},{"id":240,"depth":547,"text":241},{"id":313,"depth":547,"text":314},{"id":333,"depth":547,"text":334},{"id":421,"depth":547,"text":422},{"id":443,"depth":547,"text":444},{"id":529,"depth":547,"text":530},"Sort and read files with an AI model you choose, from a model on your own machine to a hosted service.","md",{},{"title":561},"Overview","\u002Fai",{"title":5,"description":557},"5.ai\u002F1.index","KFeUpFPGELzoiw2dsGlipFb5tl_ODX0fvq7ncgPK5B8",[567,571],{"title":568,"path":16,"stem":569,"description":570,"children":-1},"AI providers","4.connections\u002F2.ai-providers","Connect Tessra to a language model, from Ollama on your own machine to OpenAI, Anthropic, Gemini and gateways such as OpenRouter.",{"title":131,"path":130,"stem":572,"description":573,"children":-1},"5.ai\u002F2.classify-and-extract","Settings, outputs and examples for the AI classify and AI extract steps, and the limits administrators set.",[575,595,633,675,682,692,701,744,779,793,809],{"title":576,"path":577,"stem":578,"children":579,"icon":594},"Getting started","\u002Fgetting-started","1.getting-started\u002F1.index",[580,582,586,590],{"title":581,"path":577,"stem":578},"Introduction",{"title":583,"path":584,"stem":585},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":587,"path":588,"stem":589},"Configure ShareX","\u002Fgetting-started\u002Fsharex","1.getting-started\u002F3.sharex",{"title":591,"path":592,"stem":593},"Updating Tessra","\u002Fgetting-started\u002Fupdating","1.getting-started\u002F4.updating","i-lucide-rocket",{"title":596,"icon":597,"path":598,"stem":599,"children":600,"page":632},"Library","i-lucide-folder","\u002Flibrary","2.library",[601,605,609,613,617,620,624,628],{"title":602,"path":603,"stem":604},"Uploading files","\u002Flibrary\u002Fuploading","2.library\u002F1.uploading",{"title":606,"path":607,"stem":608},"Files and folders","\u002Flibrary\u002Ffiles-and-folders","2.library\u002F2.files-and-folders",{"title":610,"path":611,"stem":612},"Sharing files","\u002Flibrary\u002Fsharing","2.library\u002F3.sharing",{"title":614,"path":615,"stem":616},"Tags","\u002Flibrary\u002Ftags","2.library\u002F4.tags",{"title":618,"path":61,"stem":619},"Fields","2.library\u002F5.fields",{"title":621,"path":622,"stem":623},"Attachments","\u002Flibrary\u002Fattachments","2.library\u002F6.attachments",{"title":625,"path":626,"stem":627},"Search","\u002Flibrary\u002Fsearch","2.library\u002F7.search",{"title":629,"path":630,"stem":631},"Trash and recovery","\u002Flibrary\u002Ftrash","2.library\u002F8.trash",false,{"title":634,"path":635,"stem":636,"children":637,"icon":674},"Automations","\u002Fautomations","3.automations\u002F01.index",[638,639,643,647,651,655,659,662,666,670],{"title":561,"path":635,"stem":636},{"title":640,"path":641,"stem":642},"Your first workflow","\u002Fautomations\u002Ffirst-workflow","3.automations\u002F02.first-workflow",{"title":644,"path":645,"stem":646},"The editor","\u002Fautomations\u002Feditor","3.automations\u002F03.editor",{"title":648,"path":649,"stem":650},"Values and templates","\u002Fautomations\u002Fvalues","3.automations\u002F04.values",{"title":652,"path":653,"stem":654},"Conditions and branching","\u002Fautomations\u002Fbranching","3.automations\u002F05.branching",{"title":656,"path":657,"stem":658},"Upload intake","\u002Fautomations\u002Fintake","3.automations\u002F06.intake",{"title":660,"path":328,"stem":661},"Testing","3.automations\u002F07.testing",{"title":663,"path":664,"stem":665},"Runs and history","\u002Fautomations\u002Fruns","3.automations\u002F08.runs",{"title":667,"path":668,"stem":669},"Quarantine and failures","\u002Fautomations\u002Fquarantine","3.automations\u002F09.quarantine",{"title":671,"path":672,"stem":673},"Workflow templates","\u002Fautomations\u002Ftemplates","3.automations\u002F10.templates","i-lucide-workflow",{"title":219,"path":676,"stem":677,"children":678,"icon":681},"\u002Fconnections","4.connections\u002F1.index",[679,680],{"title":561,"path":676,"stem":677},{"title":568,"path":16,"stem":569},"i-lucide-plug",{"title":683,"path":562,"stem":564,"children":684,"icon":691},"AI",[685,686,687,689],{"title":561,"path":562,"stem":564},{"title":131,"path":130,"stem":572},{"title":141,"path":140,"stem":688},"5.ai\u002F3.describe-and-write",{"title":136,"path":135,"stem":690},"5.ai\u002F4.detect-and-tag","i-lucide-sparkles",{"title":119,"path":118,"stem":693,"children":694,"icon":700},"5.ocr\u002F1.index",[695,696],{"title":561,"path":118,"stem":693},{"title":697,"path":698,"stem":699},"Setup","\u002Focr\u002Fsetup","5.ocr\u002F2.setup","i-lucide-scan-text",{"title":702,"path":703,"stem":704,"children":705,"icon":743},"Self-hosting","\u002Fself-hosting","6.self-hosting\u002F1.index",[706,707,711,715,719,723,727,731,735,739],{"title":561,"path":703,"stem":704},{"title":708,"path":709,"stem":710},"Troubleshooting","\u002Fself-hosting\u002Ftroubleshooting","6.self-hosting\u002F10.troubleshooting",{"title":712,"path":713,"stem":714},"Configuration","\u002Fself-hosting\u002Fconfiguration","6.self-hosting\u002F2.configuration",{"title":716,"path":717,"stem":718},"Reverse proxies and HTTPS","\u002Fself-hosting\u002Freverse-proxy","6.self-hosting\u002F3.reverse-proxy",{"title":720,"path":721,"stem":722},"DigitalOcean","\u002Fself-hosting\u002Fdigitalocean","6.self-hosting\u002F4.digitalocean",{"title":724,"path":725,"stem":726},"Backups and restoration","\u002Fself-hosting\u002Fbackups","6.self-hosting\u002F5.backups",{"title":728,"path":729,"stem":730},"Users and roles","\u002Fself-hosting\u002Fusers","6.self-hosting\u002F6.users",{"title":732,"path":733,"stem":734},"Single sign-on","\u002Fself-hosting\u002Fsingle-sign-on","6.self-hosting\u002F7.single-sign-on",{"title":736,"path":737,"stem":738},"Two-factor and passkeys","\u002Fself-hosting\u002Ftwo-factor-and-passkeys","6.self-hosting\u002F8.two-factor-and-passkeys",{"title":740,"path":741,"stem":742},"Importing","\u002Fself-hosting\u002Fimporting","6.self-hosting\u002F9.importing","i-lucide-server",{"title":745,"path":746,"stem":747,"children":748,"icon":778},"Guides","\u002Fguides","7.guides\u002F1.index",[749,750,754,758,762,766,770,774],{"title":561,"path":746,"stem":747},{"title":751,"path":752,"stem":753},"Optimize ShareX uploads","\u002Fguides\u002Fcompress-uploads","7.guides\u002F2.compress-uploads",{"title":755,"path":756,"stem":757},"Send Discord notifications","\u002Fguides\u002Fdiscord-notifications","7.guides\u002F3.discord-notifications",{"title":759,"path":760,"stem":761},"Organize screenshots with AI","\u002Fguides\u002Fcategorize-screenshots","7.guides\u002F4.categorize-screenshots",{"title":763,"path":764,"stem":765},"Extract receipts with AI","\u002Fguides\u002Fextract-receipts","7.guides\u002F5.extract-receipts",{"title":767,"path":768,"stem":769},"Name screenshots with AI","\u002Fguides\u002Fai-file-names","7.guides\u002F6.ai-file-names",{"title":771,"path":772,"stem":773},"Run AI locally with Ollama","\u002Fguides\u002Flocal-ai-ollama","7.guides\u002F7.local-ai-ollama",{"title":775,"path":776,"stem":777},"Make screenshots searchable","\u002Fguides\u002Fsearchable-screenshots","7.guides\u002F8.searchable-screenshots","i-lucide-book-open",{"title":780,"icon":781,"path":782,"stem":783,"children":784,"page":632},"Reference","i-lucide-library","\u002Freference","8.reference",[785,789],{"title":786,"path":787,"stem":788},"Step reference","\u002Freference\u002Fsteps","8.reference\u002F1.steps",{"title":790,"path":791,"stem":792},"Limits and errors","\u002Freference\u002Flimits","8.reference\u002F2.limits",{"title":794,"path":795,"stem":796,"children":797,"icon":808},"Development","\u002Fdevelopment","9.development\u002F1.index",[798,800,804],{"title":799,"path":795,"stem":796},"Local development",{"title":801,"path":802,"stem":803},"Plugin development","\u002Fdevelopment\u002Fplugins","9.development\u002F2.plugins",{"title":805,"path":806,"stem":807},"Writing documentation","\u002Fdevelopment\u002Fdocumentation","9.development\u002F3.documentation","i-lucide-code",{"title":810,"path":811,"stem":812,"children":813,"icon":840},"Comparisons","\u002Fcomparisons","99.comparisons\u002F1.index",[814,816,820,824,828,832,836],{"title":815,"path":811,"stem":812},"Comparing Tessra",{"title":817,"path":818,"stem":819},"Tessra and Zipline","\u002Fcomparisons\u002Fzipline","99.comparisons\u002F2.zipline",{"title":821,"path":822,"stem":823},"Tessra and XBackBone","\u002Fcomparisons\u002Fxbackbone","99.comparisons\u002F3.xbackbone",{"title":825,"path":826,"stem":827},"Tessra and chibisafe","\u002Fcomparisons\u002Fchibisafe","99.comparisons\u002F4.chibisafe",{"title":829,"path":830,"stem":831},"Tessra and Slink","\u002Fcomparisons\u002Fslink","99.comparisons\u002F5.slink",{"title":833,"path":834,"stem":835},"Tessra and Pingvin Share","\u002Fcomparisons\u002Fpingvin-share","99.comparisons\u002F6.pingvin-share",{"title":837,"path":838,"stem":839},"Tessra and PicoShare","\u002Fcomparisons\u002Fpicoshare","99.comparisons\u002F7.picoshare","i-lucide-scale",1796301179918,"7456fe0d-763d-4d83-b714-ffd4ca3197d2"]