An AI key connects AI nodes and the agent to a model service. Every service is reached the same way (the OpenAI-compatible API), so any of them works in any AI node.
Add a key
- Dataset › AI › Add key.
- Pick the Provider: OpenAI, DeepSeek, Anthropic, Gemini, Groq, OpenRouter, Mistral, or Custom (OpenAI-compatible).
- Custom only: the Base URL, the part before
/chat/completions(for examplehttps://api.together.xyz/v1). It must behttps; addresses on your own machine or a private network are refused, and so is a redirect. - Paste the API key (OpenAI also takes an optional
OpenAI-OrganizationandOpenAI-Project). - Load models and pick the Model; optionally an Effort (
noneturns reasoning off; empty = the model's default). - Sees images: switched on by itself when the model is known to see images (GPT-4o / 4.1 / 5, DeepSeek Flash, Claude, Gemini, Llama 4, Pixtral…). Turn it off for a text-only model, on for one we don't recognize.
- Optionally fill Price (USD per 1M tokens): Input, Cached input, Output, from the service's pricing page.
- Verify & add: the key is checked with the service before it's saved.
The list shows the model, a hint of the key, Last used, and the Balance (DeepSeek; the others don't expose it to API keys). Test sends a tiny prompt: Replied "OK" in 0.8s.
Images
AI nodes with an Images field (and the agent) send images only to a key whose model Sees images, always at low detail (about 512 px), the cheapest setting:
| Model | One image at low detail |
|---|---|
| DeepSeek Flash | at most 1,024 tokens (about $0.0003 at peak) |
| GPT-5.5 / 5.6 | about 300 tokens |
| GPT-4o mini | 2,833 tokens: avoid it for images |
A model that doesn't see images gets the text with a note instead: [1 image(s) attached, but this model can't see images]. The step still runs.
Prices and cost
With prices set, every AI step logs its cost and runs add it up:
cost = (input − cached) × price.input / 1e6 + cached × price.cached / 1e6 + output × price.output / 1e6
Example: 3,357 input (1,000 cached), 2,074 output at $0.27 / $0.07 / $1.10 → 0.000636 + 0.00007 + 0.002281 ≈ $0.0030.
Leave all prices empty to show tokens only. The price belongs to the key's own model: when the agent picks another model for a conversation, those calls count tokens without cost. Cost shows on the run's summary card, the and . The dashboard's also estimates a cost from a price list where the key has no price.
Used by
All ai/* nodes (Prompt, JSON, Choose, Classify, Summarize, Write, Guard) and the Studio agent. Agent turns can override the model and effort per conversation.
How flows use it
AI nodes never pick a key directly. A flow declares an AI key option (), account.ai in every template, and its AI nodes' AI key (and Fallback AI key) fields use it: {{ option.account.ai }}. Then:
- A picks one of your AI keys for it; Studio runs use the option's default (a template starts it on your first key).
- The key goes into what the run gets as the node's secret.
A field holding a key id instead of an option is refused when the run starts: "ai" must use an AI key option. Campaign exports carry the key's name, matched back to your key with the same name on import.
FAQ
"Not enough balance for API calls"
The provider account behind the key has no credit. Top it up and Refresh balance.
Can images be sent to the model?
Yes, to a key whose model Sees images. AI nodes send what their Images field holds (a collected post's photo, {{ file.data }}, Drive files), the agent the images you paste or attach.
My service isn't in the list
Pick Custom (OpenAI-compatible) and enter its base URL. Most services (Together, Fireworks, a self-hosted vLLM behind https…) speak that API.
Which keys can a knowledge base use?
A key on a service with embedding models: OpenAI, Gemini, Mistral or Custom.