JavaScript (npm)
npm install @alectocore/sdk
Supports Node.js 18+ and browser-capable fetch runtimes.
Use official clients for JavaScript, Python, and PHP. The SDKs sit alongside the OpenAPI spec and public docs so teams can move from a first test call to a production integration faster.
npm install @alectocore/sdk
Supports Node.js 18+ and browser-capable fetch runtimes.
pip install alectocore-sdk
Pure Python client for Python 3.9+ with zero runtime dependencies.
composer require alectocore/sdk
PHP 8.0+ client with cURL-based transport and typed exceptions.
import { AlectoCoreClient } from "@alectocore/sdk";
const client = new AlectoCoreClient({ apiKey: process.env.ALECTO_API_KEY });
const out = await client.moderate({ text: "you are an idiot" });
console.log(out.action, out.score);
from alectocore_sdk import AlectoCoreClient
client = AlectoCoreClient(api_key="ak_live_xxx")
out = client.moderate({"text": "you are an idiot"})
print(out["action"], out["score"])
<?php
use AlectoCore\AlectoCoreClient;
$client = new AlectoCoreClient("ak_live_xxx");
$out = $client->moderate(["text" => "you are an idiot"]);
echo $out["action"] . " " . $out["score"];