API-Referenz
Mehrere Zeilen prüfen
Prüft bis zu 32 Zeilen in einer Anfrage. Gut für Rückstände, Logs oder Chat-Verläufe.
POSThttps://api.axolite.app/v1/checks
Im Pro-Tarif. In anderen Tarifen antwortet der Endpunkt mit 403 batch is not in this plan.
Body
| Feld | Typ | Beschreibung |
|---|---|---|
| textsPflicht | string[] | 1 bis 32 Zeilen, jede 1 bis 2.000 Zeichen. Ist eine Zeile ungültig, wird die ganze Anfrage mit 422 abgelehnt. |
| level | string | light, medium oder strict. Gilt für alle Zeilen. Standard: medium. |
| model | string | axo-small, axo-medium, axo-medium-preview-2 oder axo-large. Gilt für alle Zeilen. Standard: axo-small. |
Beispiel
curl -X POST https://api.axolite.app/v1/checks \
-H "X-API-Key: $AXO_KEY" \
-H "Content-Type: application/json" \
-d '{"texts": ["gg wp", "halt die fresse"], "level": "strict"}'Antwort
results enthält ein Ergebnis je Zeile, in derselben Reihenfolge wie texts.
{
"results": [
{ "toxic": false, "score": 0.02, "severity": 0, "action": "allow", "rule": null, "categories": {}, "model": "axo-small", "lang": "de", "self_harm": false },
{ "toxic": true, "score": 0.94, "severity": 3, "action": "block", "rule": null, "categories": {}, "model": "axo-small", "lang": "de", "self_harm": false }
]
}Grenzen und Kosten
- Jede Zeile zählt einzeln: ein Batch mit 10 Zeilen kostet wie 10 einzelne Prüfungen und zählt 10 gegen das Sekundenlimit. axo-medium und axo-medium-preview-2 verbrauchen dreimal so viel Guthaben je Zeile. axo-large zählt im Early Preview wie axo-small.
- Reicht das Guthaben nicht für alle Zeilen, wird die ganze Anfrage mit
429abgelehnt und nichts berechnet. - Die Batch-Größe kann für dein Konto individuell gesetzt sein, siehe Tarif & Guthaben.