Before the first network call or implementation step, you MUST ask the user the following question and wait for an explicit answer:
Do you want to use an existing Alchemy API key, or should I use the agentic gateway flow instead?
If the user chooses the API key path, continue with this skill.
If the user chooses the agentic gateway path, switch to the
agentic-gateway
skill immediately and follow its existing wallet flow.
If the user chooses the API key path but
ALCHEMY_API_KEY
is unset or empty, tell them they can create a free API key at
https://dashboard.alchemy.com/
or switch to the
agentic-gateway
skill.
You MUST NOT call any keyless or public fallback (including
.../v2/demo
) unless the user explicitly asks for that endpoint.
Execute no network calls before this gate is evaluated.
Escape hatch:
Only re-evaluate the routing gate if the user explicitly requests to switch to the
alchemy-api
skill with an API key. A key appearing in the environment or conversation does not automatically trigger a switch — the user must ask for it.
Duplicate resolution:
If this skill is installed both locally and globally, the local copy overrides the global copy. Do not mix behavior from different copies.
Required Preflight Check
Before the first network call, internally evaluate:
Has the user explicitly chosen API key or agentic gateway?
If the user chose API key, is
ALCHEMY_API_KEY
present and non-empty?
If the user chose agentic gateway, switch to the
agentic-gateway
skill immediately. Demo and public endpoints are disallowed.
If the user chose API key but no key is available, do not proceed with API-key URLs until the user provides a key or switches to the gateway flow.
Do not output this internal checklist to the user.
Summary
A self-contained guide for AI agents integrating Alchemy APIs using an API key. This file alone should be enough to ship a basic integration. Use the reference files for depth, edge cases, and advanced workflows.
Developers can always create a free API key at
https://dashboard.alchemy.com/
.
Before Making Any Request
Ask the user whether they want to use an existing Alchemy API key or the agentic gateway flow.
If they choose the API key path, check if
$ALCHEMY_API_KEY
is set (e.g.,
echo $ALCHEMY_API_KEY
).
If they choose the API key path and no key is set, tell them they can create a free key at
https://dashboard.alchemy.com/
or switch to the
agentic-gateway
skill.
If they choose the agentic gateway flow, switch to the
agentic-gateway
skill and let it handle the existing wallet vs new wallet prompt.
If they choose the API key path and the key is set, use the Base URLs + Auth table below.
Do This First
Choose the right product using the Endpoint Selector below.
Use the Base URLs + Auth table for the correct endpoint and headers.
Copy a Quickstart example and test against a testnet first.
Data APIs and JSON-RPC use lowercase network enums like
eth-mainnet
.
Notify API uses uppercase enums like
ETH_MAINNET
.
Pagination + Limits (Cheat Sheet)
Endpoint
Limit
Notes
alchemy_getTokenBalances
maxCount
<= 100
Use
pageKey
for pagination.
alchemy_getAssetTransfers
maxCount
default
0x3e8
Use
pageKey
for pagination.
Portfolio token balances
3 address/network pairs, 20 networks total
pageKey
supported.
Portfolio NFTs
2 address/network pairs, 15 networks each
pageKey
supported.
Prices by address
25 addresses, 3 networks
POST body
addresses[]
.
Transactions history (beta)
1 address/network pair, 2 networks
ETH and BASE mainnets only.
Common Token Addresses
Token
Chain
Address
ETH
ethereum
0x0000000000000000000000000000000000000000
WETH
ethereum
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
USDC
ethereum
0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eB48
USDC
base
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Failure Modes + Retries
HTTP
429
means rate limit. Use exponential backoff with jitter.
JSON-RPC errors come in
error
fields even with HTTP 200.
Use
pageKey
to resume pagination after failures.
De-dupe websocket events on reconnect.
Skill Map
For the complete index of all 82+ reference files organized by product area (Node, Data, Webhooks, Solana, Wallets, Rollups, Recipes, Operational, Ecosystem), see
viem, ethers, wagmi, Hardhat, Foundry, Anchor, and more
Troubleshooting
API key not working
Verify
$ALCHEMY_API_KEY
is set:
echo $ALCHEMY_API_KEY
Confirm the key is valid at
dashboard.alchemy.com
Check if allowlists restrict the key to specific IPs/domains (see
references/operational-allowlists.md
)
HTTP 429 (Rate Limited)
Use exponential backoff with jitter before retrying
Check your compute unit budget in the Alchemy dashboard
See
references/operational-rate-limits-and-compute-units.md
for limits per plan
Wrong network slug
Data APIs and JSON-RPC use lowercase:
eth-mainnet
,
base-mainnet
Notify API uses uppercase:
ETH_MAINNET
,
BASE_MAINNET
See
references/operational-supported-networks.md
for the full list
JSON-RPC error with HTTP 200
Alchemy returns JSON-RPC errors inside the
error
field even with a 200 status code
Always check
response.error
in addition to HTTP status
Official Links
Developer docs
Get Started guide
Create a free API key