Передайте это своему ИИ-агенту
Скопируйте этот промпт в Claude Code, Cursor, Codex или любой кодинг-агент. Он подскажет агенту, где документация и как использовать ваш API-ключ.
Use the Lovely Router browser agent API: a real browser that clicks, types, fills forms and logs in for a task, and returns an answer plus JSON in a schema I choose.
- Docs (read first): https://lovelyrouter.com/docs/browser-agent.md and https://lovelyrouter.com/docs/api/browser.md
- Start a run: POST https://lovelyrouter.com/v1/browser/runs with `{"goal": "...", "start_url": "https://...", "output_schema": {...}}`. Put every value the task needs in the goal. It returns 202 at once; poll the `poll` path (or stream `events`) until the run ends, then read `answer` and `data`.
- Billed per step (fast mode by default). Set `max_steps` to cap a run. For unattended runs send `"human": false`; by default the agent pauses before purchases, sending or deleting (`approve`).
- If you support MCP, you can instead connect the server https://lovelyrouter.com/mcp (Streamable HTTP, same key; https://lovelyrouter.com/docs/tools/mcp.md) and use suggest_tools, get_tool and run_tool.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.
My task: <describe the site and what the agent should do or extract>Вход
goalstringобязательноWhat to do, in plain words, with every value the task needs
start_urlstringобязательноPage to start on
modestringfast (default, $0.006/step) or accurate ($0.012/step: screenshots when unsure + read-only page code; higher success on hard sites)
fast · accurate
output_schemaobjectOptional JSON Schema (or {"field": "type"} shorthand) for structured output in `data`; omit for data: null
modelstringOptional model id from /v1/models (e.g. claude-sonnet-5.5) for the agent's reasoning; its tokens are billed at the normal price × 1.2 on top of the step price
secretsstring[]Names of vault secrets the agent may fill (never shown to the model)
profilestringSaved browser profile (cookies) to start from
save_profilestringSave cookies under this profile name when done
human_timeout_minutesnumberHow long to wait for a human reply or approval, 1–1440 minutes (default 30); time beyond 1 minute per step costs $0.005/min
approvestringPause for approval before risky submits (default risky)
none · risky · submit
Попробовать
Вызов из кода
Как работают запуски, опрос и тарификация →curl https://lovelyrouter.com/v1/tools/browser-agent/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{"input":{"goal":"Find the price of the book '\''A Light in the Attic'\''","start_url":"https://books.toscrape.com/"},"max_results":50}'# MCP (agents): suggest_tools → get_tool → run_tool
run_tool({
"tool": "browser-agent",
"input": {"goal":"Find the price of the book 'A Light in the Attic'","start_url":"https://books.toscrape.com/"},
"max_results": 50
})Сколько это стоит
| Результаты | Запусков (по 100 за запуск) | Стоимость |
|---|---|---|
| 100 | 1 | $0.60 |
| 1,000 | 10 | $6.00 |
| 10,000 | 100 | $60.00 |
Предоплата, без подписки. Если результатов меньше запрошенного, вы платите меньше. Цены
Для чего используется
Частые вопросы
Сколько стоит API Браузерный агент?
$0.006 / step. 1,000 результатов, полученных запусками до 100, стоят $6.00. Подписки нет: оплата с предоплаченного баланса.
Это API автоматизации браузера с AI?
Да. Если вы искали API автоматизации браузера с AI, API AI-агента для веба или API управления браузером через LLM, это оно: Задайте цель и стартовую страницу — ИИ-агент выполнит задачу в настоящем браузере: переходы по страницам, заполнение форм, вход с сохранёнными секретами, запрос кодов у вас, передача управления на CAPTCHA, ожидание вашего подтверждения перед покупками и возврат структурированного JSON по вашей схеме. Для задач, где нужно взаимодействие; чтобы просто прочитать страницу, используйте «Чтение веб-страницы» (web-fetch). $0.006 за шаг в быстром режиме, $0.012 в точном (при сомнениях смотрит на скриншоты, может запускать код только для чтения данных). В каждый шаг входит 1 минута; время сверх этого (например, ожидание вашего подтверждения) стоит $0.005/мин. Полный API: /v1/browser.
Сколько результатов возвращает один запуск?
По умолчанию 50, до 100 за запуск. Задайте max_results, чтобы ограничить запуск: оплачиваются только полученные результаты.
Может ли ИИ-агент использовать этот инструмент?
Да. Подключите Claude Code, Cursor или любой MCP-клиент к MCP-серверу Lovely Router: агент находит инструмент через suggest_tools и запускает его через run_tool с идентификатором browser-agent.
Что будет, если запуск завершится ошибкой?
Запуск, который завершился ошибкой или был остановлен, оплачивается только за выданные результаты, без платы за вызов. Максимальная стоимость запуска резервируется при старте, остаток освобождается после расчёта.