Getting Started
Get a Triport API key and make your first multi-chain JSON-RPC call in under five minutes.
| Method / Endpoint | n/a — quickstart walkthrough |
| Network | Solana | Ethereum | Polygon |
| Authentication | x-token header (SDK-preferred); see Authentication for other forms |
| Required scope | — |
| Tier / rate limit | Any tier (free 7-day trial works); see Rate Limits |
Overview
Triport is a multi-chain RPC platform. You send standard JSON-RPC requests to a single base URL and Triport routes them to the right network backend, applies your tier's rate limits, and returns the upstream result unchanged.
There are two base URLs:
| Environment | Base URL |
|---|---|
| Production | https://api.triport.io |
| Staging | https://staging.api.triport.io |
This page walks you from zero to a verified Solana getBalance response.
1. Get an API key
- Sign in to the Triport billing portal.
- Create a project — this issues a static API key (it looks like
nl_live_…). - Every new account starts on the free tier, which includes a 7-day trial (EU region only). No credit card is required to start; you can upgrade later for more requests-per-second and multi-region routing. See Rate Limits for the full tier matrix.
Keep your key secret. Throughout this guide it is referenced as the environment
variable $TRIPORT_API_KEY:
export TRIPORT_API_KEY="nl_live_your_key_here"2. Make your first request
Triport's SDK-preferred way to send your key is the x-token header. Send a
standard JSON-RPC 2.0 body to the base URL with your network's path.
Here is a Solana getBalance
request against production:
curl https://api.triport.io/sol \
-H "x-token: $TRIPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBalance",
"params": ["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"]
}'3. Read the response
A successful call returns the upstream JSON-RPC result verbatim. For
getBalance, the balance (in lamports) is under result.value:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": { "slot": 268420690 },
"value": 11110795
}
}That's it — you're live. Every other method works the same way: swap the
method/params, and (for other chains) the path.
What the path means
| Network | Path |
|---|---|
| Solana | https://api.triport.io/sol |
| Ethereum | https://api.triport.io/eth |
| Polygon | https://api.triport.io/polygon |
Authentication, briefly
x-token is the recommended header, but Triport accepts your key in several
forms, tried in this priority order:
x-token: <key>header — preferred (used by the SDKs).Authorization: Bearer <key>header — standard Bearer scheme.?api-key=<key>query parameter — legacy.- Path form
/<chain>/<key>— works only fornl_live_*API keys.
Full details, including when to use each, are on the Authentication page.
Rate limits, briefly
Triport rate-limits by sustained requests-per-second, scoped to your tier and the request's category, with a global burst multiplier of 2×. There is no daily quota — only the per-second budget.
Rate-limit state is reported on responses via these headers:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Allowed RPS for your tier + category |
X-RateLimit-Remaining | Remaining capacity in the current 1s window |
X-RateLimit-Reset | UNIX timestamp when the window resets |
X-RateLimit-Category | Category bucket charged for this request |
When you exceed your budget you get an HTTP 429 with a Retry-After header.
See Rate Limits for per-tier numbers.
Handling errors
Errors come back as a JSON envelope with a machine-readable error code and a
human message. The common ones during onboarding:
| HTTP | error | When it happens |
|---|---|---|
| 401 | unauthorized | Missing or invalid key |
| 401 | trial_expired | Your free 7-day trial ended |
| 403 | tier_insufficient | Method requires a higher tier |
| 403 | method_unknown | Method not part of that chain's product |
| 429 | rate_limited | Sustained RPS exceeded |
See the Errors page for the full envelope and the typed error schemas.
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/sol", {
method: "POST",
headers: {
"x-token": process.env.TRIPORT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "getBalance",
params: ["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"],
}),
});
const { result } = await res.json();
console.log("lamports:", result.value);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const balance = await triport.sol.rpc("getBalance", [
"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
]);
console.log("lamports:", balance.value);Python (triport-sdk)
import os
from triport import Triport
triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])
balance = triport.sol.rpc("getBalance", ["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg"])
print("lamports:", balance["value"])Next steps
- Authentication — every supported auth form and when to use it.
- Rate Limits — per-tier RPS budgets, burst behavior, and the rate-limit headers.
- Errors — the full error envelope and typed error schemas.
- Browse the per-method references for Solana, Ethereum, and Polygon to find the call you need.