Skip to content

AI steps

Sort and read files with an AI model you choose, from a model on your own machine to a hosted service.

AI steps send a file's text or image to an AI model through an AI connection and use its answer in the workflow.

  • AI classify puts a file in one of the categories you define, such as receipt, screenshot or document. A Switch on its category can then route the file.
  • AI extract reads the values you ask for, such as a receipt's total and date, so later steps can put them in fields, names or tags.
  • AI detect answers a yes-or-no question, such as Is this a receipt?, and continues on Yes, No or Unsure.
  • AI suggest tags picks fitting tags from yours, and can suggest new ones when none fit, for an Add tags step to add.
  • AI describe image writes a description or alt text for an image.
  • AI summarize summarizes text or an image in a sentence, a paragraph or bullet points.
  • AI generate text writes what you ask for, such as a file name or a note for a notification.

To read the words in an image without sending it to an AI service, use OCR: its text goes straight into any AI step's Text, so a text-only model is enough.

Classify and extract are described in AI classify and extract, detect and suggest tags in AI detect and suggest tags, and the writing steps in 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 workflow templates for screenshots, receipts, image descriptions and upload summaries.

Decision models and language models

AI classify, AI detect and AI suggest tags can ask two kinds of model, chosen with their Method setting:

Decision modelLanguage model
Answers withA probability for every category, for yes, or for each tagA JSON answer with the choice, an estimated confidence and, for classify and detect, a reason
ConfidenceMeasured: the chosen category's probabilityThe model's own estimate
Speed and costUsually well under a second, billed for input onlySlower, billed for input and output
ConnectionsThose that offer decision models: OpenAI, Vercel AI Gateway, OpenRouter, Cloudflare Workers AI, llama.cppEvery AI connection, including Ollama

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 Method 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 Method to Language model. Avenvail never switches by itself.

Extraction models and language models

AI extract can also ask two kinds of model, chosen with its Method setting:

Extraction modelLanguage model
Answers withEach value, with a confidence, or empty when the content doesn't state itA JSON answer with each value
ConfidenceMeasured, per value, in the step's confidence outputNot reported
Speed and costBilled for input onlyBilled for input and output
ConnectionsThose that offer extraction models: Cloudflare Workers AI, OpenRouterEvery AI connection, including Ollama

New AI extract steps use extraction models; steps saved before Method existed keep using language models. As with classify, the editor flags a connection that doesn't offer extraction models, and Avenvail never switches by itself.

Where your files go

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 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.

AI steps are marked as sending file content to an outside service and as possibly costing money. A test run runs them only when you allow sending files to outside services.

How answers are checked

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 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.

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 outputMode as text. Avenvail uses the strongest way the model offers to get it:

OutputUsed whenHow
Structured outputThe model supports structured output.The provider holds the answer to the step's JSON Schema.
JSON modeThe model supports JSON mode but not structured output.The provider guarantees JSON; the schema is added to the instructions.
PromptedNeither is supported or known.The schema is added to the instructions, and the answer is read from the text, also from a Markdown code block.

Whatever the provider promises, Avenvail checks every answer against the schema. When it doesn't fit, Avenvail asks the model once more with the problems listed. A second bad answer fails the step with ai_invalid_output.

Turn on Require structured output on a step to refuse the weaker ways: the step then fails with ai_model_missing_feature when the model is known not to support structured output.

Models

A step either follows the connection's default model (leave 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.

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 ai output.

Model features

Avenvail keeps what it knows about each model of a connection, and where that came from:

SourceMeans
Reported by the providerThe provider's model list says so, as OpenRouter and Vercel AI Gateway do.
Guessed from the nameAvenvail recognizes the model's name, such as a vision model. Guesses can be wrong.
Checked with a requestCheck with test requests sent a small request using the feature.
Set by youYou chose Supported or Not supported. This wins over everything else.
Not knownNothing says either way. Avenvail tries the feature and reports what happened.

The features are image input, structured output, JSON mode and temperature. A step that sends an image fails with ai_model_missing_feature 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.

The model picker shows the selected model's features. To override one or Check with test requests, open the connection's page and use the menu next to the model under Models. The check sends a few small requests, which count towards the connection's usage.

Tokens and limits

Before each request, Avenvail 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 Tokens per day under the connection's usage limits to cap spending.

Server administrators set the upper bounds every step and connection must stay within; see Server limits.