Get your API key
Create a Carbium Swap API key, verify the right auth header, and make your first authenticated quote request without mixing it up with the RPC key.
Get your API key
This page is the shortest path from zero to a working Carbium Swap API key.
Use it for one question only:
How do I get the right key for api.carbium.io and prove it works?
Part of the Carbium Solana infrastructure stack.
The 3-minute setup path
- Open api.carbium.io.
- Click Get Started.
- Continue with one of the currently published login options:
- Discord
- X
- After login, open the API dashboard and copy or generate the key for your account.
- Store it as an environment variable before you make any requests.
Use a dedicated variable name so you do not mix it up with the RPC key:
CARBIUM_API_KEY=api_live_xxxCarbium Swap API uses its own key. Do not reuse your RPC dashboard key on api.carbium.io.
What this key is for
Use the Swap API key on Carbium's trading surface:
| Surface | Auth pattern |
|---|---|
https://api.carbium.io/api/v2/quote | X-API-KEY: YOUR_API_KEY |
That is different from Carbium RPC, which uses the RPC dashboard key on rpc.carbium.io.
If your app needs both quoting and transaction submission, keep two secrets:
CARBIUM_API_KEY=api_live_xxx
CARBIUM_RPC_KEY=rpc_live_xxxFirst authenticated request
Once the key is in your environment, prove it works with one small Q1 request:
curl --request GET \
--url 'https://api.carbium.io/api/v2/quote?src_mint=So11111111111111111111111111111111111111112&dst_mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount_in=1000000&slippage_bps=50' \
--header "X-API-KEY: $CARBIUM_API_KEY"If the request succeeds, your setup is good enough to move on to the real integration flow.
If it fails:
401usually means the header is missing403usually means the key is invalid- mixed-up RPC and Swap API keys are a common first mistake
For deeper troubleshooting, use Swap API Errors Reference.
What to do next
Pick the next page based on what you are actually building:
| If you need to... | Go here |
|---|---|
| Make the current executable quote request | Q1 |
| Check which key belongs to which Carbium surface | Carbium Auth Matrix |
| Lock down storage, rotation, and safer backend usage | API Key Security Best Practices |
| Start from the broader product map first | Carbium Swap API |
This page stays intentionally narrow. It gets you the right key and one working request, then hands off to the deeper docs that own auth, security, and execution.
Ready to build on Solana with Carbium? Start the product setup flow at carbium.io and keep your Swap API key server-side from the start.
Updated 4 days ago
