Get a key. Send your first task.

Send a web task. Pay when it finishes.

One request carries a task in plain words. Protocolis opens the site, does the work, reads the page back to check the result, and returns the answer.

Pricing

$0.10for a finished task
$0.00for a task that does not finish
$1.00of free credit for every new team, once

There is no subscription, no charge for browser time and no charge per step. To add credit, an admin pays by card in the app, under Billing: $10 to $1,000 a purchase, handled by Stripe. Unused credit can be refunded within 30 days of buying it (refund policy).

Quick start

  1. Get a key: press Sign in (or Get a key), continue with Google, GitHub or your email. If you have no account yet, the same steps make one, with $1.00 of credit to start. Make an API key in the app, under API keys; the emailed link also shows a first key once. There is no password: you sign in the same way next time.

  2. Send a task.
    curl https://api.protocolis.co/v1/task \
      -H "Authorization: Bearer $PROTOCOLIS_KEY" \
      -H "Content-Type: application/json" \
      -d '{"task": "What is the price of the book A Light in the Attic?",
           "url": "https://books.toscrape.com"}'
  3. Read the reply.
    {
      "outcome": "done",
      "answer": "£51.77",
      "verified": true,
      "elapsedMs": 7029,
      "runId": "0f3a9c1e5b7d4e2a8c6f1b3d5e7a9c0b",
      "chargedUsd": 0.1,
      "taskId": "task_5f0c2a9b7e1d4c3a8b6f0e2d"
    }

    verified is true when the engine read the page back and the page confirmed the result. It is null when no check applied. chargedUsd is what this request cost your team. taskId is the task's number: with it you can fetch the answer again for 24 hours.

Accounts and teams

An account can be one person or a whole company. The person who signs up is its first admin and brings in everyone else from the console. People sign in; programs use keys.

WhoCan do
AdminInvite one address, a list, or a pasted export from Google Workspace or Microsoft 365. Cancel invites, remove people, make someone an admin, set a monthly spending cap, read every charge.
MemberRun tasks. See the team's balance. Make and revoke their own API keys.
  • Joining is by invite only. Each person gets an email link that works once and expires after 7 days. Opening it signs them in and shows their own key once; signing in with Google or GitHub at the invited address joins the same team.
  • Every person has their own keys, so the team's charges show who ran what.
  • Removing someone works at once. All of their keys stop on the next request.
  • One shared balance. A task reserves its price before it runs, so two people can never spend the same last credit.
  • A team cannot lock itself out. The last admin cannot be removed or step down.
  • Keys are not stored. We keep only a fingerprint of each key and each invite code, so neither can be read back.

Reference

Run a task

POST /v1/task
Authorization: Bearer pk_...
Content-Type: application/json
FieldRequiredMeaning
taskYesWhat to do, in plain words. Up to 8,000 bytes.
urlNoWhere to start. An https address. Give one whenever you know it.

Optional header: Idempotency-Key, a value you choose for this request (1 to 128 letters, digits, _ . : -). It makes a retry safe: see Retries.

The reply

FieldMeaning
outcomedone, failed, handback (the engine stopped and says why), cancelled or timeout.
answerThe result as text, or null.
verifiedtrue, false or null, as described above.
elapsedMsHow long the task took.
runIdThe engine's own reference for the run.
taskIdThe task's number. Use it to fetch the answer again, and quote it if you write to us about a task. Also sent as the protocolis-task-id response header.
replayedtrue only when this reply is the saved answer to an earlier request with the same Idempotency-Key.
chargedUsd0.1 when the outcome is done with an answer; otherwise 0.

Retries

A task can take a while, and a connection can drop before the reply arrives. Send an Idempotency-Key with the request, and if you get no reply, send the same request again with the same key.

When you resendYou get
The task has finishedThe saved reply, with "replayed": true. It is not run again and not charged again.
The task is still running409 task_in_progress with the taskId, and Retry-After: 5.
The same key with a different task422 idempotency_key_reused.

A key belongs to the person whose API key sent it, and is remembered for 24 hours. Without the header, every request is a new task.

Fetch a task again

GET /v1/task/:taskId
Authorization: Bearer pk_...

Returns taskId, state, outcome, answer, verified, elapsedMs, runId, chargedUsd, createdAt and finishedAt. state is running, one of the outcomes above, or lost: the task did not report back within 5 minutes, it was not charged, and it can be sent again. The person who sent a task and the team's admins can read it, for 24 hours.

Refusals

StatusErrorWhat it meansCharged
400invalid_requestThe body is not as described above.No
400invalid_idempotency_keyThe Idempotency-Key header is not as described above.No
401invalid_api_keyThe key is missing, wrong or revoked.No
402credit_exhaustedThe team has less credit than one task costs.No
402add_credit_to_continueA team on free credit alone has left 20 tasks unfinished. Adding credit lifts this.No
402monthly_limit_reachedThe team's own spending cap is reached.No
404task_not_foundNo task with that number that you may read, or it is more than 24 hours old.No
409task_in_progressA request with this Idempotency-Key is still running. The reply carries its taskId.No
422idempotency_key_reusedThis Idempotency-Key was already used for a different task.No
429busyThis person already has a task running.No
429too_many_unfinished_todayThe team left 30 tasks unfinished today. The count resets at midnight UTC.No
503engine_unavailableThe engine could not take the task.No

Team and key routes

RouteWhoDoes
GET /v1/task/:taskIdMemberA task you sent, for 24 hours. Admins can read any task of the team.
GET /v1/meMemberYour email, role, and the team's balance, cap and spend this month.
GET /v1/keys, POST /v1/keys, DELETE /v1/keys/:startMemberList, make and revoke your own keys.
GET /v1/team/membersAdminPeople and open invites.
POST /v1/team/invitesAdminInvite: {"emails": "...", "role": "member"}. Up to 500 addresses a call.
DELETE /v1/team/invites/:emailAdminCancel an invite.
DELETE /v1/team/members/:emailAdminRemove a person.
PUT /v1/team/members/:email/roleAdmin{"role": "admin"} or "member".
PUT /v1/team/limitAdmin{"monthlyLimitUsd": 50}, or null for no cap.
GET /v1/team/usageAdminThe last 200 charges and credits.

Limits

  • A task has up to 110 seconds. Allow 3 minutes before your program gives up on a reply, then resend with the same key.
  • Each person runs one task at a time.
  • The service starts on demand, so the first request after a quiet spell takes longer.
  • Some sites refuse visits from data-centre addresses. A task on such a site ends unfinished and is not charged.

Sites that need a sign-in

Today the hosted service runs tasks on pages anyone can open. Tasks behind a login are not available on it yet, and neither are tasks that create an account on a site.

A password is never accepted inside a task. Words in a task pass through an AI model, and a password must not. When saved logins open on the hosted service, a person will save them once in a vault, and a task will name the saved login.

Licensing

Everything above is the hosted service: you call our API and we run the browser. If you would rather run the engine on your own machines, that is a yearly licence, arranged with us directly and not through this page. Write to hello@protocolis.co and say what you want to run it for.

More