DraftFilterDeveloper API

Developer reference

Rewrite API

Rewrite jobs ask DraftFilter to return a less AI-like version of each submitted item. The result includes the original public score, the selected rewritten public score, and the selected text.

Public is_ai fields are percentages of AI-like text: 0 means 0% AI-like, and 100 means 100% AI-like. Lower rewritten_is_ai is less AI-like than a higher value.

Create a rewrite job:

text
POST /v1/rewrite-jobs

Request body:

json
{
  "idempotencyKey": "rewrite-demo-001",
  "candidateCount": 1,
  "items": [
    {
      "id": "paragraph-1",
      "text": "This comprehensive solution empowers teams to seamlessly optimize productivity."
    }
  ]
}

Rewrite request limits from the OpenAPI contract:

text
items: 1 to 10
item id: 1 to 128 characters
item text: 1 to 5,000 characters
total text: 20,000 characters
idempotencyKey: optional, 1 to 128 characters
candidateCount: optional, 1 to 4, default 1

Accepted response:

json
{
  "jobId": "job_000401",
  "state": "queued"
}

Successful result:

json
{
  "jobId": "job_000401",
  "state": "succeeded",
  "results": [
    {
      "id": "paragraph-1",
      "original_is_ai": 83,
      "rewritten_is_ai": 28,
      "rewrittenText": "Teams can use the update to plan work faster and spot handoff gaps sooner."
    }
  ]
}

Candidate details, raw detector scores, and prompt controls are not part of the public rewrite response.