Authentication
CLI and coding agents
Section titled “CLI and coding agents”Run agent-data init to connect an API key. You can create or manage keys in the dashboard. The CLI reads its saved configuration or the AGENT_DATA_API_KEY environment variable. A command’s --api-key option overrides the environment when provided.
Use your environment’s secret manager for unattended execution. Keep keys out of source control, agent prompts, and shared logs.
agent-data whoamiagent-data accountwhoami displays locally resolved settings with a masked key. account checks authentication against the service and shows the connected account’s allowance and credits. Neither makes a billable API call.
Dashboard
Section titled “Dashboard”Sign in to the dashboard and select the account you want to use. Calling or building an API still requires an API key; the dashboard supplies it with requests so you do not need to paste it into each form.
Connect the remote MCP server and complete browser sign-in. MCP uses OAuth; you do not paste an API key into the server URL.
Direct API requests
Section titled “Direct API requests”Use the authentication header and branded URL in the API’s current contract. Never infer credentials or parameter names from the URL alone.
Connection problems
Section titled “Connection problems”If a request returns 401, check the selected account and key. For a disconnected MCP client, sign in again through that client’s MCP settings. See troubleshooting for the next checks.