Live progress

Track progress
and cost

Poll for the completed rewrite, or use the event stream for live progress and cost updates.

PollingServer-sent events
On this page

Polling

GET /v1/runs/{id} returns the current run status. Stop when status is succeeded, rejected, failed, or canceled. Wait a few seconds between requests.

GET

/v1/runs/{id}/events

A server-sent event stream. The URL is the events_url from the create response, on https://humanizeword.com. The stream replays events you missed, then stays open until the run finishes. Comment lines that say ping keep the connection alive.

Open the streamcURL
curl -N https://humanizeword.com/api/v1/runs/run_01J9ABCDEF/events \
  -H "Authorization: Bearer $HUMANIZEWORD_API_KEY"
Stream eventsSSE
event: cost
data: {"type":"cost","projected_charge_usd":"0.050000"}

event: done
data: {"type":"done","status":"succeeded","charged_usd":"0.050000","reasons":[]}

Events to handle

EventUse it for
costprojected_charge_usd is the charge so far, in USD. It can change during processing. It is still an estimate until done.
output_readyThe rewrite is final. Read GET /v1/runs/{id} now for output_text, a few seconds before the run finishes. The run is still running while its AI score is read, and the charge settles with done.
doneThe stream ends. status matches the run. charged_usd is the settled charge. reasons lists why a run was rejected or stopped.

Other event types can appear while the run is working. Ignore any type you do not recognize. Read GET /v1/runs/{id} for output_text after output_ready, or after done. The stream does not include the rewrite.

Browser EventSource cannot set Authorization.

Use it from the signed-in app, which already has a session cookie. From a script, use an HTTP client that can send the bearer token, or poll the run.