AI
Pass

AI Text Detector Agent Skill — AI Pass API

Overview

AI Pass "AI Text Detector" (app slug: ai-detector) is a detection skill that analyzes input text and classifies whether it was written by an AI or by a human. The skill returns a classification label (e.g., "AI-generated" or "Human-written"), a confidence score (0.0–1.0), and a short explanation of the signals that influenced the decision.

Use cases for AI agents:

  • Content moderation: flaging or routing likely AI-generated content for review.
  • Authorship verification: assisting editors or educators to detect AI-written submissions.
  • Metadata enrichment: adding a detection label and confidence to documents in a pipeline.
  • Conversational agents: determining whether a message may be synthesized and adapting response style or verification steps.

Skill File (YAML)

name: ai-detector
description: Detects whether text was written by AI or a human
version: "1.0"
auth:
  type: bearer
  token_env: AIPASS_API_KEY
endpoints:
  - name: generate
    method: POST
    url: https://aipass.one/apikey/v1/chat/completions
    headers:
      Authorization: "Bearer $AIPASS_API_KEY"
      Content-Type: application/json

Example Usage

Curl example

curl -s https://aipass.one/apikey/v1/chat/completions \
  -H "Authorization: Bearer $AIPASS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Client-ID: YOUR_CLIENT_ID" \
  -d '{
    "model": "aipass-detector-v1",
    "messages": [
      {"role": "system", "content": "You are an AI detector. For the provided user text, return JSON with keys: label (\"AI\" or \"Human\"), confidence (0.0-1.0), explanation (short)."},
      {"role": "user", "content": "Paste the text to analyze here."}
    ],
    "temperature": 0
  }'

Example response (abridged)

{
  "id": "resp-xyz",
  "choices": [{
    "message": {
      "role": "assistant",
      "content": "{\"label\":\"AI\",\"confidence\":0.92,\"explanation\":\"consistent phraseology, low lexical diversity, and high token probability patterns.\"}"
    }
  }]
}

Python example

import os
import requests
import json

api_key = os.getenv("AIPASS_API_KEY")
url = "https://aipass.one/apikey/v1/chat/completions"
headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json",
    "X-Client-ID": "YOUR_CLIENT_ID"
}

payload = {
    "model": "aipass-detector-v1",
    "messages": [
        {"role": "system", "content": "You are an AI detector. For the provided user text, return JSON with keys: label (\"AI\" or \"Human\"), confidence (0.0-1.0), explanation (short)."},
        {"role": "user", "content": "The text to analyze goes here."}
    ],
    "temperature": 0
}

resp = requests.post(url, headers=headers, json=payload)
resp.raise_for_status()
data = resp.json()

# The detector returns its result as a JSON string inside the assistant message content.
assistant_msg = data["choices"][0]["message"]["content"]
result = json.loads(assistant_msg)
print("Label:", result["label"])
print("Confidence:", result["confidence"])
print("Explanation:", result["explanation"])

Notes:

  • Always include Authorization: Bearer $AIPASS_API_KEY. Never embed a real API key into code or public documentation.
  • Use temperature: 0 or a low value for consistent deterministic classification.
  • Include X-Client-ID: YOUR_CLIENT_ID where required by your integration.

Available Models

  • aipass-detector-v1 — Primary detection model tuned for high precision on synthetic text patterns and robust confidence scoring.
  • aipass-detector-lite — Lightweight, lower-latency model for bulk or realtime checks with slightly reduced accuracy.
  • aipass-ensemble-v1 — Higher-accuracy ensemble detector that combines multiple signals (token patterns, style features, and metadata).
  • aipass-bert-detector — A transformer-based model optimized for short-form content (social posts, comments).

(When selecting a model, balance accuracy vs latency and cost. Use detector-lite for high-volume screening and ensemble or v1 for final verification.)

Get Your API Key

Create and manage API keys in the developer dashboard: https://aipass.one/panel/developer.html → API Keys section. Use environment variables (AIPASS_API_KEY) in deployments and never hard-code keys into source.

Related Apps

Explore the app details and UI for this skill: https://aipass.one/apps/ai-detector

Skill File

id: aipass_text_detector
name: AI Pass Text Detector
version: "1.0"
description: Detects whether text was written by AI or a human using the AI Pass AI Text Detector API.
author: AI Assistant
license: MIT
auth:
  type: apiKey
  name: Authorization
  in: header
  env: AIPASS_API_KEY
  scheme: Bearer
endpoints:
  detect_text:
    summary: Analyze text and return whether it was written by AI or a human
    description: |
      Sends the provided text to AI Pass chat/completions endpoint and requests a classification
      response indicating whether the text was written by an AI or a human. The skill expects the
      AI Pass API key to be available in the environment variable $AIPASS_API_KEY and will include it
      as a Bearer token in the Authorization header.
    method: POST
    url: https://aipass.one/apikey/v1/chat/completions
    headers:
      Content-Type: application/json
      Authorization: "Bearer $AIPASS_API_KEY"
    request:
      body:
        type: object
        required:
          - model
          - messages
        properties:
          model:
            type: string
            description: AI Pass model to use for detection. Default may be provider-specific.
            default: aipass-detector-001
          messages:
            type: array
            description: Chat-style messages. The user content should be the text to analyze.
            items:
              type: object
              properties:
                role:
                  type: string
                content:
                  type: string
    input:
      - name: text
        in: body
        required: true
        schema:
          type: string
        description: The text to analyze for AI/human authorship.
      - name: model
        in: body
        required: false
        schema:
          type: string
        description: Optional model name to send to the API. Defaults to provider's detector model.
    build_request:
      # Template for request body (replace placeholders as the agent runtime requires)
      body:
        model: "{{model | default('aipass-detector-001')}}"
        messages:
          - role: system
            content: |
              You are an assistant that classifies whether a given text was authored by a human or by an AI.
              Provide output in JSON with these fields: label (one of "ai", "human", "uncertain"),
              confidence (0.0-1.0), and an explanation string.
          - role: user
            content: "{{text}}"
    response:
      type: object
      description: The raw API response. The detector's result is typically in choices[0].message.content as JSON.
      mappings:
        - name: raw
          path: "$"
          description: Full API response
        - name: result_text
          path: "choices[0].message.content"
          description: Raw string response from detector (recommended: JSON with label/confidence/explanation)
        - name: label
          path: "choices[0].message.content | json_path('$.label')"
          description: Parsed label (ai|human|uncertain) if the model returned JSON
        - name: confidence
          path: "choices[0].message.content | json_path('$.confidence')"
          description: Parsed confidence (0.0-1.0) if present
        - name: explanation
          path: "choices[0].message.content | json_path('$.explanation')"
          description: Parsed explanation string if present
    errors:
      - code: 401
        description: Unauthorized — the API key is missing or invalid. Ensure $AIPASS_API_KEY is set.
      - code: 400
        description: Bad request — verify the provided text and request body schema.
      - code: default
        description: Unexpected error returned by the AI Pass API.
examples:
  - name: Simple detection
    input:
      text: "The quick brown fox jumps over the lazy dog."
    request:
      model: aipass-detector-001
    note: |
      Example runtime flow:
      1) Build the POST body using the template in build_request.
      2) Send to https://aipass.one/apikey/v1/chat/completions with Authorization: Bearer $AIPASS_API_KEY.
      3) Parse choices[0].message.content as JSON to extract label, confidence, and explanation.
integration_notes:
  - Ensure the environment variable AIPASS_API_KEY is set in the agent/runtime environment prior to calling this skill.
  - The skill expects the detector to return structured JSON inside choices[0].message.content. If the provider returns free text,
    the agent should parse or fallback to returning the raw result_text.
  - Adjust the default model name if AI Pass publishes a specific detector model name.
Download Skill File