Overview
This quick start shows how to install the Quicknode SDK, configure an API key, and make your first product API request.
Create one configured SDK instance, then use the product clients attached to that instance. Your API key, timeouts, and optional base URL overrides are shared across every client, so scripts, services, and agents can move between Quicknode products without rebuilding authentication or HTTP configuration.
qn.admin: Manage endpoints, teams, usage, billing, logs, metrics, security, rate limits, and tags.qn.streams: Create, list, update, pause, activate, test, and delete Streams.qn.webhooks: Manage webhook templates, destinations, lifecycle actions, and enabled counts.qn.kvstore: Store and retrieve sets and lists for cursors, watchlists, filters, and lightweight agent state.
Prerequisites
Before you begin, create a Quicknode API key from the Quicknode dashboard. Agents can also create their own API keys, to learn more check out Agent Subscriptions.
Then set it in your environment:
export QN_SDK__API_KEY="YOUR_API_KEY"
Install
The SDK ships precompiled binaries for Linux (glibc and musl, x86_64 and aarch64) and macOS Apple Silicon. Browsers, Windows (use WSL2), and Intel macOS are not supported. See Platform support for the full matrix.
- Node.js
Python
- Rust
- Ruby
npm install @quicknode/sdk
The Node.js package supports TypeScript, CommonJS, ES modules, and Bun.
pip install quicknode-sdk
The Python package requires Python 3.11 or newer.
cargo add quicknode-sdk
gem install quicknode_sdk
Make your first request
List the endpoints available to your account with the Admin API client.
- Node.js
Python
- Rust
- Ruby
import { QuicknodeSdk } from "@quicknode/sdk";
const qn = QuicknodeSdk.fromEnv();
const response = await qn.admin.getEndpoints({ limit: 20 });
console.log(response.data);
import asyncio
from sdk import QuicknodeSdk
async def main():
qn = QuicknodeSdk.from_env()
response = await qn.admin.get_endpoints(limit=20)
print(response.data)
asyncio.run(main())
use quicknode_sdk::QuicknodeSdk;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let qn = QuicknodeSdk::from_env()?;
let response = qn.admin.get_endpoints(&Default::default()).await?;
println!("{:?}", response.data);
Ok(())
}
require "quicknode_sdk"
qn = QuicknodeSdk::SDK.from_env
response = qn.admin.get_endpoints(limit: 20)
puts response["data"]
Configure directly
You can also pass in a configuration directly instead of using default environment variables.
- Node.js
Python
- Rust
- Ruby
import { QuicknodeSdk } from "@quicknode/sdk";
const qn = new QuicknodeSdk({
apiKey: "YOUR_API_KEY",
http: {
timeoutSecs: 30,
},
});
from sdk import HttpConfig, QuicknodeSdk, SdkFullConfig
qn = QuicknodeSdk(
SdkFullConfig(
api_key="YOUR_API_KEY",
http=HttpConfig(timeout_secs=30),
)
)
use quicknode_sdk::{QuicknodeSdk, SdkFullConfig};
let qn = QuicknodeSdk::new(
&SdkFullConfig::builder()
.api_key("YOUR_API_KEY")
.build(),
)?;
The Ruby binding currently exposes QuicknodeSdk::SDK.from_env. Configure it with QN_SDK__API_KEY and the other QN_SDK__* environment variables.
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
QN_SDK__API_KEY | Yes | None | Your Quicknode API key |
QN_SDK__HTTP__TIMEOUT_SECS | No | 30 | HTTP request timeout in seconds |
QN_SDK__HTTP__POOL_MAX_IDLE_PER_HOST | No | None | Max idle HTTP connections per host |
QN_SDK__ADMIN__BASE_URL | No | https://api.quicknode.com/v0/ | Override the Admin API base URL |
QN_SDK__STREAMS__BASE_URL | No | https://api.quicknode.com/streams/rest/v1/ | Override the Streams API base URL |
QN_SDK__WEBHOOKS__BASE_URL | No | https://api.quicknode.com/webhooks/rest/v1/ | Override the Webhooks API base URL |
QN_SDK__KVSTORE__BASE_URL | No | https://api.quicknode.com/kv/rest/v1/ | Override the Key-Value Store API base URL |
Product clients
Once initializated, a single client gives you access to all Quicknode product APIs:
const endpoints = await qn.admin.getEndpoints();
const streams = await qn.streams.listStreams();
const webhooks = await qn.webhooks.listWebhooks();
const sets = await qn.kvstore.getSets();
Language conventions
| Language | Convention |
|---|---|
| Node.js / TypeScript | Methods are async and use camelCase names. Pass parameters as a single options object. |
| Python | Methods are async and use snake_case names. Pass parameters as keyword arguments. |
| Rust | Methods are async and return Result types. Request structs use builders where available. |
| Ruby | Methods are blocking and use snake_case names. Responses are returned as Ruby hashes; access keys directly. |
For complete workflows, see Examples. To review the full behavior for each product API, see the REST API docs for Admin API, Streams, Webhooks, and Key-Value Store.