Skip to content
Secnd

Quickstart

Make one request with curl, Python, or TypeScript.

Use an invited account and create a server-side API key. Set SECND_API_KEY through your secret manager. Check GET /v1/models and substitute the dated model your account returns; the examples use ren-zero-2026-11-12.

curl

curl --fail-with-body https://api.secndai.com/v1/decide \
  -H "Authorization: Bearer $SECND_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
    "model": "ren-zero-2026-11-12",
    "type": "choice",
    "situation": "A customer says the same order was charged twice.",
    "question": "Which queue should handle this ticket?",
    "options": [
      {"id": "billing", "description": "Payment and invoice problems"},
      {"id": "delivery", "description": "Shipping and parcel problems"}
    ],
    "threshold": 0.9
  }'

Python

Install the local SDK from the repository root with uv pip install ./packages/sdk-python in your environment. The import is secnd.

import os
from secnd import Secnd

client = Secnd(api_key=os.environ["SECND_API_KEY"])
result = client.decide({
    "model": "ren-zero-2026-11-12",
    "type": "choice",
    "situation": "A customer says the same order was charged twice.",
    "question": "Which queue should handle this ticket?",
    "options": [
        {"id": "billing", "description": "Payment and invoice problems"},
        {"id": "delivery", "description": "Shipping and parcel problems"},
    ],
    "threshold": 0.9,
})
print(result["choice"], result["confidence"], result["action"])

TypeScript

Build and install the local @secnd/sdk package as described in the SDK overview.

import { Secnd } from "@secnd/sdk";

const apiKey = process.env.SECND_API_KEY;
if (!apiKey) throw new Error("Set SECND_API_KEY");
const client = new Secnd({ apiKey });
const result = await client.decide({
  model: "ren-zero-2026-11-12",
  type: "choice",
  situation: "A customer says the same order was charged twice.",
  question: "Which queue should handle this ticket?",
  options: [
    { id: "billing", description: "Payment and invoice problems" },
    { id: "delivery", description: "Shipping and parcel problems" },
  ],
  threshold: 0.9,
});
console.log(result.choice, result.confidence, result.action);

Handle the answer

Check action before running any downstream operation. On ask_human, enqueue the situation and candidate answer for review. On act, your code still enforces permissions and business rules. The API itself does not move a ticket or issue a refund.

The response also includes the full probability map, resolved model ID, effective threshold, and usage. See confidence and the gate, errors, and request limits before adding production traffic.