Skip to main content
Every request to the engine and the console API authenticates with an organization API key, presented as a Bearer token:
The same key works across both base URLs: the engine that runs agents and the console that serves tools, MCP, and management.

Where keys come from

Create keys in the console under API keys. A key is scoped to one organization: it can only see and act on that organization’s agents, tools, datasets, and phone numbers. To act on a different organization, create a key inside it. See Organizations for how organizations are structured. Keys look like grad_live_ followed by a random suffix. The full value is shown once, at creation. Copy it then, because the console only ever stores and displays a truncated preview afterward. If a key leaks, revoke it in the console; revoked keys stop verifying immediately.
Treat a key like a password. Keep it in an environment variable such as GRADIENT_API_KEY, never in client-side code or a committed file.

Scopes

Each key carries a set of scopes chosen when you create it. A request is checked against the scope its endpoint requires, so a narrowly scoped key can invoke agents without also being able to edit them. A key with * or admin passes every check. Running an agent, both invoke and turn, requires agents:invoke. Calling a custom tool requires tools:invoke. The hosted MCP server authenticates the key first, then enforces the right scope on each individual tool it exposes.

Checking a key

The console whoami route needs no scope and returns the organization the key resolves to, plus its scopes:

Failures