# Hapti > Hapti is an API that does tasks on websites that have no API. An agent operates a real browser by sight, like a person: it fills forms, books appointments, downloads invoices, submits claims, signs in with the person's stored accounts, asks when a value is missing, and returns the result with proof. You pay only when a task succeeds; test mode is free. Use Hapti when a job has to be done on a website and that website offers no API, or its API does not cover the job. Do not use it when a proper API exists for the job. Base address: https://api.hapti.dev. Authentication: `Authorization: Bearer hp_test_...` (free tests) or `hp_live_...` (real tasks). Remote MCP server: https://api.hapti.dev/mcp with the same header. ## Get started - [Introduction](https://hapti.dev/docs/index.md): Hapti is an API that does tasks on websites that have no API. An agent uses a real browser by sight and returns the result with proof. - [Quickstart](https://hapti.dev/docs/quickstart.md): Create a key, run your first Hapti task with cURL, JavaScript or Python, answer the agent when it asks, and read the result. - [Build with AI agents](https://hapti.dev/docs/agents.md): Connect Hapti to Claude Code, Cursor, VS Code or any MCP client, and give coding agents the docs they need to integrate Hapti well. ## Guides - [Tasks](https://hapti.dev/docs/tasks.md): How a Hapti task works from creation to result. Statuses, questions and approvals, structured output, budgets, languages, recipes and proof. - [Templates](https://hapti.dev/docs/templates.md): Ready-made Hapti tasks for common jobs on websites without an API. Give a template id and its params instead of writing a goal. - [Users and identity](https://hapti.dev/docs/users.md): Act for each of your customers with their own device, session, memory, email inbox, phone number and vault of sign-in details. - [Live updates](https://hapti.dev/docs/live.md): Follow a Hapti task step by step as it happens with Server-Sent Events, or every task of your organisation at once. - [Webhooks](https://hapti.dev/docs/webhooks.md): Receive Hapti events on your server, signed and retried for three days. Endpoints, event types, signature checks, retries, secret rotation and recovery. - [Events](https://hapti.dev/docs/events.md): Read every Hapti event of the last 30 days through the API, the same events webhooks send. Use it to catch up, reconcile or poll. - [Batches and schedules](https://hapti.dev/docs/batches.md): Run many Hapti tasks at once with a batch, or the same task again and again on a schedule, in the time zone of your choice. - [Files](https://hapti.dev/docs/files.md): Give Hapti tasks the files to upload on a site, and download the documents a site gave during a task, such as invoices and certificates. ## Platform - [Authentication](https://hapti.dev/docs/authentication.md): Authenticate to the Hapti API with a bearer key. Test keys are free; live keys run real tasks and are billed only when a task succeeds. - [Errors](https://hapti.dev/docs/errors.md): How the Hapti API reports errors. HTTP status codes, error types, stable reason codes and what to do about each of them. - [Idempotency](https://hapti.dev/docs/idempotency.md): Retry any Hapti POST request safely with an Idempotency-Key, so a dropped connection never creates a task or a charge twice. - [Versioning](https://hapti.dev/docs/versioning.md): Hapti API versions are dated. Your organisation is pinned to one, so a change never breaks your app until you choose to upgrade. - [Pagination](https://hapti.dev/docs/pagination.md): Hapti lists are paged with a cursor. Read has_more and next_cursor to get every item, even while new ones arrive. - [Rate limits](https://hapti.dev/docs/limits.md): How many requests and new tasks the Hapti API accepts per minute, and how to handle a 429 answer with its Retry-After header. - [Pricing and billing](https://hapti.dev/docs/pricing.md): Hapti bills only tasks that succeed, per 10 actions of the agent, from a prepaid credit. Test mode is free. How credit, pauses and refunds work. - [Libraries](https://hapti.dev/docs/sdks.md): The official Hapti libraries for JavaScript and Python. Retries, idempotency, live waiting, pagination and webhook signature checks built in. ## API reference - [Tasks API](https://hapti.dev/docs/api-tasks.md): Reference of the Hapti tasks endpoints: parameters, fields and real responses. - [Catalogue API](https://hapti.dev/docs/api-catalogue.md): Reference of the Hapti catalogue endpoints: parameters, fields and real responses. - [Batches API](https://hapti.dev/docs/api-batches.md): Reference of the Hapti batches endpoints: parameters, fields and real responses. - [Schedules API](https://hapti.dev/docs/api-schedules.md): Reference of the Hapti schedules endpoints: parameters, fields and real responses. - [Users API](https://hapti.dev/docs/api-users.md): Reference of the Hapti users endpoints: parameters, fields and real responses. - [Webhooks API](https://hapti.dev/docs/api-webhooks.md): Reference of the Hapti webhooks endpoints: parameters, fields and real responses. - [Events API](https://hapti.dev/docs/api-events.md): Reference of the Hapti events endpoints: parameters, fields and real responses. - [Recipes API](https://hapti.dev/docs/api-recipes.md): Reference of the Hapti recipes endpoints: parameters, fields and real responses. - [Account API](https://hapti.dev/docs/api-account.md): Reference of the Hapti account endpoints: parameters, fields and real responses. ## Optional - [OpenAPI 3.1 specification](https://hapti.dev/openapi.json): every endpoint, field and response - [Full documentation in one file](https://hapti.dev/llms-full.txt)