Every API request to Modexia requires authentication to authorize spending and manage your multi-party computation wallet. We support two methods: Header Keys and JWT Tokens.
Pass your Modexia API key in the x-modexia-key header. This is the simplest and recommended method for server-side code, scripts, and autonomous Python AI agents.
curl https://api.modexia.software/api/v1/user/me \
-H "x-modexia-key: mx_test_abc123..."Pass a JWT in the Authorization header. This method is utilized internally by the Modexia dashboard and web applications authenticating directly to the Gateway securely.
curl https://api.modexia.software/api/v1/user/me \
-H "Authorization: Bearer eyJhbGciOi..."The prefix of your API key explicitly defines which environment your agent connects to. Keys cannot cross environment boundaries.
| Prefix | Environment | |
|---|---|---|
mx_test_ | Sandbox — Connected to testnet networks. Faucet USDC. Safe for development. Real money is not involved. | |
mx_live_ | Production — Connected to mainnet networks. Real USDC. Transactions are final. |
Secure your API Key