Skip to main content
All Adaline API requests and SDK calls require authentication via a Bearer token (API key).

Getting Your API Key

  1. Log in to the Adaline Dashboard
  2. Follow the steps to Create API Keys.

Using Your API Key

REST API

Include your API key in the Authorization header as a Bearer token:
curl -X GET "https://api.adaline.ai/v2/some-endpoint" \
  -H "Authorization: Bearer YOUR_API_KEY"

TypeScript SDK

The SDK reads from the ADALINE_API_KEY environment variable by default:
export ADALINE_API_KEY=your-api-key
import { Adaline } from "@adaline/client";

// Reads ADALINE_API_KEY automatically
const adaline = new Adaline();

// Or pass it explicitly
const adaline = new Adaline({ apiKey: "your-api-key" });

Python SDK

export ADALINE_API_KEY=your-api-key
from adaline import Adaline

# Reads ADALINE_API_KEY automatically
adaline = Adaline()

# Or pass it explicitly
adaline = Adaline(api_key="your-api-key")

Error Responses

If authentication fails, the API returns a 401 Unauthorized response:
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key."
  }
}
Common causes:
  • Missing Authorization header
  • Malformed token (missing Bearer prefix)
  • Expired or revoked API key
  • Key does not have permission for the requested resource