Bitparse

Authentication

Authenticate with the Bitparse API using API keys.

Every request to the Bitparse API must include a valid API key. Keys are scoped to your account and track credit usage.

API Key Format

All keys use the prefix bp_ followed by a random string:

bp_k7G2mXpLw9...

The full key is shown only once at creation time. Store it in a secure location such as an environment variable or secrets manager.

Sending the Key

Pass the key in the X-API-Key header on every request:

curl -X POST https://api.bitparse.ai/parse \
  -H "X-API-Key: bp_YOUR_API_KEY" \
  -F "file=@document.pdf"

Do not send the key as a query parameter or in the request body — these methods are not supported.

Creating a Key

  1. Sign in to the Bitparse Dashboard.
  2. Navigate to Settings > API Keys.
  3. Click Create Key and give it an optional label (e.g., "Production", "CI").
  4. Copy the key immediately. You will not be able to view it again.

Revoking a Key

To revoke a key, open Settings > API Keys in the dashboard and click the delete icon next to the key you want to remove. Revoked keys return 401 Unauthorized immediately.

Best Practices

PracticeWhy
Store keys in environment variablesKeeps them out of source control
Use separate keys per environmentEasier to rotate and audit
Rotate keys periodicallyLimits exposure if a key leaks
Never commit keys to gitPrevents accidental public exposure

Example: Using an Environment Variable

export BITPARSE_API_KEY="bp_YOUR_API_KEY"

curl -X POST https://api.bitparse.ai/parse \
  -H "X-API-Key: $BITPARSE_API_KEY" \
  -F "file=@document.pdf"
import os, requests

resp = requests.post(
    "https://api.bitparse.ai/parse",
    headers={"X-API-Key": os.environ["BITPARSE_API_KEY"]},
    files={"file": open("document.pdf", "rb")},
)

Error Responses

StatusMeaning
401 UnauthorizedMissing or invalid API key
402 Payment RequiredValid key but insufficient credits

On this page