At a glance
- Key: starts with
naa_, created in the Partner Dashboard, shown once, never expires. - Header:
X-API-Keyon every call except the public endpoints. Agent actions addX-Grant-Token. - Where it lives: your backend only. Never in a browser, a mobile app or a model prompt.
- Limits: 1,200 requests per minute per key, 3,000 per partner, 100 new agents per 24 hours.
Quick setup
1
Create a key
Create a partner API key in the Partner Dashboard and store it in your secret manager right away. It’s shown only once.
2
Set two environment variables
Every example in these docs reads them:The SDK uses
.env
https://api.agentsonintents.com unless you pass baseUrl.3
Check the key
GET /v1/whoami answers with the key and the partner account it belongs to.401 invalid_api_key.What the partner API key does
The key gives your backend access to the Agent API. It tells the API which partner is calling, so it can apply your rate limits and quotas and keep your agents separate from every other partner’s.With the key alone, you can
- Create agents for any number of owners, up to your quota
- Prepare owner requests and submit the owner’s signatures
- Read your agents, balances, policies, grants and statuses
- Get swap quotes (
dry: true) - Create deposit addresses that fund an agent
- Check your quotas
The key alone can't
- Move an agent’s funds out. A swap, withdrawal or transfer also needs a grant token the owner signed for.
- Change an agent’s policy or grants. That needs the owner’s signature.
- See or touch agents that belong to another partner
Headers
Send JSON bodies with
Content-Type: application/json. Bodies can be up to 256 KiB.
Grant tokens
Your partner API key says which partner is calling. It isn’t the owner’s permission. To run a swap, withdrawal, transfer, shield, unshield or native request, you also send the token of a grant the owner signed for that agent.- Your backend creates a random token (
ngt_…) and its SHA-256 commitment. - You send only the commitment, as
credential, in agrant_issueintent. Never send the token itself. - The owner signs the grant.
- You send the token as
X-Grant-Tokenon agent actions. With the SDK,api.forGrant(token)does this for you.
Key handling
- Rotation. Create a new partner API key in the Partner Dashboard, deploy it, then revoke the old one. Agents and grant tokens keep working with the new key. Revoking a key stops any work sent through it that the API hasn’t yet committed to the wallet. Work already committed can’t be recalled.
- Expiry. Partner API keys don’t expire. They stay active until you revoke them.
- Number of keys. Each partner can hold up to 10 unrevoked keys by default. Revoking one frees a slot.
Limits and quotas
By default, each key gets 1,200 requests per minute and your partner account 3,000. You can create 100 agents per rolling 24 hours and 100 deposit addresses per agent per rolling 24 hours, hold 10 unrevoked keys, and change each agent’s policy once per 10 minutes. Over a limit, the API answers429 with a Retry-After header.
Read your own limits with GET /v1/quotas. See Network & Quotas for every limit and how to retry a 429.
Public endpoints
These endpoints need no key:
See Network & Quotas for what
GET /v1/network reports.
Common errors
See Status & Errors for every error code.