Quickstart
Prerequisites
- Node.js 20 or newer. The SDK is server-only.
- A Blank account with a username set and a verified wallet.
- A scoped API key for the environment you are calling.
1. Install the SDK
/api/v2.
Version 3 ships typed resource modules, runtime response validation, bounded retries, durable idempotency keys, Problem Details errors, pagination helpers, transaction-intent submission, and webhook signature verification.
2. Create an API key
- Sign in at blank.build and open Settings.
- Set a username if the account does not have one.
- Create a key: name it, pick an expiry, and select only the scopes it needs. Scopes cannot be widened after creation.
- Copy the secret immediately. It is displayed once and never again.
blank_live_. Development and staging keys start with blank_test_. See Authentication for the full lifecycle.
3. Configure your server environment
4. Create a client
https://api.blank.build/api/v2. Override baseUrl only for a trusted staging or local Blank deployment; it must use HTTPS outside localhost.
apiKey also accepts a function returning a string or Promise<string>, so you can pull the credential from a secret manager on each request.
5. Confirm the key
GET /me works with any valid key and returns nothing beyond the key’s own identity. It is the fastest way to check that a credential, environment, and scope set are what you expect.
6. Read public data
Token and market reads need no key at all:7. Read the response metadata
Every SDK call returns{ data, metadata, response }.
metadata.requestId alongside every failure. It is the identifier Blank needs to trace a request.
Next steps
Scopes
Exactly which scope each operation requires.
Conventions
Pagination, rate limits, retries, deadlines, and idempotency.
Price predictions
The main automation surface: eligibility, rounds, and submissions.
Webhooks
Signed CloudEvents instead of polling.