HumanBlend developers

Getting started

Make a key, start a run, read the result.

1. Make a key

Open the Developers page in the app and create a key. It is shown once, so copy it into your server's secrets. Never put it in a web page or a mobile app.

A key belongs to one account and has scopes, so you can give a script only what it needs:

Scope Lets the key
read Read the account, estimate a cost, read runs, checks and batches, list plans
humanize Start, cancel and delete runs
detect Start AI checks
batches Start and cancel bulk runs
webhooks Manage webhook endpoints
billing Get a checkout or billing link. Offered on the Developers page, but not ticked by default

You can also give a key a monthly credit cap on the same page. Making a key needs a HumanBlend plan.

2. Start a run

export HUMANBLEND_API_KEY="paste your key here"

curl https://api.humanblended.com/v1/humanize \
  -H "Authorization: Bearer $HUMANBLEND_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"text": "Your draft goes here. It needs at least a few sentences so there is something to rewrite."}'

The answer is 202 at once, with the run:

{
  "id": "5b0c4f0e-2c2e-4a55-9a43-2f0d6b1a7c11",
  "object": "job",
  "status": "queued",
  "words": 21,
  "credits_held": 21,
  "credits_charged": null,
  "scores": null,
  "error": null
}

A run takes from about 15 seconds to a few minutes, depending on length. The credits are held when it starts and settled when it ends.

3. Get the result

Poll the run. The Retry-After header says when to look again.

curl https://api.humanblended.com/v1/jobs/5b0c4f0e-2c2e-4a55-9a43-2f0d6b1a7c11 \
  -H "Authorization: Bearer $HUMANBLEND_API_KEY"

When status is succeeded, the run has an output (the text), credits_charged, and scores.standard and scores.strict: the two AI checks, each with a 0 to 100 score and a plain label. Read them as a quality reading of the text, to decide whether it needs another look. They are not a promise about how any other tool will judge it.

Rather than polling, add a webhook or a callback URL and HumanBlend tells you when the run is done.

The same in JavaScript

const base = "https://api.humanblended.com/v1";
const headers = { Authorization: `Bearer ${process.env.HUMANBLEND_API_KEY}`, "Content-Type": "application/json" };

const started = await fetch(`${base}/humanize`, {
  method: "POST",
  headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
  body: JSON.stringify({ text: draft, format: "markdown" }),
}).then((r) => r.json());

let job = started;
while (job.status === "queued" || job.status === "processing") {
  await new Promise((r) => setTimeout(r, 10_000));
  job = await fetch(`${base}/jobs/${job.id}`, { headers }).then((r) => r.json());
}
console.log(job.output, job.scores);

Rules that apply to every call

Next