Skip to main content
AI nodes run a large language model prompt as part of a journey. Courier sends the prompt and the run’s context to the model you select. Courier parses the response into structured output and adds those fields back into the journey context. Downstream nodes use that output to make decisions, personalize messages, or update user data. AI nodes need the Business or Enterprise plan, and run on AI credits.

Configuration

Click the AI node on the canvas to open the summary panel, then click Configure to open the full configuration drawer.

AI node configuration drawer with model selector, web search toggle, prompt, and output schema

AI model

Choose the model that fits what the AI node needs to do. Courier supports models from OpenAI and Anthropic, so each node can balance speed, cost, and output quality. Use smaller models for predictable structured tasks: classifying users, extracting fields, scoring engagement, or returning simple JSON. Use larger models when the prompt needs more context, nuanced reasoning, or higher-quality generated copy. Available models: See Billing for credit costs, token overages, and web search pricing. Toggle web search on when the prompt needs current information the journey context does not have. The model can then query the internet before generating its structured response. Web search is available for Anthropic models only. Each invocation with web search enabled costs an additional 2 credits. Search results also count as input tokens, along with the prompt, output schema, journey context, and resolved variables. If the total input exceeds 3,072 tokens, input token overage applies.

Prompt

Write a natural-language prompt describing what you want the model to do. The prompt field supports {{variable}} interpolation. Type {{ to see available fields from the trigger schema, profile, or upstream fetch responses. For the onboarding nudge example below, the prompt might be:
A token counter in the top-right of the drawer shows prompt + schema size in real time. Most AI node runs stay within the included token limit. Input token overage usually only applies when variables, fetch responses, or web search results add large amounts of text.

Output schema

The output schema defines the structure of the model’s response. Define it in two modes: Form mode (default): Add fields with a name and type (string, number, or boolean). Optionally add a description telling the model what the field should contain. JSON mode: Write a JSON Schema directly. Use this for more complex schemas or when pasting from an existing definition. For the onboarding nudge example, the form-mode schema would be: The model’s response is parsed as JSON and merged into the journey context. Downstream nodes reference the fields the same way they reference trigger or fetch data:
  • In : select data.tone or data.recommended_feature as the field
  • In : use {{subject_line}} or {{body_copy}}

Conditions

AI nodes support optional . If they are not met when the run reaches the node, it’s skipped and no credits are consumed.

Testing

Click Test in the configuration drawer to open the test panel. Run the prompt against the selected model with sample variable values and see the structured response before publishing the journey.

Test drawer showing prompt, output schema, and structured test result

The test result shows the parsed JSON output on the right, or an error message if the request failed.
A test run is billed like a real one. It calls the same model and deducts the same credits, so iterating on a prompt with an expensive model adds up.

Example: personalized onboarding nudge

A journey that generates tailored onboarding messages from each user’s activity:

Onboarding nudge journey: API trigger → Fetch activity → AI generates personalized copy → branch on tone → send via the right channel

  1. Trigger: Fires on day 3 after signup. The trigger schema includes user_name, plan_name, features_used, and days_since_signup.
  2. Fetch Data: Pulls the user’s recent activity summary from your application API.
  3. AI node: Given the user’s profile and activity, generates a personalized nudge with subject_line, body_copy, recommended_feature, and tone. Model: Claude Sonnet 5 (2.5 credits per run).
  4. Branch: Routes based on data.tone:
    • Path “Celebratory”: user has been active → sends a congratulatory email with {{subject_line}} and {{body_copy}}.
    • Path “Urgent”: user hasn’t engaged → sends a push notification to re-engage.
    • Default: sends a standard onboarding email with the AI-generated copy.

Common patterns

Score and classify users: Feed product usage, behavior, and profile data into the LLM. Route the journey based on risk level, intent, engagement, or any structured category the model returns. Generate personalized notifications: Give the model your journey context and get back tailored subject lines, body copy, and recommended actions. Personalized content for every recipient without dozens of template variants. Enrich user profiles: Classify users into personas, derive lifecycle stage, or generate account summaries. Persist outputs to the profile so every future journey starts with richer context. Structured output for downstream logic: Define an output schema with field names, types, and enums. The LLM returns structured JSON that branch conditions, send nodes, and downstream integrations can act on directly.

Debugging AI nodes

Open and click the AI node step to see:
  • The model used and whether web search was enabled
  • The resolved prompt (with variables substituted)
  • The output schema that was sent to the model
  • The structured JSON response
  • Token usage (input and output token counts)
If the AI node fails (model error or timeout), the step context shows the error. The journey continues but no output is merged into the context. Use a downstream branch condition to handle missing AI output fields.

Billing

AI nodes need the Business or Enterprise plan. On Developer the node cannot be placed on the canvas and credit packs cannot be bought. Each AI node invocation consumes credits based on the selected model. Credits are billed at 100 credits per $1 and bought as packs in the console, separately from your send bill. Auto top-up charges your card for another pack when the balance falls below a threshold, 100 credits by default. The values above are base costs per invocation. Each invocation includes up to 3,072 input tokens and 1,000 output tokens. Most AI node runs stay within these included limits. Input tokens cover everything sent to the model: the prompt, output schema, journey context, resolved variables, upstream fetch responses, and web search results. Input token overage applies when the node sends a large amount of text, such as long variables, large fetch responses, or web search results. Output tokens are generated by the model response. Output token overage applies only when the model response exceeds 1,000 tokens. Control output length through the prompt and output schema. Web search is available for Anthropic models only. When enabled, each invocation costs an additional 2 credits. Search results also count as input tokens, so web search can push the total past 3,072 tokens and trigger input token overage.