Use a Provider
A query API is the fastest way to serve your application the chain: someone else runs the node and the indexer, and your SDK points at a URL. The three documented here are directly comparable, they answer the same REST-shaped reads and accept the same transaction submissions, so this page sets all three up with one identical skeleton: create access, find your network's endpoint, make a first raw request, point your SDK at it, and know the limits. Pick one tab and the rest of the curriculum works the same; switching later is a configuration change.
The differences that matter are operational, not functional: who operates it, how access is granted, and how usage is limited. Where they genuinely differ, the tabs say so.
An API key identifies and bills you. Store it in an environment variable on your backend, never commit it, and never ship it in client-side code, where anyone can read it. The frontend signs, backend submits pattern exists partly for this reason.
Create access
- Blockfrost
- Koios
- Nexus
Create a free account at blockfrost.io. After signing in, create a project: click + ADD PROJECT, name it, and select the network. Each project is scoped to one network and gets its own project_id, which is your API key (it starts with the network name, e.g. preprod...).
Nothing to create for basic use: Koios is a community-run cluster and its public tier needs no key. For higher limits, generate a free auth token from your Koios profile and send it as a Authorization: Bearer <token> header. The same token works across networks.
Sign up at nexus.gerowallet.io and create an API key. Each key is scoped to one chain and one network (e.g. Cardano Preprod), so you make a key per chain and network you call; it starts with nxs_.
Network endpoints
Each network has its own base URL, and your access is scoped to the network you set it up for (Koios excepted: same token everywhere, different URL per network).
- Blockfrost
- Koios
- Nexus
| Network | Base URL |
|---|---|
| Mainnet | https://cardano-mainnet.blockfrost.io/api/v0 |
| Preprod | https://cardano-preprod.blockfrost.io/api/v0 |
| Preview | https://cardano-preview.blockfrost.io/api/v0 |
| Network | Base URL |
|---|---|
| Mainnet | https://api.koios.rest/api/v1 |
| Preprod | https://preprod.koios.rest/api/v1 |
| Preview | https://preview.koios.rest/api/v1 |
One base URL for every network; the network comes from your key's scope (and is accepted as a ?network= query):
| Base URL | Network query |
|---|---|
https://nexus.gerowallet.io/api | CARDANO_MAINNET · CARDANO_PREPROD · CARDANO_PREVIEW |
Your first request
The same request three ways: ask for the chain tip (or latest block) with your key in the provider's auth header. A JSON answer means access, endpoint, and network line up.
- Blockfrost
- Koios
- Nexus
Authentication is the project_id header:
curl -H "project_id: $BLOCKFROST_PROJECT_ID" \
https://cardano-preprod.blockfrost.io/api/v0/blocks/latest
{
"time": 1641338934,
"height": 15243593,
"hash": "4ea1ba291e8eef538635a53e59fddba7810d1679631cc3aed7c8e6c4091a516a",
"slot": 412162133,
"epoch": 425,
"tx_count": 1,
"fees": "592661"
}
No header needed on the public tier:
curl https://preprod.koios.rest/api/v1/tip
[
{
"hash": "3448481b954a5e90adafc8c16784e787e73acb0aaead2ca13902b2172f3047a5",
"epoch_no": 304,
"abs_slot": 129752219,
"block_no": 4997788,
"block_time": 1785435419
}
]
Koios is built on PostgREST, so every endpoint supports column selection, filtering, ordering, and paging through query parameters; the API usage guide covers the syntax.
Authentication is the X-Api-Key header:
curl -H "X-Api-Key: $NEXUS_API_KEY" \
https://nexus.gerowallet.io/api/blocks/latest
A JSON block is returned. The same key format and base URL also serve Bitcoin and Midnight endpoints and Cardano market data.
Point your SDK at it
You will rarely call the REST API directly: the SDK's provider does it behind the interface you already use. Configure the one you set up (base URL and network must match your key):
- Evolution
- Mesh
import { preprod, Client } from "@evolution-sdk/evolution"
// Blockfrost
const bf = Client.make(preprod).withBlockfrost({
baseUrl: "https://cardano-preprod.blockfrost.io/api/v0",
projectId: process.env.BLOCKFROST_PROJECT_ID!
})
// Koios
const koios = Client.make(preprod).withKoios({ baseUrl: "https://preprod.koios.rest/api/v1" })
import { BlockfrostProvider, KoiosProvider } from "@meshsdk/core"
// Blockfrost, network auto-detected from the key prefix
const bf = new BlockfrostProvider(process.env.BLOCKFROST_PROJECT_ID!)
// Koios, pass the network
const koios = new KoiosProvider("preprod")
Every query and submission from Query the chain runs unchanged on any of the three.
Limits
- Blockfrost
- Koios
- Nexus
The free tier is rate-limited per project, with paid tiers above it; current numbers are on blockfrost.io. Beyond the chain API, the same account gives you an IPFS gateway for pinning off-chain content and webhooks that push on-chain events to you instead of you polling.
The public tier carries shared rate limits that protect the community cluster; an auth token raises them. Review the limits before you integrate. Response times can vary by instance, since the cluster is served by independent community operators.
Access is gated by your subscription tier, and each key is scoped to one chain and one network — a request whose network disagrees with the key is rejected. Extras such as market data and IPFS are addon-gated. Current tiers and addons are on nexus.gerowallet.io.
The full references
Each provider's own documentation is the authority on its endpoints:
- Blockfrost: blockfrost.dev, with official SDKs for 15+ languages beyond the Cardano SDK providers above
- Koios: api.koios.rest, every endpoint with a runnable sample query
- Nexus: nexus.gerowallet.io/docs, covering Cardano, Bitcoin, and Midnight plus market data; a typed client is published as
@adlabs/nexus
The same APIs, self-hosted
Two of the three are open source end to end, so outgrowing a hosted tier does not mean leaving the API behind:
- Blockfrost: the backend (blockfrost-backend-ryo), SDKs, and OpenAPI spec are open source; a Docker image runs your own instance against your own node and db-sync.
- Koios: the guild-operators suite deploys a full gRest instance (node, db-sync, PostgREST, HAProxy) with the same API, removing shared rate limits; you can also contribute the instance back to the community cluster.
Running your own serving layer, in these shapes and lighter ones, is the self-hosting page.
Harden it for production
One hosted API is a single point of failure, and chatty code hits rate limits. Because every provider implements the same interface, failover and caching are composition, not migration: see harden your provider for the pattern in both SDKs.
Next steps
- Self-hosting: the same two workflows served from infrastructure you run
- Going to production: the pre-mainnet checklist, including provider hardening
- Builder Tools: the hosted providers in full, beyond the three set up here