ModulesAI ModuleAuthentication

Authentication & Security

To make sure your data stays yours, we require a secret key for every request you send to Antarctica. These keys are validated at the edge before the data even reaches our main servers, keeping things fast and secure.

The Authorization Header

All data sent to https://otm-api.antarctica.io/ needs a Standard Bearer Token. Make sure you’re sending your requests over HTTPS (TLS 1.2+).

Here’s what a typical request header looks like:

POST /v1/telemetry/usage HTTP/1.1
Host: otm-api.antarctica.io
Authorization: Bearer ant_sk_XXXXXXXXXXXXXXXXXXXX
Content-Type: application/json

Essential Headers

HeaderWhy it matters?Required?
AuthorizationYour secret API key from the dashboard, prefixed with Bearer.Yes
Content-TypeTells our servers to expect JSON. Must be application/json.Yes
Idempotency-KeyA unique string (like a UUID) to prevent duplicate data if you have to retry a request.Recommended

Security Best Practices

1. Write-Only Keys

The API keys you generate for the AI Module are write-only. This means that even if a key is accidentally exposed, an attacker can’t use it to read your logs or see your data, they can only send new data.

2. If Authentication Fails

If your key is missing or incorrect, you’ll get a 401 Unauthorized error. It’ll look something like this:

{
  "message": "Authentication failed",
  "errorType": "AuthError",
  "statusCode": 401
}

3. Revoking a Compromised Key

If you accidentally commit your API key to a public repo (we’ve all been there!), don’t panic. Head over to the AI Module Configurations in your dashboard and delete the key immediately. We’ll stop accepting requests from that key across our entire network in less than 2 seconds.