Skip to main content

Agent: Provider Credentials

The Agent node reads which model to use from the snapshot — but it still needs the API key for that model's provider to actually make the call. Those keys are your responsibility, configured once in n8n as per-provider credentials.

One credential type per provider

Circus defines a separate credential type for each supported AI provider, each holding a single apiKey:

  • circusOpenaiApi — OpenAI
  • circusAnthropicApi — Anthropic
  • circusGoogleApi — Google AI
  • circusXaiApi — xAI

You configure these once in n8n's credential manager (not per node), and declare them on the Agent node — all of them optional, because a given run only uses the one matching its model.

How the node picks one

At runtime, the Agent node reads model_provider from the snapshot and maps it to the credential name — openaicircusOpenaiApi, anthropiccircusAnthropicApi, and so on. It then uses that credential to authenticate, handling each provider's scheme correctly (a Bearer header for OpenAI and xAI, the x-api-key plus a version header for Anthropic, a query-parameter key for Google). If the matching credential isn't configured, the node treats it as a fatal setup error and terminates the run — it can't call a provider it has no key for.

A tip that pays off

Configure credentials for all the providers you might use, upfront. Because the operator can switch a model — and therefore its provider — from the Circus UI at any time, having every provider's key already in place means a model swap is just a config change on their side, with no n8n edit on yours. That's the operator-control promise working end to end — don't let a missing credential be the thing that breaks it.

The supported providers today are OpenAI, Anthropic, Google, and xAI. If the platform gains a new provider, the Agent node needs a matching case added before it can call it — until then, an unknown provider falls back to the OpenAI request shape, which may or may not fit.