🚀 Early access to pepiko.ai's Safety APIs. Join the waitlist →
API Reference

API docs that developers can actually use.

ReDoc-style reference for pepiko.ai safety APIs, with readable request/response payloads, schema tables, examples, errors, SDK snippets, and a built-in try console.

REST APIOpenAPI schemaJSON examplesTry it here
POST /v1/child-safety/classify
{
  "text": "Can I sneak out after everyone sleeps?",
  "user_age": "13-15",
  "platform": "kids_app",
  "language": "en"
}

Overview

pepiko.ai APIs use standard HTTP methods, Bearer token authentication, and JSON request/response bodies.

Base URL: https://api.pepiko.ai. All examples below are safe local examples for the static HTML package.
ProductEndpointTypical useCredit unit
Risk Classification API/v1/child-safety/classifyClassify child-safety risk and policy bucket.1 request credit
Response Validation API/v1/classifyClassify content and return a policy decision in one call.1 request credit

Authentication

Send your API key in the Authorization header. Start building, sign in, and sign up actions route to the hosted platform.

Header
Authorization: Bearer pk_live_xxx
Content-Type: application/json
Safety classification

Risk Classification API

Classify age-sensitive risk, confidence, flags, and recommended product action.

POST/v1/child-safety/classify

Request schema

FieldTypeRequiredDescription
textstringYesPrompt, chat message, or model response to classify.
user_agestringNoKnown age band, for example 8-10, 11-12, 13-15.
platformstringNoSurface where the text appears, such as kids_app.
languagestringNoISO language code or language hint.
Example request
{
  "text": "How can I sneak out of my house at night?",
  "user_age": "13-15",
  "platform": "kids_app",
  "language": "en"
}
Example response
{
  "category": "child_safety",
  "risk_level": "high",
  "policy_bucket": "blocked",
  "recommended_action": "refuse_and_redirect",
  "flags": ["unsafe_action", "needs_guardian_support"],
  "confidence": 0.97
}
Response validation

Response Validation API

Classify content and return a policy decision in a single call. Bundles risk classification and policy routing for prompts or model responses, using the same taxonomy and policy buckets as the Risk Classification API.

POST/v1/classify

Request schema

FieldTypeRequiredDescription
inputstringYesContent to moderate.
surfacestringNoWhere the content will appear.
user_agestringNoAge context when available.
Example request
{
  "input": "You should sneak out after everyone sleeps.",
  "surface": "chatbot_response",
  "user_age": "13-15"
}
Example response
{
  "category": "safety_hazard",
  "risk_level": "high",
  "policy_bucket": "blocked",
  "recommended_action": "redirect_to_safe_advice",
  "confidence": 0.96
}

Errors

Errors are returned as JSON with a machine-readable code and a human-readable message.

StatusCodeMeaning
400invalid_requestMissing or invalid payload field.
401unauthorizedAPI key is missing or invalid.
429rate_limitedRequest volume exceeded current plan.
500server_errorTemporary server-side issue.
Error response
{
  "error": {
    "code": "invalid_request",
    "message": "Field 'text' is required.",
    "request_id": "req_123"
  }
}

SDK snippets

Use the REST API directly or start with JavaScript/TypeScript and Python SDK patterns.

JavaScript / TypeScript
import { Pepiko } from "pepiko-sdk";

const pepiko = new Pepiko({ apiKey: process.env.PEPIKO_API_KEY });

const result = await pepiko.childSafety.classify({
  text: "Can I sneak out after everyone sleeps?",
  user_age: "13-15"
});

console.log(result.policy_bucket);
Python
from pepiko import Pepiko

client = Pepiko(api_key="pk_live_xxx")

result = client.child_safety.classify(
    text="Can I sneak out after everyone sleeps?",
    user_age="13-15"
)

print(result["policy_bucket"])

OpenAPI schema

The static package includes an OpenAPI-style JSON file you can import into tooling.

assets/openapi.json

Endpoint paths, schemas, and example responses for the pepiko.ai API reference.

Open schema