Getting started

Authentication

All requests to the BimpeAI API are authenticated with a team API key. Keys are prefixed with sk_ and are issued from the Console dashboard under Settings → API keys.

Sending the key

Pass the key in one of two headers:

Authorization: Bearer sk_...

or

X-Api-Key: sk_...

The SDK handles this for you — pass the key at construction time and it attaches the correct header on every request.

Reading the key from the environment

Store the key in BIMPEAI_API_KEY and read it at runtime rather than hard-coding it.

import { BimpeAI } from "@bimpeai/sdk";

const bimpe = new BimpeAI({ apiKey: process.env.BIMPEAI_API_KEY! });
import os
from bimpeai import BimpeAI

client = BimpeAI(api_key=os.environ["BIMPEAI_API_KEY"])

Scope-restricted keys

Keys can be issued with a restricted set of permissions. Calling an endpoint outside the key's scope returns a 403 response with the error code insufficient_scope, which the SDK surfaces as PermissionDeniedError.

On this page