BentoSDK

Builder API Key

Generate a testnet Builder API key for the Bento SDK (hackathons).

The Builder API key identifies your application (layer 1). It is separate from the user JWT (layer 2) you get from EOA login. Catalog reads skip the builder key; login / register and user actions require it. Pass both when calling authenticated routes:

import { createBentoSdk, walletAuthProvider } from '@bento.fun/sdk';

const sdk = createBentoSdk({
  baseUrl: 'https://internal-server.bento.fun',
  apiKey: process.env.BENTO_BUILDER_API_KEY!, // required: x-builder-api-key
  auth: walletAuthProvider(() => ({ Authorization: `Bearer ${userJwt}` })),
});

Generate a key (testnet)

Use the form below during hackathons. Keys are minted only on the testnet markets host (internal-server.bento.fun). This site never creates mainnet keys.

Generate a testnet Builder API key

Testnet only

Keys are minted on internal-server.bento.fun only. Mainnet keys are not available from this form.

Copy the key immediately. It is shown once. Store it as BENTO_BUILDER_API_KEY (or NEXT_PUBLIC_BUILDER_API_KEY for browser apps) and pass it as apiKey to createBentoSdk.

How it fits with auth

LayerHeaderPurpose
Builder (app)x-builder-api-keyWho is calling (your SDK / app)
UserAuthorization: Bearer …Which Bento user is acting

See Authentication for EOA user login.

Rate limits

Your key has a request budget, and it is shared across every endpoint the key calls. Exceeding it returns 429 for everything that key is doing, not just the call that tripped it.

KeyDefault budget
Self-serve testnet key300 requests / minute
Key issued by the Bento team120 requests / minute

Both are configurable per app; ask if you need more. Two things worth doing:

  • Handle the 429. It arrives as kind: 'rate_limited'; wait at least getRetryAfterMs(err) before retrying. See Errors.
  • Pace your calls so you rarely see one. The SDK can throttle per endpoint locally. See Rate limits.

Treat the key as a secret: it identifies your app, carries your budget, and belongs server-side, never in client bundles.

Mainnet

Production / mainnet Builder keys are issued by Bento ops, not this form. Contact the team if you need a mainnet key after the hackathon.

On this page