API Key
An API Key connection sends a static key with every request, as a header or as a query parameter.
Several official apps use an API key, for example Linear (Personal API key). Connect those from their app page: the key name, base URL and allowed domains are already set. For any other API, use the generic template or a custom app as described below.
Using the generic API Key template
- Go to Apps, open Any REST API on the Generic tab and click Connect → API Key.
- Give the connection a name and fill in the fields. Click Create.
- Select the connection in an HTTP Request node (Auth → Use Connection) and use absolute URLs.
| Field | Key | Default | Description |
|---|---|---|---|
| API Key | api_key_value | — | The key itself. Use secret stores a secret://NAME reference instead |
| Key Name | api_key_name | X-API-Key | The header or query parameter name the API expects |
| Add to | add_to | Header | Header or Query Params |
Examples:
| Key Name | Add to | Result |
|---|---|---|
X-API-Key | Header | X-API-Key: your-api-key-value |
apikey | Query Params | https://api.example.com/data?apikey=your-api-key-value |
Only the key is sent. Key Name and Add to are settings, not extra headers. A query parameter that is already in the request URL is replaced by the connection's value, and other query parameters are kept.
:::tip Pin the key to the API's domain
The Any REST API templates have no allowed domains, so
their connections may be used with any host. To pin a key to api.example.com, create a custom app (see below).
:::
API Key in a custom app
Create a custom app when you want a base URL, allowed domains, a test request, your own actions, or when an API needs several values, for example a key and an account id.
- Go to Apps → Custom app and click New custom app. Under Start from, pick API Key and give your app a name.
- On the app page, edit the parameters. In a custom app, each parameter is one value: its key is used as the header or query parameter name, and its placement decides where it goes. Parameters with placement none are only shown in the form and not sent.
- Set the Base URL (for example
https://api.example.com/v1), Allowed domains (api.example.com) and a Test request (/me), and save. - Connect it from its app page as above.
| Key | Placement | Example value |
|---|---|---|
X-API-Key | Header | sk_live_... |
X-Account-Id | Header | acct_123 |
api_key | Query | abc123 |
If you switch a custom app's Auth strategy to API Key, it starts with one parameter, X-API-Key, sent as
a header. Empty values are skipped.
When to use it
Use API Key for services that authenticate with a fixed key: many SaaS, weather, mapping and data APIs. If the API
expects Authorization: Bearer <key>, use Bearer Token instead. For AI providers, use an
AI Provider connection.
:::tip Keys in query strings Some APIs only accept the key in the URL. Use the query placement for these, but keep in mind that URLs are more likely to end up in server logs than headers. Prefer a header when the API supports one. :::