Quick Start API
Start with Carbium Swap API: create a key, make one authenticated quote request, then move into Q1, execution, pricing, or production guides.
Quick Start API
Use this page when you want the fastest path from zero to one working Carbium Swap API request.
The deeper pages own the full product map, executable quote behavior, signing flow, pricing, and error handling. This quick start stays intentionally light: get a key, make one GET /api/v2/quote request, then choose the right next guide.
Part of the Carbium Solana infrastructure stack.
The 5-minute path
For most new integrations, start in this order:
- Create a Swap API key at api.carbium.io.
- Store it as
CARBIUM_API_KEYin your backend environment. - Send one authenticated quote request to
https://api.carbium.io/api/v2/quote. - Add
user_accountonly when you are ready to request an executable transaction payload. - Move into the execution guide after the quote response is stable.
That sequence prevents two common first-day mistakes: using the RPC key on the Swap API, and mixing Q1 v2 parameter names with the older v1 quote or swap request family.
What you need first
| Item | Where it comes from | Notes |
|---|---|---|
| Swap API key | Get Your API Key | Sent as X-API-KEY, not as an RPC query parameter |
| Quote endpoint | https://api.carbium.io/api/v2/quote | Current Q1 quote flow |
| Token mints | Your app or token list | Send amounts in smallest units |
| Slippage value | Your app policy | Q1 uses slippage_bps |
Use a dedicated environment variable so the Swap API key is not confused with your RPC key:
CARBIUM_API_KEY=api_live_xxxCarbium Swap API uses the
X-API-KEYheader onapi.carbium.io. Carbium RPC uses a separate RPC key onrpc.carbium.io.
First call: quote SOL to USDC
Run a quote-only request before you wire the response into a wallet or backend executor:
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"This request uses the current Q1 parameter family:
| Parameter | Meaning |
|---|---|
src_mint | Input token mint |
dst_mint | Output token mint |
amount_in | Raw input amount in smallest units |
slippage_bps | Slippage tolerance in basis points |
If the response returns quote data, your key, endpoint, and request shape are wired well enough to continue.
When you need a transaction payload
Quote-only responses are useful for price display, route inspection, and early integration checks. When your app needs an executable transaction, add user_account to the same 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&user_account=YOUR_WALLET' \
--header "X-API-KEY: $CARBIUM_API_KEY"The response can include txn, a base64 transaction payload. Your app still owns signing, submission, and confirmation.
Use Q1 for the full request and response shape. Use Quote to Swap Integration Guide when you are ready to connect quote, signing, RPC submission, and confirmation into one flow.
Choose the next page by job
| If your next question is... | Go here |
|---|---|
| How do I create and test the right key? | Get Your API Key |
| What fields does Q1 return? | Q1 |
| How do I sign and submit the returned transaction? | Quote to Swap Integration Guide |
Why did auth, route lookup, or txn generation fail? | Swap API Errors Reference |
| Which plan fits my expected quote traffic? | Pricing, Limits and Quotas |
| How does the product fit wallets, bots, and CQ1 routing? | Carbium Swap API |
Ready to build with Carbium Swap API? Start with the setup flow at carbium.io, then make the first Q1 request from your backend.
Updated 28 days ago
Your API key is now ready to use.
