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
- Maestro
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.
Create a free account at dashboard.gomaestro.org. Create a project, selecting Cardano and your network, then copy the project's API key from the dashboard. Each project is scoped to one network.
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
- Maestro
| 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 |
| Network | Base URL |
|---|---|
| Mainnet | https://mainnet.gomaestro-api.org/v1 |
| Preprod | https://preprod.gomaestro-api.org/v1 |
| Preview | https://preview.gomaestro-api.org/v1 |
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
- Maestro
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 api-key header:
curl -H "api-key: $MAESTRO_API_KEY" \
https://preprod.gomaestro-api.org/v1/chain-tip
The response is the current chain tip: block hash, height, and slot. Responses are cursor-paginated where lists are involved: pass the returned next_cursor back as the cursor query parameter to fetch the next page.
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" })
// Maestro
const maestro = Client.make(preprod).withMaestro({
baseUrl: "https://preprod.gomaestro-api.org/v1",
apiKey: process.env.MAESTRO_API_KEY!
})
import { BlockfrostProvider, KoiosProvider, MaestroProvider } 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")
// Maestro
const maestro = new MaestroProvider({ network: "Preprod", apiKey: process.env.MAESTRO_API_KEY! })
Every query and submission from Query the chain runs unchanged on any of the three.
Limits
- Blockfrost
- Koios
- Maestro
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.
Requests per second depend on your subscription plan, and each call also consumes compute credits from a tier-dependent allowance (heavier queries cost more). The X-RateLimit-* and X-Maestro-Credits-* response headers report where you stand. Current tiers are on gomaestro.org/developer.
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
- Maestro: docs.gomaestro.org, covering the indexer plus transaction-management extras
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