generate produces text or schema-validated data. Omit account to use the platform Vercel AI Gateway credential. Its model cost counts toward the organization’s monthly Platform AI allowance; customer-managed accounts don’t use this allowance. The platform default is openai/gpt-4.1-nano.
Example
automations/recipe.automation.ts
markSignificant keeps the completed run in the default Recent runs view. Each run uses the organization’s Platform AI allowance.
Inputs
Generation inputs accept compatible signals. Schema and account selection are static. Model autocomplete follows the selected provider, but arbitrary string IDs remain valid for newly released models.
Output
Without a schema,output is Signal<string>. With a schema, output is a signal of that Standard Schema’s inferred output type. The result also exposes generated text, token usage, finishReason, rawFinishReason, reasoningText, warnings, provider metadata, and response metadata.
Provider accounts
Customer-managed API-key accounts are available for Anthropic, Cerebras, Cohere, DeepInfra, DeepSeek, Fireworks AI, Google Generative AI, Groq, Hugging Face, Mistral AI, OpenAI, OpenRouter, Perplexity, Together AI, Vercel AI Gateway, and xAI. Connect credentials withbunx automate.ax accounts, then import the provider helper and pass a named account reference. API keys don’t appear in automation code or signals.
automations/provider-models.automation.ts
markSignificant keeps the completed run in the default Recent runs view. The providers can charge the three connected accounts for each run.
Omitting model uses the selected account’s default: