Authentication

All API requests require authentication. We use Bearer Token authentication to ensure your API calls are secure and reliable.

Getting API Key

Please go to Console → API Tokens to create and manage your API keys.

Steps to create
  1. Log in to your Aiberm account
  2. Go to the Console page
  3. Click “API Tokens” in the left menu
  4. Click “New Token” button
  5. Set token name and permissions
  6. Copy the generated API key

Code Examples

Code Examples

1curl https://aiberm.com/v1/chat/completions \
2-H "Content-Type: application/json" \
3-H "Authorization: Bearer YOUR_API_KEY" \
4-d '{
5 "model": "google/gemini-2.5-flash",
6 "messages": [
7 {
8 "role": "user",
9 "content": "Hello!"
10 }
11 ]
12}'

Security Notes

  • Keep your API key secure and do not expose it in client-side code
  • Regularly rotate API keys to improve account security
  • If your API key is leaked, delete it immediately in the console and regenerate a new one
  • Use environment variables to store API keys instead of hardcoding them

Common Errors

401 Unauthorized

Invalid or expired API key

Solution: Check if the API key is correct, or regenerate a new API key

403 Forbidden

Insufficient permissions or restricted account

Solution: Check account status and contact administrator for appropriate permissions