Developer documentation

Detecting AI API and MCP documentation

Integrate AI detection, text humanization, plagiarism checking, and MCP tools with OAuth for hosted connectors or an API key for local clients and REST requests.

Quickstart

Create an API key in your dashboard, choose an endpoint, and send JSON over HTTPS. REST requests use the public base URL below.

BASE URLhttps://api.detecting-ai.com
cURL quickstart
curl --request POST \
  --url https://api.detecting-ai.com/api/detect/ \
  --header "Content-Type: application/json" \
  --header "X-API-Key: YOUR_API_KEY" \
  --data '{
    "text": "Paste the text you want to analyze.",
    "version": "v3"
  }'
Keep keys private. Store API keys in server-side environment variables. Do not expose a key in browser code, public repositories, or screenshots.

Authentication

Hosted MCP connectors use an automatic OAuth browser flow. REST integrations and local-config MCP clients can continue using a customer API key.

InterfaceHeaderExample
REST APIX-API-KeyX-API-Key: YOUR_API_KEY
Hosted MCP connectorOAuth 2.0Sign in and approve in the browser
Local-config MCP clientAuthorizationAuthorization: Bearer YOUR_API_KEY

AI Detector API

Analyze supplied text for signals associated with AI-generated writing. Results are probabilistic and should support human review rather than replace it.

POST/api/detect/

Request body

FieldTypeRequiredDescription
textstringYesText to analyze.
versionstringYesv1, v2, or v3. Use v3 for new integrations.
Detector request
curl --request POST \
  --url https://api.detecting-ai.com/api/detect/ \
  --header "Content-Type: application/json" \
  --header "X-API-Key: YOUR_API_KEY" \
  --data '{
    "text": "Paste the text you want to analyze.",
    "version": "v3"
  }'

Response

Detector response shape
{
  "success": true,
  "data": {
    "details": {
      "result": "Detector analysis is returned here"
    },
    "version": "v3",
    "words_processed": 8
  }
}

AI Humanizer API

Rewrite supplied text with a selected humanizer model while returning the processed word count and model name.

POST/api/humanize/

Request body

FieldTypeRequiredDescription
textstringYesText to rewrite.
modelstringYescognia, lexi, cognia_v2, or huma_v2.
Humanizer request
curl --request POST \
  --url https://api.detecting-ai.com/api/humanize/ \
  --header "Content-Type: application/json" \
  --header "X-API-Key: YOUR_API_KEY" \
  --data '{
    "text": "Paste the text you want to rewrite.",
    "model": "cognia"
  }'

Response

Humanizer response
{
  "humanized_text": "The rewritten text is returned here.",
  "words_processed": 8,
  "model_used": "cognia"
}

Plagiarism Checker API

Submit text for plagiarism analysis. The response contains the checker result and the number of processed input words.

POST/api/plagiarism/
Plagiarism request
curl --request POST \
  --url https://api.detecting-ai.com/api/plagiarism/ \
  --header "Content-Type: application/json" \
  --header "X-API-Key: YOUR_API_KEY" \
  --data '{
    "text": "Paste the text you want to check."
  }'

Remote MCP server

Connect Detecting AI to Claude, ChatGPT, Codex, or another Streamable HTTP MCP client. MCP exposes focused detector and humanizer tools through the public endpoint below.

MCPhttps://api.detecting-ai.com/api/mcp
ToolPurposeDefault
detect_ai_textAnalyze text for AI-writing signals and passage-level detail.v3
humanize_textRewrite supplied text in a more natural style.cognia

Claude and ChatGPT hosted connectors

Add the MCP URL in the client's connector settings. Enter only the URL: the client discovers Detecting AI OAuth, opens the sign-in and consent screens, and stores its own tokens. No API key needs to be copied into the connector.

  1. In Claude, add a custom connector from Settings and Connectors. In ChatGPT, enable Developer Mode first, then add a custom connector.
  2. Use https://api.detecting-ai.com/api/mcp as the connector URL.
  3. Sign in to Detecting AI, review the requested permission and word-usage notice, then approve or decline the connection.
Do not add credentials to the URL. OAuth is started automatically after discovery. Connected applications can be reviewed or revoked from the Connected Apps dashboard.

Clients with a local MCP config

Claude Code, Codex, and similar local clients can continue to use an API key stored in an environment variable or secret store.

Codex

Codex configuration
# Set the key in your shell
export DETECTING_AI_API_KEY="YOUR_API_KEY"

# Add this to ~/.codex/config.toml
[mcp_servers.detecting_ai]
url = "https://api.detecting-ai.com/api/mcp"
bearer_token_env_var = "DETECTING_AI_API_KEY"
tool_timeout_sec = 180

Claude Code

Claude Code command
claude mcp add --transport http --scope user \
  --header "Authorization: Bearer YOUR_API_KEY" \
  detecting-ai https://api.detecting-ai.com/api/mcp

Other local clients

Streamable HTTP configuration
{
  "mcpServers": {
    "detecting-ai": {
      "type": "streamable-http",
      "url": "https://api.detecting-ai.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${DETECTING_AI_API_KEY}"
      }
    }
  }
}

Errors

StatusMeaningWhat to check
400Invalid request or insufficient word balance.Validate fields, model names, versions, and available words.
401Authentication is missing, expired, or invalid.Reconnect the hosted connector or check the local API-key header.
403No active subscription for the requested feature.Review the API subscription in the dashboard.
500The request could not be processed.Retry once, then contact support with the request time and endpoint.

Usage and limits

Detector, humanizer, and plagiarism usage is measured from the input word count. MCP uses the same subscription balance as the REST API.

  • Check remaining usage in the API dashboard.
  • Avoid automatic retries after a successful response.
  • Split very large documents into meaningful sections.
  • Use a server-side timeout that fits the selected operation.

Ready to integrate?

Create an API key, select a plan, and test your first request from a secure server environment.