Authentication Methods
The Enterprise API supports three authentication methods. Choose the one that fits your security requirements:
Method 1: OAuth 2.0 Client Credentials (Recommended)
Best for: Machine-to-machine authentication, enterprise integrations
Steps:
Get OAuth token from
/v1/oauth/tokenendpoint (1 hour lifetime)Use token in
Authorization: Bearerheader for API calls
Example:
# Step 1: Get token
curl -X POST https://enterprise.bitmind.ai/v1/oauth/token \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_ID" \
-d "client_secret=YOUR_SECRET"
# Step 2: Use token
curl https://enterprise.bitmind.ai/image \
-H "Authorization: Bearer YOUR_TOKEN" \
--data-binary @image.jpgMethod 2: OAuth + mTLS (High Security - RFC 8705)
Best for: Government, healthcare, financial institutions
Steps:
Get OAuth token using certificate (certificate replaces client_secret)
Use token + certificate for all API calls
Example:
# Step 1: Get token with certificate (NO client_secret)
curl -X POST https://enterprise.bitmind.ai/v1/oauth/token \
-H "X-Client-Cert: $(base64 -w 0 client.crt)" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_ID"
# Step 2: Use token + certificate
curl https://enterprise.bitmind.ai/image \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Client-Cert: $(base64 -w 0 client.crt)" \
--data-binary @image.jpgMethod 3: Organization API Key (Legacy)
Best for: Existing enterprise clients
Steps:
Use API key directly in
Authorization: Bearerheader
Example:
curl https://enterprise.bitmind.ai/image \
-H "Authorization: Bearer enterprise-YOUR_API_KEY" \
--data-binary @image.jpgSetup: Configure your authentication at https://app.bitmind.ai/api/enterprise
Documentation: Complete Authentication Guide
Last updated