Authentication

The Meibel AI API uses API keys to authenticate requests. All API requests must include your API key in the Authorization header.

API Keys

Your API key carries many privileges, so be sure to keep it secure. Do not share your API key in publicly accessible areas such as GitHub, client-side code, or in your applications.

Obtaining an API Key

  1. Sign in to your Meibel AI Dashboard
  2. Navigate to Settings > API Keys
  3. Click “Create New API Key”
  4. Give your key a descriptive name and set appropriate permissions
  5. Copy the key immediately—you won’t be able to see it again!

API keys should be stored securely in environment variables or a secrets management solution, never in your codebase.

Making Authenticated Requests

All API requests must be made over HTTPS and include an Authorization header with your API key.

Using the Authorization Header

curl -X GET https://api.meibel.ai/v1/datasources \
  -H "Authorization: Bearer YOUR_API_KEY"

Using the SDKs

Our official SDKs handle authentication for you when provided with an API key:

# Python SDK Example
from meibelai import Meibelai
import os

# Initialize the SDK with your API key
client = Meibelai(
    api_key_header=os.getenv("MEIBELAI_API_KEY_HEADER")
)

# Make API calls
datasources = client.datasources.list()
// Node.js SDK Example
import { Meibelai } from 'meibelai';

// Initialize the SDK with your API key
const client = new Meibelai({
  apiKeyHeader: process.env.MEIBELAI_API_KEY_HEADER
});

// Make API calls
const datasources = await client.datasources.list();

API Key Security Best Practices

To keep your API keys secure:

1

Use environment variables

Store API keys in environment variables, not in your code

2

Implement key rotation

Rotate your API keys periodically

3

Set appropriate permissions

Create keys with the minimum necessary permissions

4

Monitor usage

Regularly review API key usage in the dashboard

5

Revoke compromised keys

Immediately revoke any keys that may have been compromised

Environment-Specific Keys

For better security and monitoring, we recommend using different API keys for development, testing, and production environments.

Development

Limited rate limits, used for local development

Testing

Moderate rate limits, used for CI/CD and QA

Production

High rate limits, used for live applications

Troubleshooting Authentication

If you’re experiencing authentication issues:

  • Ensure your API key is valid and active in the dashboard
  • Check for typos in your Authorization header
  • Verify you’re including the “Bearer” prefix
  • Confirm your API key has the necessary permissions
  • Check if your account has any restrictions or billing issues

If problems persist, contact support@meibel.ai for assistance.