Credentials
Securely store API keys in Credential Center and reference them in workflows.
The credential center stores the keys and login credentials used by workflows, such as an LLM API Key, Webhook Secret, or internal API Token. Secret values are stored encrypted. Lists, workflow YAML, and execution logs contain only the identifiers and source metadata needed to use them.
This page talks about how to store and reference model keys and general keys. There is another more trouble-free path in the business system: fill in the form according to the service specifications, save and verify, the official module will be automatically connected, and you do not need to manually transport token.
Why use Credential Center
- Avoid leaks — Keys are not included when you export YAML, copy a workflow, or view execution logs.
- Easy to rotate — After you update a credential, new executions that reference it use the new value; you do not need to edit each workflow.
- Keep usage records — At runtime, the platform records a credential.used audit event and the credential source, but never the plaintext value.
AI Assistant's models, tools, Skills, and MCP are configured in "Account Settings → AI Assistant"; the required personal or team credentials are still maintained in the Credential Center.
Create Credentials
- Enter "Credential Management" and select New Credential.
- Choose a credential category and provider. The provider is the identifier the runtime uses to resolve a key, such as openai, openrouter, or codex_subscription.
- Enter a label and the credential value. The label is only for people—for example, “OpenAI production.” Workflows do not use labels to resolve credentials.
- Choose personal or team scope. A team credential must belong to a selected team and is restricted by team membership permissions.
- After saving, list and detail endpoints never return the plaintext value. Use the update action when the value needs to be replaced.
The provider field supports mainstream model services such as OpenAI, Anthropic, OpenRouter, DeepSeek, Kimi, MiniMax, Zhipu AI, DashScope, NVIDIA, and Ollama, as well as business systems such as Google Ads and Google Marketing. You can also enter a custom identifier for your own service. Refer to the options and guidance in the New Credential form for the current list.
In YAML, provider must contain the service identifier, not the credential label. For example, a credential can be labeled “OpenRouter production,” while the Agent configuration still uses provider: openrouter.
for Agent use
agents:
writer:
preset: writer
overrides:
llm_config:
models:
- model: openai/gpt-5.4
provider: openrouterAt execution time, the platform resolves credentials by provider. It checks personal credentials available to the current user first, then team credentials available through the user’s teams. If multiple credentials use the same provider, select a specific one in the workflow credential settings. The workflow stores a credential ID, never the plaintext value.
For code step use
A code step does not support a credentials list or plaintext credentials.* expressions. Declare the required provider through top-level variable_types instead:
variables:
stripe_credential_id: ""
variable_types:
stripe_credential_id: credential:stripe
workflow:
- step: charge_customer
code:
language: javascript
script: |
const stripeSecret = process.env.WF_CREDENTIAL_STRIPE;
if (!stripeSecret) throw new Error("Stripe credential missing");
// 在这里调用 Stripe API- The variable value is an optional credential-ID selector. Leave it empty to use automatic resolution in personal → team order.
- The decrypted value exists only within that workflow execution and is injected into the code runtime as the WF_CREDENTIAL_<PROVIDER> environment variable.
- Each nested sub-workflow resolves its own variable_types independently. Parent workflows and sibling sub-workflows do not automatically receive its keys.
- Some dedicated online connections are available only through a server-side proxy and do not expose plaintext values as environment variables. Follow the connection page and template instructions for those services.
The same provider uses multiple credentials
You can create several credentials for the same provider for test, prod, or separate projects, and distinguish them with labels. To pin a workflow to one credential, choose it in the workflow configuration or template credential selector. Never put the label in an Agent’s provider field.
- The personal test key is placed in the personal scope, and the shared production key is placed in the team scope.
- The tag clearly states the environment, project and purpose, such as "OpenRouter · Official website content · prod".
- For workflows that require fixed billing attribution, explicitly select the credential instead of relying on automatic resolution order.
Claude Code / Codex Subscription Credentials
If the Agent uses subscription login mode, please select the corresponding provider in the Credential Center:
claude_code_oauth— Claude Code OAuth credentials obtained when logging in.codex_subscription— Codex login generated authentication content.
These values are passed to the corresponding runtime during execution and are not written to the Agent configuration or workflow YAML. Update the credential center entry when the login expires or is revoked.
Rotation and emergency revocation
Normal Rotation
- Create a new key on the upstream service first.
- Update the corresponding credential value in the Credential Center and perform verification with a low-risk execution.
- After a low-risk execution succeeds with the new value, revoke the old key in the upstream service. An execution already in progress may have resolved the old value.
When leakage is suspected
- Immediately revoke or disable the real key in the upstream service to block external access first.
- Delete the credential in the Credential Center or overwrite it with a new value.
- Inspect related execution and credential.used audit records before selecting new credentials for the affected workflow.
Permissions and Audit Boundaries
- Personal credentials are only for the creator; team credentials are for members with access to the team.
- Credential list and detail endpoints never return plaintext credential values. In a self-hosted environment, the deployment administrator still controls the runtime and encryption infrastructure.
- Creating, updating, deleting, and using a credential each produces an audit record. Execution details also retain metadata about the provider source resolved for that run.
FAQ
Can deployment environment variables be used instead?
A self-hosted deployment can configure environment variables for the service itself, but those are deployment-level settings with different rotation, isolation, and audit boundaries. Put business keys used by workflows in the credential center whenever possible.
OAuth Are credentials refreshed automatically?
Generic credentials do not automatically refresh OAuth tokens for arbitrary external services. Only a dedicated connection flow explicitly provided by the product may handle authorization and refresh. Other services need a long-lived credential, the MCP Server’s own authentication mechanism, or refresh logic implemented in the workflow.
Next
- BYOK · Bring Your Own LLM Key — Configure your own model service credentials.
- Third-Party Authorizations — Integrate external business systems into the workflow, and the official modules can be used out of the box.
- Variables and Expressions — Understand the difference between normal variables, step output, and credential selectors.
- Permissions & Sharing — Understand account, team, and workflow permissions.