Quickstart
Get from zero to your first governed AI output in under 5 minutes.
1. Install the SDK
npm install @gravito/sdk
pip install gravito
2. Initialize the client
import { Gravito } from '@gravito/sdk';
const gravito = new Gravito({
apiKey: process.env.GRAVITO_API_KEY,
});3. Check your first AI output
const result = await gravito.check({
text: "Our AI assistant is 100% accurate and never makes mistakes.",
checks: ["accuracy", "safety", "brand"],
});
if (!result.passed) {
console.log("Violations found:", result.violations);
// Handle or block the output
}4. Or use the REST API directly
curl -X POST 'https://api.gravito.ai/v1/check' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"text": "Our AI assistant is 100% accurate.",
"checks": ["accuracy", "safety", "brand"]
}'Example response
{
"passed": false,
"score": 0.42,
"violations": [
{
"check": "accuracy",
"severity": "high",
"message": "Unverifiable absolute claim: '100% accurate'",
"suggestion": "Replace with a qualified claim backed by data"
}
],
"latency_ms": 47
}