Authentication
The Bizora Integration API uses API keys for authentication. All requests must include a valid API key.
API Key Format
API keys start with sk_live_ followed by a random string:
sk_live_abc123def456ghi789...
How to Authenticate
Option 1: Authorization Header (Recommended)
Authorization: Bearer sk_live_YOUR_API_KEY
Option 2: X-Api-Key Header
X-Api-Key: sk_live_YOUR_API_KEY
Examples
Python (OpenAI SDK)
import openai
client = openai.OpenAI(
api_key="sk_live_YOUR_API_KEY", # Your API key
base_url="https://dev.api-bizora.ai/v1"
)
cURL
curl -X POST https://dev.api-bizora.ai/v1/chat/completions \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "bizora", "messages": [...]}'
JavaScript
const client = new OpenAI({
apiKey: 'sk_live_YOUR_API_KEY',
baseURL: 'https://dev.api-bizora.ai/v1'
});
Managing API Keys
Creating a Key
- Go to https://webapp-dev.bizora.ai
- Navigate to Developers → API Keys
- Click Create New Key
- Give it a descriptive name
- Copy the key (shown only once!)
Revoking a Key
If your API key is compromised:
- Go to Developers → API Keys
- Find the key you want to revoke
- Click Revoke Key
- Create a new key to replace it
Security Best Practices
Keep Your API Key Secret
Never share your API key or commit it to version control!
✅ Do's
- Store API keys in environment variables
- Use different keys for development and production
- Rotate keys regularly
- Revoke unused keys
❌ Don'ts
- Don't commit API keys to Git
- Don't share keys in public forums
- Don't use the same key across multiple projects
- Don't expose keys in client-side code
Environment Variables
Store your API key securely:
# .env file
BIZORA_API_KEY=sk_live_YOUR_API_KEY
import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("BIZORA_API_KEY"),
base_url="https://dev.api-bizora.ai/v1"
)
Error Responses
401 Unauthorized
Missing or invalid API key:
{
"error": {
"message": "Invalid API key",
"type": "authentication_error",
"code": null
}
}
402 Payment Required
Insufficient balance:
{
"error": {
"type": "insufficient_balance",
"message": "Your API balance is insufficient...",
"details": {
"balance_before_cents": 50,
"cost_cents": 100
}
}
}
Next Steps
- Learn about Rate Limits
- Explore the API Reference
- Check Error Handling