Authentication

All API requests require authentication via a Bearer token in the Authorization header.

Headers

Every request must include:
Authorization: Bearer YOUR_API_KEY
Accept: application/json

Getting Your API Key

  1. Create an account at modelbeam.ai/register
  2. Go to modelbeam.ai/dashboard/api-keys
  3. Click Create API Key
  4. Copy the key immediately — it will only be shown once
New accounts receive $5 in free credits.

Example

curl https://api.modelbeam.ai/api/v1/client/balance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
import requests

headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json"
}

resp = requests.get(
    "https://api.modelbeam.ai/api/v1/client/balance",
    headers=headers
)
print(resp.json())
# {"data": {"balance": 5.00}}

Security Best Practices

  • Never expose your API key in client-side code
  • Use environment variables to store keys
  • Rotate keys periodically via the dashboard
  • Each key can be individually revoked without affecting other keys