Every endpoint takes a key in the Authorization header: Authorization: Bearer hp_test_.... Base address: https://api.hapti.dev. The full specification is in openapi.json.
Starts an agent that does the goal on the website, by sight, in a real browser. Returns at once; follow the task with GET, the live stream or webhooks.
Parameter
In
Description
Idempotency-Key
header
Any unique string of 1 to 255 visible characters. The same key with the same request within 24 hours returns the first answer again instead of acting twice.
Field
Type
Description
url
string
The page to start on.
goal
string
What to achieve and what to report back, in plain words, in any language.
data
object
The facts the agent may use. It never invents a missing value: it asks.
template
string
A catalogue template id, instead of url and goal.
params
object
The params of the template.
user
string
The person the task acts for. Gives the task their device, session, memory, inbox and stored accounts.
accounts
array
Stored accounts of the person the agent may sign in with.
output
object
A JSON Schema for result.data. A task whose answer cannot follow it is not billed.
files
array
Files the agent may upload on the site: up to 20, 50 MB each, 100 MB in all.
webhook
string
An https address that receives the events of this task only.
approval
string: mandate, required
required: the agent waits for your approval before any step that commits the person.
max_price_cents
integer
The agent stops before the price would go over it.
max_steps
integer
answer_language
string
Language of the answer and questions, like fr, pt-BR or wo. By default, the language of the goal.
locale
string
Language of the browser, like pt-PT.
country
string
Two letters: the country the sites see the person in.
proxy
boolean
Go out through a residential address in that country, billed per GB when the task succeeds.
memory
boolean
true by default with a user.
keep_session
boolean
true by default with a user.
learn
boolean
true by default: a success becomes a recipe.
recipe
string
A recipe id to replay.
on_insufficient_credit
string: pause, refuse
pause by default: a live task without enough credit waits and starts once credit is added.
Request
{
"url": "https://portal.example.com/claims",
"goal": "Declare the water damage claim and give me the claim number.",
"data": {
"contract": "AX-4471",
"date": "2026-11-20"
},
"user": "customer_42"
}
Stops a task that is queued, running, waiting or paused. A cancelled task is never billed.
Parameter
In
Description
id
path
Task id, like tsk_9f2c41a07b3d5e18
Idempotency-Key
header
Any unique string of 1 to 255 visible characters. The same key with the same request within 24 hours returns the first answer again instead of acting twice.
Creates a new task with the same input as a finished one.
Parameter
In
Description
id
path
Task id, like tsk_9f2c41a07b3d5e18
Idempotency-Key
header
Any unique string of 1 to 255 visible characters. The same key with the same request within 24 hours returns the first answer again instead of acting twice.
Server-Sent Events: task when its state changes, step for each action of the agent, screenshot for each image, done at the end. Send Last-Event-ID to resume after the last step.