API docs

Base URL https://integrity-labs.app/api/v1/. Every client endpoint needs an API key.

Authentication

Create a key on the API keys page and send it in either header:

Authorization: Api-Key ik_your_key_here
X-Api-Key: ik_your_key_here

Request a token

POST/api/v1/tokens/

Reserves one credit and queues a job. package_name and nonce are optional.

curl -X POST https://integrity-labs.app/api/v1/tokens/ \
  -H "Authorization: Api-Key ik_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"package_name": "com.example.app", "nonce": "base64nonce"}'

Response 201 Created:

{
  "id": "a1b2c3d4-...",
  "status": "queued",
  "package_name": "com.example.app",
  "nonce": "base64nonce",
  "credits_cost": 1,
  "created_at": "2026-01-01T12:00:00Z",
  "finished_at": null,
  "error": "",
  "token": null
}

Fetch the result

GET/api/v1/tokens/<id>/

Poll every second or two until status is done. Until then token is null.

curl https://integrity-labs.app/api/v1/tokens/a1b2c3d4-.../ \
  -H "Authorization: Api-Key ik_your_key_here"
{
  "id": "a1b2c3d4-...",
  "status": "done",
  ...
  "token": { "token": "eyJ...", "meta": {}, "expires_at": null }
}

Job statuses

queuedthen runningthen done

If the device can't produce a token the job ends as failed, the credit is refunded and error holds a short reason.

Errors

CodeWhen
401The API key is missing, wrong or revoked.
402Your balance is too low. The body has "code": "insufficient_credits". Top up and retry.
404No job with this id exists on your account.
429Too many requests. Slow down and retry.

Worker API

The device fleet takes jobs and submits tokens with a separate worker key in X-Worker-Key: POST /api/v1/worker/jobs/claim/ and POST /api/v1/worker/jobs/<id>/result/. Worker keys are issued in the admin. You don't need this to use the API as a client.