Actions13
- Brand Actions
- Image Actions
- Project Actions
- Text Actions
- Video Actions
Text → Text Completion
AI-generatedSummary
Creates a text completion using the Marketing Architects OpenRouter API.
Inputs
- model — The AI model to use for completion. Can be selected from a dropdown or set via an expression. Sent as the
modelproperty in the request body. - messages — Array of message objects to send as the conversation. Each object has a
role(system, assistant, user) andcontent. Sent as themessagesproperty in the request body. Defaults to a single user message with content 'Hello, how are you?'. - response_format — Optional JSON schema for structured output. If provided, it is parsed and sent as the
response_formatproperty in the request body. - enableRetry — Whether to automatically retry the request on failure.
- maxRetries — Maximum number of retry attempts (1-10). Only applicable when
enableRetryis true. - retryDelay — Base delay between retry attempts in seconds (1-60). Only applicable when
enableRetryis true. - backoffStrategy — Strategy for calculating retry delays: 'fixed' uses the same delay each attempt, 'exponential' increases the delay exponentially. Only applicable when
enableRetryis true. - batchSize — Number of items per batch for throttling requests. -1 disables batching, 0 is treated as 1. Part of the request options.
- batchInterval — Time in milliseconds between each batch of requests. Part of the request options.
- proxy — HTTP proxy to use for the request, e.g. 'http://myproxy:3128'. Supports basic auth syntax.
- timeout — Request timeout in milliseconds for waiting for server response headers.
- allowUnauthorizedCerts — Whether to accept the response even if SSL certificate validation fails (insecure).
Output shape
object
Returns the parsed JSON response from the
/generation/open-routerendpoint. On success, this typically includes the generated text under thechoicesarray as defined by the OpenRouter API. Errors are thrown via n8n's NodeApiError after processing by the shared error post‑receive handler.