Getting started

Authentication

Send your API key in either header on every request. Keys are minted in the dashboard and shown once.

The API is available to paying accounts — an active subscription or at least one completed credit-pack purchase. Free accounts can browse the dashboard, but /v1 calls return 403 until a payment is on file.

Send the key

auth header
-H "Authorization: Bearer pb_live_xxx"
# or
-H "x-api-key: pb_live_xxx"
headers = {"Authorization": f"Bearer {API_KEY}"}
const headers = { Authorization: `Bearer ${apiKey}` };

Rotating a key

  1. Create a new key first — do not break running integrations.
  2. Update your services to use it.
  3. Revoke the old key from the dashboard.
Keep keys server-side A leaked pb_live_ key can spend your whole balance. Store it in a secret manager — never ship it to a browser or commit it.

Who can use the API

Access is granted to any account with a real-money purchase on file — an active subscription or at least one completed credit-pack purchase. A completed purchase entitles you permanently; you don't need a current subscription. Calls from an account with no payment on file return 403 with error.code 6014.

Libraries & tooling

No SDK is required — /v1 is plain REST with a { success, data } envelope. When you want a typed client or an agent integration:

generate a typed client from the live spec
# Any OpenAPI 3 generator works — e.g. openapi-generator
npx @openapitools/openapi-generator-cli generate \
  -i https://api.picoberry.ai/api-json \
  -g typescript-fetch -o ./picoberry-client