> ## Documentation Index
> Fetch the complete documentation index at: https://blank.build/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Developers

> The Blank API v2 developer contract: production base URL, scoped server-side keys, and the SDK-first integration path.

# Developers

Blank exposes one public developer contract: **API v2**, served from `https://api.blank.build/api/v2`. It is a read-and-automate surface for Blank tokens — market data, fees, staking, presales, and price predictions — plus outbound webhooks and signed transaction submission.

The supported integration path is the server-side TypeScript SDK. Raw HTTP is fully documented for other languages and backend adapters.

```ts theme={null}
import { BlankClient } from "@blankdotbuild/sdk";

const blank = new BlankClient({ apiKey: process.env.BLANK_API_KEY });

const token = await blank.tokens.get(mintAddress);
console.log(token.data.symbol, token.metadata.requestId);
```

<Warning>
  Blank API keys are server-side credentials. The SDK refuses to accept one in a
  browser runtime, and API-key requests receive no browser CORS allowance. Only
  anonymous read operations are reachable from a browser.
</Warning>

## What the API covers

| Area                                                             | Operations                                                                  | Auth                                                                          |
| ---------------------------------------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [Tokens and market data](/docs/for-developers/market-data)            | Token list and detail, market snapshot, OHLCV candles, trades, holder stats | Anonymous                                                                     |
| [Fees](/docs/for-developers/fee-status)                               | Fee state and distribution history                                          | `fees:read`                                                                   |
| [Staking](/docs/for-developers/developer-staking)                     | Pool state, leaderboard, your own positions                                 | Anonymous / `staking:read`                                                    |
| [Presales](/docs/for-developers/presales)                             | Presale list and detail, your own participation                             | Anonymous / `presales:read`                                                   |
| [Price predictions](/docs/for-developers/predictions)                 | Rounds, entries, standings, direct and wallet-delegated submission          | Anonymous / `predictions:read` / `predictions:write` / `predictions:delegate` |
| [Operations and transaction intents](/docs/for-developers/operations) | Async operation status, signed transaction submission                       | `operations:read` / `transactions:write`                                      |
| [Webhooks](/docs/for-developers/webhooks)                             | Endpoints, signing secrets, deliveries, replay                              | `webhooks:read` / `webhooks:write`                                            |
| [Identity](/docs/for-developers/authentication)                       | Inspect the calling key's account, wallet, scopes, and expiry               | Any valid key                                                                 |

Every operation, request schema, and response schema is listed in the [HTTP reference](/docs/reference/http-reference) and the generated [OpenAPI reference](/docs/api-reference/introduction).

## What the API does not cover

The public contract is deliberately narrow. These are **not** part of API v2:

* Programmatic token launches. Tokens are launched from [blank.build](https://blank.build).
* Buying, selling, staking, unstaking, or claiming. Those are wallet-signed app and dashboard flows.
* Enabling or changing fee allocations, staking allocations, or Price Prediction allocations.
* Audience exports.
* Any unversioned Worker path. Paths outside `/api/v2` are internal and carry no stability contract.

<Note>
  There is no v1 contract, no unversioned alias, no redirect, and no
  compatibility adapter. Anything written against a previous Blank developer API
  must be rewritten against v2.
</Note>

## Design contract

* **Environment-bound keys.** A key belongs to one Blank account, one environment, and that account's single verified wallet. See [Authentication](/docs/for-developers/authentication).
* **Least-privilege scopes.** Every protected operation declares the scopes it requires. See [Scopes](/docs/for-developers/scopes).
* **RFC 9457 Problem Details.** Every error is `application/problem+json` with a stable `code` and a `requestId`. See [Errors](/docs/reference/errors).
* **Durable idempotency.** Every mutation requires an `Idempotency-Key` and is committed atomically. See [Conventions](/docs/for-developers/conventions).
* **Cursor pagination.** Lists return opaque, query-bound cursors — never offsets.
* **Wallet signatures are never replaced by a key.** An API key authorizes preparing and submitting a transaction; the wallet still signs it. See [Operations and transaction intents](/docs/for-developers/operations).
* **Prediction delegation is signature-bound.** A `predictions:delegate` key identifies the server integration, while the end user's verified wallet signs the exact short-lived round, wallet, and price intent. See [Price Predictions](/docs/for-developers/predictions#delegated-submissions).
* **Decimal strings.** Prices and SOL amounts are canonical decimal strings; raw on-chain amounts are unsigned integer strings. Never parse them as JSON numbers.

## Start here

<Columns cols={2}>
  <Card title="Quickstart" icon="rocket" href="/docs/for-developers/quickstart">
    Install the SDK, create a scoped key, make your first authenticated call.
  </Card>

  <Card title="Authentication" icon="key" href="/docs/for-developers/authentication">
    Key format, environments, scopes, rotation, revocation, and secret handling.
  </Card>

  <Card title="Conventions" icon="settings" href="/docs/for-developers/conventions">
    Pagination, rate limits, request IDs, retries, deadlines, idempotency.
  </Card>

  <Card title="Errors" icon="triangle-alert" href="/docs/reference/errors">
    The Problem Details envelope and the full stable error-code catalogue.
  </Card>
</Columns>
