Skip to main content

AI Text

Sends one prompt to an AI model and outputs the reply — as text, or as JSON that matches a schema you define. Use it to summarise, classify, extract, translate or draft text.

For multi-step tasks where the model should call tools, use AI Agent.

Provider and model​

PropertyRequiredDescription
ProviderYesOpenAI, Anthropic, OpenRouter, Azure OpenAI, Google Gemini, Mistral or OpenAI-compatible
AI Provider ConnectionRecommendedA connection holding your provider API key. The right auth header is set for each provider
API Key (legacy)NoA secret with the key. Only used when no connection is selected
Base URLAzure / OpenAI-compatibleAzure: your resource URL, e.g. https://my-resource.openai.azure.com. OpenAI-compatible: the API base, e.g. https://api.groq.com/openai/v1 (a bare host gets /v1 added)
ModelYesThe model id, e.g. gpt-4.1, claude-sonnet-4-5, gemini-2.5-flash, anthropic/claude-sonnet-4.5 (OpenRouter). For Azure, the deployment name

OpenAI-compatible covers any service that speaks the OpenAI Chat Completions API — Groq, Together, vLLM, LM Studio, Ollama and others. An API key is optional for this provider. Provider URLs must be reachable from the internet: calls to private or internal addresses are blocked, as for the HTTP Request step. On a self-hosted worker you can allow a model server inside your network.

You use your own provider account: requests are billed by your provider.

Prompt​

PropertyRequiredDescription
System PromptNoInstructions for the model's role and style
User MessageYesThe prompt. Use expressions to include data, e.g. Summarise: {{ $nodes['Get ticket'].responseBody.text }}
Images / FilesNoA file, a list of files, an image URL or a data: URI. Images and PDFs are sent to models that support them. Up to 20 MB per stored file

Settings​

PropertyDefaultDescription
TemperatureProvider defaultRandomness. Not sent to reasoning models (o-series, GPT-5, DeepSeek R1)
Max Output TokensProvider default (Anthropic: 4096)Upper limit for the reply length
Top PProvider defaultNucleus sampling. Not sent to reasoning models
Reasoning EffortProvider defaultLow, Medium or High for models that support it
Structured Output (JSON Schema)—A JSON Schema the reply must match (see below)

Structured output​

Set a JSON Schema to get machine-readable data instead of prose:

{
"type": "object",
"properties": {
"sentiment": { "type": "string", "enum": ["positive", "neutral", "negative"] },
"summary": { "type": "string" }
},
"required": ["sentiment", "summary"]
}

The reply is checked against the schema (types, required fields, properties, array items, enums). If it doesn't match, the model gets one chance to correct it; if it still doesn't match, the step fails. The parsed value is in structured:

{{ $nodes['Classify'].structured.sentiment }}

Output​

FieldTypeDescription
textStringThe model's reply
structuredObjectThe parsed reply when a schema is set, otherwise null
modelStringThe model that answered
finishReasonStringWhy the model stopped, e.g. stop or length
truncatedBooleantrue if the reply hit the output token limit
usageObjectToken counts and estimated cost (below)

usage:

FieldDescription
inputTokens, outputTokens, totalTokensTokens used
reasoningTokens, cachedInputTokensWhen the provider reports them
estimatedCostUsdEstimate at list prices; null for models Blokkio doesn't know
{
"text": "The customer is happy with the fast delivery.",
"structured": null,
"model": "gpt-4.1",
"finishReason": "stop",
"truncated": false,
"usage": { "inputTokens": 412, "outputTokens": 11, "totalTokens": 423, "reasoningTokens": null, "cachedInputTokens": null, "estimatedCostUsd": 0.0009 }
}

Examples​

Summarise a support ticket:

  • System Prompt: You summarise support tickets in one sentence.
  • User Message: {{ $trigger.body.message }}

Describe an uploaded image:

  • User Message: Describe this product photo for an online shop.
  • Images / Files: {{ $trigger.files[0] }}

Errors​

The step fails when no model or sign-in details are set, when the provider returns an error (its message is shown), or when structured output doesn't match the schema. Use retries for occasional provider errors such as rate limits.