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

  1. Open api.carbium.io.
  2. Click Get Started.
  3. Continue with one of the currently published login options:
    • Discord
    • X
  4. After login, open the API dashboard and copy or generate the key for your account.
  5. 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_xxx
📘Carbium 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:

SurfaceAuth pattern
https://api.carbium.io/api/v2/quoteX-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_xxx

First 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:

  • 401 usually means the header is missing
  • 403 usually 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 requestQ1
Check which key belongs to which Carbium surfaceCarbium Auth Matrix
Lock down storage, rotation, and safer backend usageAPI Key Security Best Practices
Start from the broader product map firstCarbium 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.