Get your API key
1
Sign up
Create an account at platform.decart.ai
2
Create an API Key
Navigate to API Keys and create a new API Key
3
Copy key
Copy your API key
Use your API key
Pass your API key when making requests:Best practices
- Store keys in environment variables
- Rotate keys regularly
- Use different keys for development and production
Client Tokens for Realtime API
When building client-side applications (browsers, mobile apps) that connect to the Realtime API via WebRTC, you should use client tokens instead of your permanent API key.Why use client tokens?
Client tokens are short-lived API keys designed for client-side use:- Safe to expose: Can be sent to browsers and mobile apps
- Short TTL: Expire after 10 minutes, limiting exposure window
- Limited scope: Cannot create other tokens
- Session-aware: Expired tokens prevent new connections but don’t disconnect active sessions
How it works
- Your backend creates a client token using your permanent API key
- Your backend passes the client token to the frontend
- The frontend uses the client token to authenticate the WebRTC connection

Creating client tokens
Create client tokens from your backend using the SDK:Best practices for client tokens
- Generate client tokens on-demand when users need realtime access
- Never log or persist client tokens on the client side