Skip to content
EN
Get API key
Browse documentation

Get started

API key management

Create a key for your app or agent. Store it, check access and manage its lifecycle.

On this page

1. Create a key

  1. Sign in to your verified account and open API Keys. Reuse an authorized key if you already have one.
  2. Name it for the app and environment, select an expiry and choose the sources it needs. Select Google Search for the first search example.
  3. Create the key and save it below. Give independent agents and production apps separate keys so you can revoke them individually.

2. Store the key

Choose the way you will run FlashData. API and SDK examples read FLASHDATA_API_KEY; the CLI can save the key in its protected profile. In production, inject credentials from your secret store.

Set the key for this terminal
# Bash: paste the key into a hidden prompt, not into this command.
read -r -s -p "FlashData API key: " FLASHDATA_API_KEY
printf '\n'
export FLASHDATA_API_KEY

3. Verify access

Run the free check in the same terminal or CLI profile. Use the tab that matches how you stored the key.

Reuse FLASHDATA_API_KEY from the earlier check in the same terminal.

Read account JSON
(
: "${FLASHDATA_API_KEY:?Set FLASHDATA_API_KEY first}"
curl --fail-with-body --silent --show-error --max-time 20 \
  --header "X-API-Key: $FLASHDATA_API_KEY" \
  'https://api.flashdata.dev/v2/api-access/identity' || exit
printf '\n'
)

Confirm the account and source

HTTP returns these fields directly. With CLI JSON, find them under data.identity.identity and also require data.accessVerified: true.

CheckExpected
accountIdThe account that owns this workload.
accessready
scopesIncludes google_search for the first search.
recurringAllowedtrue before scheduled owner work.

How source permissions work

A key can use only its granted sources. Product selection is separate from pricing: every key on the account spends from the shared balance, including purchased credits. A restricted key does not have its own spending cap. Future products require an explicit permission grant.

If a key is exposed

  1. Revoke the exposed key immediately in the matching console page below, and stop its scheduled callers.
  2. Create a replacement with the needed permissions, install it in each caller's secret store, and run the free verification above.
  3. Review History and account usage for unexpected activity. Removing a secret from a file does not revoke it.

Rotate a key

  1. Create a replacement with the required sources and install it in the target environment.
  2. Repeat the free verification above, then switch the application or scheduler. Update each intended caller.
  3. Revoke the old key after callers have switched. A secret updated on your laptop does not update deployed services.
Replace a CLI key · paste into the hidden prompt
flashdata auth login --replace
flashdata auth status

Revoke access

Stop scheduled callers, revoke the matching key or connection below, then repeat the free verification with the old credential. It should be rejected. Logging out locally does not revoke server access.

Access typeWhere to revoke
Ordinary API keyAPI Keys
Claimed agent keySettings → Connected apps → Agent connections
MCP OAuth grantSettings → Connected apps