Authentication
web3market-kit uses API keys for authentication. Authentication is required for deploying to remote chains, browsing templates, AI contract review, marketplace publishing, and AI chat. Local development features work without it.
Getting an API Key
Create an account
Sign up at web3.market.
Generate a key
Go to Dashboard > Plan & API and click New Key. Your key looks like:
wm_sk_live_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6Copy it immediately — it is only shown once.
Authenticate via the CLI
w3m auth wm_sk_live_your_key_hereThe CLI validates the key against the API, stores it in ~/.web3market/credentials.json, and displays your account info.
Key Format
| Prefix | Purpose |
|---|---|
wm_sk_live_ | Production keys |
wm_sk_test_ | Test keys |
Keys are 48 characters long (prefix + 32 hex characters).
Credential Storage
The CLI stores your API key in ~/.web3market/credentials.json in your home directory (not in your project). This file is created by w3m auth and read automatically by all CLI commands that require authentication.
{
"apiKey": "wm_sk_live_..."
}You can also set the key as an environment variable:
WEB3MARKET_API_KEY=wm_sk_live_your_key_hereThe CLI checks the environment variable first, then falls back to the credentials file.
Do not commit API keys to version control. The credentials file is in your home directory, not in your project.
CLI Commands
| Command | Description |
|---|---|
w3m auth <key> | Validate and store an API key |
w3m auth --status | Show current auth status (name, email, tier, masked key) |
w3m auth --logout | Delete stored credentials |
What Requires Authentication
| Feature | API key | AI provider | Plan |
|---|---|---|---|
Create a project (w3m new) | No | No | Free |
Start dev environment (w3m dev) | No | No | Free |
| Deploy locally (Anvil) | No | No | Free |
Run tests (w3m test) | No | No | Free |
Security audit (w3m audit) | No | No | Free |
Interactive workspace (w3m) | No | No | Free |
Auto-fix (w3m fix) | No | Yes | Free |
AI Chat (w3m chat) | Yes | Yes | Free |
AI contract review (w3m audit --ai) | Yes | No | Pro |
Deploy to testnet (w3m deploy --chain sepolia) | Yes | No | Free |
Deploy to mainnet (w3m deploy --chain ethereum) | Yes | No | Pro |
Browse templates (w3m templates) | Yes | No | Free |
Publish (w3m publish) | Yes | No | Pro |
AI provider means your own Anthropic (Claude) or OpenAI (GPT) key, configured via w3m ai setup.
All local development features work without authentication. An API key is needed for deploying to remote chains, browsing templates, AI chat, and marketplace publishing.
API Key Authentication
All API requests include the key in the X-API-Key header:
curl https://api.web3.market/api/auth/me \
-H "X-API-Key: wm_sk_live_your_key_here" \
-H "Accept: application/json"See the API Reference for endpoint details and rate limits.