Get API Key
🔑 Step 1: Get an API Key
To interact with PredictBase programmatically, you need an API key. Your API key is wallet-bound and authorizes actions on your behalf.
You can obtain an API key in two ways:
Option A: Get an API Key via PredictBase App (Recommended)
Visit https://predictbase.app
Connect your wallet
Navigate to your profile in the top-right corner and click Developer API Key.
Generate an API key

⚠️ Your API key is shown only once. Store it securely.
Option B: Get an API Key via API Endpoints
This method is useful for automated setups and bots.
1️⃣ Request a nonce
Full URL
Response:
2️⃣ Sign the message with your wallet
After requesting a nonce from the PredictBase API, you must sign the returned message using your wallet. This proves wallet ownership and authorizes API key creation.
Example (using viem):
The resulting signature is then sent to the create-api-key endpoint.
3️⃣ Create the API key
Full URL
Body:
Response:
Use this API key in all requests via the x-api-key header.
Last updated