Marketing Architects icon

Marketing Architects

Consume Marketing Architects API

Text → Text Completion

AI-generated

Summary

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 model property in the request body.
  • messages — Array of message objects to send as the conversation. Each object has a role (system, assistant, user) and content. Sent as the messages property 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_format property in the request body.
  • enableRetry — Whether to automatically retry the request on failure.
  • maxRetries — Maximum number of retry attempts (1-10). Only applicable when enableRetry is true.
  • retryDelay — Base delay between retry attempts in seconds (1-60). Only applicable when enableRetry is true.
  • backoffStrategy — Strategy for calculating retry delays: 'fixed' uses the same delay each attempt, 'exponential' increases the delay exponentially. Only applicable when enableRetry is 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-router endpoint. On success, this typically includes the generated text under the choices array as defined by the OpenRouter API. Errors are thrown via n8n's NodeApiError after processing by the shared error post‑receive handler.

Links

Discussion