Skip to main content

Accessing a Pipeline via API

A pipeline can be invoked directly by an external system, without going through the web interface, using an API key.

Generating a key

From Manager → Settings → API Keys (api_key_manager role or a legacy role):

  1. Generate a key — it is prefixed hnk_, remains viewable at any time (unlike a "shown only once" token), and can either expire on a set date or never expire.
  2. Assign it to one or more specific pipelines: the key can only start analyses on the pipelines explicitly assigned to it (any other attempt fails).

Each key is internally attached to a dedicated service user, so that jobs launched via the API remain attributable and traceable just like any other job.

Available calls

With the header Authorization: Bearer hnk_...:

  • POST /api/jobs — submits a document for analysis (multipart upload: file, pipeline ID, optional support documents).
  • POST /api/jobs/from-url — submits a document via a link (shared Google Docs/Slides) instead of a direct upload.
  • GET /api/jobs/{id} — checks the status of an ongoing analysis.
  • GET /api/jobs/{id}/download — downloads the annotated document once the analysis is complete.
  • POST /api/jobs/{id}/cancel — cancels an ongoing analysis.

The pipeline editor offers an "API" panel that automatically generates ready-to-copy code (Python, JavaScript, PHP, VB.NET) illustrating these calls, with the current pipeline's ID already filled in.