Skip to content
Nexxtool AI

Quickstart

Check your first AI reply with one API call.

1. Create an API key

Sign in to the dashboard and click Create key. Copy the plaintext key — it’s only shown once.

wtk_live_aB3xY9Lp2NQ7dEvFwK4mZ1sR

2. Make your first request (curl)

curl -X POST https://nexxtool.ai/v1/validate \
  -H "Authorization: Bearer wtk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "output":   "Order confirmed for John Doe.",
    "contract": {
      "type": "text",
      "must_contain": ["Order confirmed"],
      "min_length":   10
    }
  }'

Response

{
  "validation_id": "v_01HXJK7Q...",
  "pass":          true,
  "score":         1.0,
  "issues":        [],
  "repaired":      null,
  "duration_ms":   8,
  "billed":        true,
  "cost_credits":  1,
  "usage": {
    "tier":      "free",
    "used":      1,
    "cap":       1000,
    "remaining": 999
  }
}

3. Node.js

const r = await fetch("https://nexxtool.ai/v1/validate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.WT_API_KEY,
    "Content-Type":  "application/json",
  },
  body: JSON.stringify({
    output: aiOutput,
    contract: { type: "text", must_not_contain: ["as an AI"] },
  }),
});
const result = await r.json();
if (!result.pass) {
  console.warn("AI output failed rule set:", result.issues);
}

4. Python

import os, requests
r = requests.post(
  "https://nexxtool.ai/v1/validate",
  headers={"Authorization": f"Bearer {os.environ['WT_API_KEY']}"},
  json={"output": ai_output, "contract": {"type": "text"}},
)
result = r.json()
if not result["pass"]:
  log.warning("AI slop detected", extra={"issues": result["issues"]})

What to do next