Getting started

Quickstart

Make your first rewrite and detection call in under five minutes.

This page takes you from zero to a working rewrite and a detection result. You need a terminal and an account; everything below works with a test key, which returns simulated responses with the same fields as live ones (no models run) and never uses your plan's words.

Get a test key

Open the dashboard, go to API keys and create a key in test mode. Test keys start with sk_test_. Copy it once; we only show the full value at creation.

export API_KEY="sk_test_..."   # keep this out of source control

Tip:

Store the key in your secret manager or a local .env file that is ignored by git. Never ship it in browser code.

Make your first rewrite

Send a draft to POST /rewrite. The example below uses the blog platform preset and the neutral house voice. Once you've created a voice, add its id as voice_id to rewrite toward it.

curl -X POST "https://api.intactvoice.com/v1/rewrite" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Many businesses struggle to create useful blog posts because the writer receives only a topic. Escalate any case older than 14 days.",
  "platform": "blog",
  "strength": "standard",
  "fidelity": "strict",
  "webhook_url": "https://example.com/hooks/intactvoice"
}'

Rewrites are asynchronous by default. The call returns 202 Accepted with a job straight away. Its estimated_seconds is a rough processing time for this length and strength once a model worker is running; a cold start can add minutes.

{
  "id": "job_01JD4QC7",
  "object": "job",
  "type": "rewrite",
  "env": "live",
  "status": "queued",
  "created": 1791110400,
  "completed": null,
  "estimated_seconds": 62,
  "poll_url": "/v1/jobs/job_01JD4QC7"
}

Wait for the job.succeeded webhook (sent to webhook_url or your dashboard endpoints), or poll GET /jobs/{job_id} every few seconds. The finished job carries the rewritten text, the settings it ran with, a flat summary of the headline numbers, the fact check, before and after scores with each detector's score, the voice match (when you pass a voice) and the words billed:

curl "https://api.intactvoice.com/v1/jobs/job_01JD4QC7" \
  -H "Authorization: Bearer $API_KEY"
{
  "id": "rw_01JD4Q8ZK3",
  "object": "rewrite",
  "model": "rewrite-2026-10",
  "duration_ms": 58210,
  "text": "Most blog posts go wrong before anyone writes a word: the writer gets a topic and nothing else. If a case is older than 14 days, escalate it.",
  "settings": {
    "platform": "blog",
    "strength": "standard",
    "fidelity": "strict",
    "voice_id": "voice_8f2k1x",
    "preserve": 0,
    "include": []
  },
  "summary": {
    "ai_likelihood_before": 0.91,
    "ai_likelihood_after": 0.14,
    "verdict_before": "likely_ai",
    "verdict_after": "likely_human",
    "fidelity_status": "pass",
    "facts_checked": 1,
    "facts_kept": 1,
    "facts_changed": 0,
    "voice_match": 0.857,
    "structure_status": "strong",
    "words_in": 22,
    "words_out": 28,
    "words_billed": 33,
    "duration_ms": 58210
  },
  "fidelity": {
    "status": "pass",
    "checks": [
      {
        "type": "number_unit",
        "source": "14 days",
        "output": "14 days",
        "ok": true,
        "status": "kept"
      }
    ],
    "changed_facts": [],
    "review": {
      "status": "completed",
      "material_changes": 0,
      "minor_differences": 0,
      "repaired": false
    }
  },
  "signals": {
    "source": {
      "ai_likelihood": 0.91,
      "verdict": "likely_ai",
      "confidence": "low",
      "detectors": {
        "structure": 0.97,
        "wording": 0.94,
        "fingerprint": 0.83
      }
    },
    "output": {
      "ai_likelihood": 0.14,
      "verdict": "likely_human",
      "confidence": "low",
      "detectors": {
        "structure": 0.21,
        "wording": 0.08,
        "fingerprint": 0.12
      }
    }
  },
  "usage": {
    "words_in": 22,
    "words_out": 28,
    "words_billed": 33
  },
  "voice_match": {
    "score": 0.857,
    "traits": [
      {
        "trait": "sentence_length_mean",
        "target": 10.5,
        "output": 14,
        "ok": true
      },
      {
        "trait": "sentence_length_sd",
        "target": 6.5,
        "output": 4,
        "ok": true
      },
      {
        "trait": "uses_em_dash",
        "target": false,
        "output": false,
        "ok": true
      },
      {
        "trait": "contractions_per_100_words",
        "target": 3.8,
        "output": 0,
        "ok": false
      },
      {
        "trait": "first_person_per_100_words",
        "target": 4.8,
        "output": 4,
        "ok": true
      },
      {
        "trait": "question_per_100_words",
        "target": 1,
        "output": 0,
        "ok": true
      },
      {
        "trait": "reading_grade",
        "target": 4.6,
        "output": 5.9,
        "ok": true
      }
    ]
  },
  "structure": {
    "status": "strong",
    "same_place": 0
  }
}

Check the fidelity report

Numbers with units, dates and links in the source were extracted and compared against the output in code, and a model review compared names, quotes and claims. In the example, 14 days survived unchanged (status: "kept"), so fidelity.status is pass.

By default (fidelity: "standard") a changed fact sets fidelity.status to warn and is listed in fidelity.changed_facts next to the original, so you can fix it. With fidelity: "strict" a changed fact never ships: the job fails with fidelity_failed (HTTP 422 on a synchronous request) listing each changed fact with a plain explanation, and nothing is billed. A strict rewrite that passes uses 1.5 words per input word. Read Fidelity checks for the full rule set.

Score a text with Detect

POST /detect returns an overall ai_likelihood, each detector's own score, a confidence level set by length, a score per sentence, and the writing patterns it recognises in each sentence and in the document's structure, each with a plain reason.

curl -X POST "https://api.intactvoice.com/v1/detect" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "In today'\''s fast-paced world, side hustles are more than just extra cash. They play a pivotal role in building financial resilience, offering flexibility, creativity, and independence. In this post, we'\''ll explore five proven ways to start one this weekend. Whether you'\''re a student or a busy parent, there'\''s an option that fits your schedule, your skills, and your goals.",
  "granularity": "sentence",
  "explain": true
}'

Note:

A detection score is a signal, not proof of authorship. See Detection signals before using scores in any decision about a person.

Go live

  1. Create a voice from real samples

    Upload 2 to 50 pieces (at least 1,200 words in total, varied topics beat more of the same) by the person you write for with POST /voices. Pass the returned id as voice_id.

  2. Swap in a live key

    Create an sk_live_ key with only the scopes you need. Live requests use your plan's monthly words.

  3. Handle failures

    Check fidelity.status for warn and fix the listed facts. If you use strict, treat 422 fidelity_failed as a normal outcome (send the draft to a human). Retry 429 / 5xx with backoff. See Errors.

Next steps