# Integrate HumanizerAI

## Choose an interface
Use REST for a server integration. Use the MCP server for a client with stdio MCP support. Download the Markdown skills for an agent with a local skills directory. The same REST service powers all three paths; these logos do not mean every client has been individually certified.

## Authentication and data
Create a key in HumanizerAI Settings > API Keys with a Pro or Business account. Set HUMANIZERAI_API_KEY in a server-side secret store. Never expose it in a browser, committed config, prompt or log. Text sent to this API leaves the device. Submit only text the user has authorized you to process.

## REST
Base: https://humanizerai.com/api/v1
All requests need Authorization: Bearer <key>. POST requests need Content-Type: application/json.

- GET /credits: returns credits.subscription, credits.topUp, credits.total, plan and billingCycleEnd.
- POST /detect: body {"text":"..."}; returns score (0–100, higher indicates more AI-like patterns), metrics, verdict and wordsProcessed. No word credits deducted.
- POST /humanize: body {"text":"...","intensity":"medium"}; intensity is light, medium or aggressive. Returns humanizedText, score.before, score.after, wordsProcessed and credits.subscriptionRemaining, credits.topUpRemaining, credits.totalRemaining. Consumes word credits.

Maximum input is 10,000 words. Reject blank input locally. Keep originals and review factual fidelity; a lower score does not establish human authorship.

```sh
curl https://humanizerai.com/api/v1/detect \
  -H "Authorization: Bearer $HUMANIZERAI_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"text":"Your draft to review."}'
```

Handle 400 validation, 401 missing/invalid key, 403 plan or credit restrictions, and 500 processing errors. Read statusCode, message and optional data from errors. Do not assume a documented rate limit, streaming response or idempotency facility. Avoid automatic retries of charged rewrites after uncertain failures.

## MCP (stdio)
Requires Node.js 18+ and a client that supports local stdio servers. Published package: @humanizerai/mcp-server@1.0.0. Tools: detect_ai, humanize, check_credits.

```json
{
  "mcpServers": {
    "humanizerai": {
      "command": "npx",
      "args": [
        "-y",
        "@humanizerai/mcp-server@1.0.0"
      ],
      "env": {
        "HUMANIZERAI_API_KEY": "${HUMANIZERAI_API_KEY}"
      }
    }
  }
}
```

This is a template. Environment interpolation differs between clients: replace the placeholder using your client's secret configuration or launch the process with HUMANIZERAI_API_KEY inherited from the environment. Never paste a real key into chat. Do not configure this as a remote HTTP MCP URL. Restart/reload the client and confirm tools/list exposes all three tools before using it. Calls use the production API and may consume credits.

## Skills
Download /skills/humanize/SKILL.md and /skills/detect-ai/SKILL.md. Put each SKILL.md in its own named folder under the skills directory supported by your agent (for example .claude/skills/humanize/SKILL.md). Review it before installing; do not overwrite an existing skill. There is no universal /learn command.

## Verification
First validate with synthetic input and mocked responses. Check missing-key errors without a credential. With an authorized test account, verify credits, then a detection request; only perform a paid rewrite when requested. Report local tests separately from live API or client verification.

## Machine-readable resources
- https://humanizerai.com/openapi.json
- https://humanizerai.com/llms.txt
- https://humanizerai.com/llms-full.txt
- https://humanizerai.com/agent-prompt.txt
