Getting Started
Wallet Authentication (SIWX)
If you already have a crypto wallet, you can use it to authenticate with Hober directly. No email, no password, no account creation. This uses CAIP-122, the same "Sign-In With X" standard used by dApps across Solana and EVM chains.
Wallet auth is ideal for web apps where users already have a wallet connected (like a DeFi dashboard or an agent management portal). For server-to-server calls, use an API key instead. For autonomous agents, consider x402 which requires no authentication at all.
When to Use Which Auth Method
| Method | Duration | Use Case |
|---|---|---|
| API Key | Permanent | Server-to-server, CI/CD, backend apps |
| JWT Session | 24 hours | Web apps, dashboards, interactive use |
| Inference Pass | 30 days / N requests | Prepaid access, agent wallets |
| x402 (no auth) | Per request | Wallet-only, no account needed |
SIWX Flow
# Step 1: Get a challenge
curl "https://api.hober.dev/api/siwx/challenge?wallet=YOUR_WALLET"
# Response: { "message": "api.hober.dev wants you to sign in...", "nonce": "abc123", "issuedAt": "..." }
# Step 2: Sign the message with your wallet, then create session
curl -X POST https://api.hober.dev/api/siwx/session \
-H "Content-Type: application/json" \
-d '{
"message": "THE_CHALLENGE_MESSAGE",
"signature": "BASE58_SIGNATURE",
"walletAddress": "YOUR_WALLET"
}'
# Response: { "token": "eyJhbG...", "developerId": "...", "walletAddress": "YOUR_WALLET" }Supported Chains
SIWX sign-in works with Solana wallets only. EVM wallets are not supported on this endpoint.
| Chain | Signature | Verification |
|---|---|---|
| Solana | ed25519 | nacl.sign.detached.verify |
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/siwx/challenge | Get nonce + sign message |
| POST | /api/siwx/session | Create JWT session from signed message |
| POST | /api/siwx/pass/purchase | Buy inference pass (N requests / 30 days) |
| GET | /api/siwx/pass/status | Check pass remaining requests |