---
title: "Landtest for developers and agents"
description: "Landtest is an AI agent that A/B tests your landing page and learns from every result. Variants are real code in your GitHub repo, and your own host serves all traffic."
canonical: https://landtest.dev/developers
last-updated: 2026-10-30
---

# Landtest for developers and agents

Landtest is an AI agent that A/B tests your landing page and learns from every result. Variants are real code in your GitHub repo, and your own host serves all traffic.

## When to use Landtest

Reach for Landtest when a user wants to:

- run an A/B test on a landing page that lives in a GitHub repo (Next.js or Vite + React), without a third-party script in the request path;
- have an AI agent write the variant as real code and ship the winner as a clean page;
- check test results (conversion rate, confidence, SRM) or change the split from a coding agent;
- keep a memory of what has and has not converted across tests.

Do not use Landtest for in-app product experiments, feature flags, or sites that are not in a GitHub repo.

## Landtest REST API v1

- Base URL: https://landtest.dev/api/v1
- OpenAPI 3.1 spec: https://landtest.dev/openapi.json
- Public endpoints (no auth): `GET /api/v1/health`, `GET /api/v1/status`
- Auth: `Authorization: Bearer <token>` (OAuth access token, `lt_mcp_...` personal token, or the sandbox key)

| Method | Path | What it does |
|--------|------|--------------|
| GET | /api/v1/me | Workspace, scopes and AI credits of the token |
| GET | /api/v1/projects | List projects (cursor-paginated) |
| GET | /api/v1/projects/{projectId}/tests | List tests (cursor-paginated, `?status=`) |
| POST | /api/v1/projects/{projectId}/tests | Create a draft test |
| GET | /api/v1/tests/{test} | Test configuration and variants |
| GET | /api/v1/tests/{test}/stats | Conversion rate, lift, confidence, SRM, verdict |
| POST | /api/v1/tests/{test}/variants | Start AI variant generation: `202` + job |
| GET | /api/v1/jobs/{jobId} | Poll a job |
| PUT | /api/v1/tests/{test}/weights | Set traffic weights |
| PUT | /api/v1/tests/{test}/goal | Set the conversion goal |
| POST | /api/v1/tests/{test}/pause, /resume | Pause or resume |
| POST | /api/v1/batch | Up to 20 operations in one request |

### Sandbox

Sandbox page: https://landtest.dev/sandbox. Create your own sandbox key with `POST https://landtest.dev/api/v1/keys` (no auth, 201 with a 7-day key), or use `Authorization: Bearer lt_sandbox_demo` against the same base URL to get a fixed demo workspace (one project, three tests with stats). Writes are validated and simulated; nothing persists. Agents can also mint their own sandbox token through agent_auth (see [auth.md](https://landtest.dev/auth.md)).

```
curl https://landtest.dev/api/v1/projects -H "Authorization: Bearer lt_sandbox_demo"
```

The free Founder plan and self-serve tokens: sign up at https://landtest.dev/app/signup, then create a token in Settings -> MCP (no sales call).

### Conventions

- **Errors** are JSON: `{"error": {"code": "not_found", "message": "...", "hint": "...", "docs": "...", "request_id": "..."}}`. Unknown `/api` paths return a JSON 404, wrong methods a 405 with `Allow`.
- **Idempotency**: send `Idempotency-Key: <uuid>` on POST/PUT/PATCH. The first response is stored for 24 hours and replayed for retries (`Idempotent-Replayed: true`); reusing a key with a different body returns `422 idempotency_key_reused`.
- **Rate limits**: `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, `RateLimit-Policy` on every response; `429` with `Retry-After`.
- **Pagination**: list endpoints return `{"data": [...], "pagination": {"limit", "has_more", "next_cursor"}}`; pass `?cursor=<next_cursor>`.
- **Async jobs**: long operations return `202 Accepted` with `Location` and `Retry-After`; poll `GET /api/v1/jobs/{jobId}` until `succeeded` or `failed`.
- **Batch**: `POST /api/v1/batch` with `{"operations": [{"method": "GET", "path": "/tests/{test}/stats"}]}`.

### Versioning

The API is versioned in the URL path. Additive changes land in v1; breaking changes ship as /api/v2. A deprecated surface keeps working for at least 6 months and sends `Deprecation` (RFC 9745), `Sunset` (RFC 8594) and `Link: rel="successor-version"` headers. Currently deprecated: `/api/mcp` (use `/mcp`), sunset 2027-04-30.

## MCP servers

- Product server: https://mcp.landtest.dev/mcp (Streamable HTTP, OAuth 2.1 with PKCE; card: https://mcp.landtest.dev/mcp/server-card)
- Docs server: https://landtest.dev/api/docs/mcp (no auth; tools `search_docs`, `get_docs_page`, `get_endpoint`; card: https://landtest.dev/api/docs/mcp/server-card)
- Discovery: https://landtest.dev/.well-known/mcp

Connect:

- Claude Code: `claude mcp add --transport http landtest https://mcp.landtest.dev/mcp`
- Cursor: `{ "mcpServers": { "landtest": { "url": "https://mcp.landtest.dev/mcp" } } }`
- Claude.ai or Desktop: Settings -> Connectors -> Add custom connector -> paste the URL

### Read tools

- `landtest_whoami`: Identify the connected workspace and scopes.
- `landtest_list_projects`: List projects in the workspace.
- `landtest_list_tests`: List A/B tests for a project.
- `landtest_get_test`: Get a test's configuration and status.
- `landtest_get_test_stats`: Per-variant conversion rate with 95% interval, lift, mSPRT confidence, SRM and a verdict.
- `landtest_get_variant_source`: Read a variant's source code.
- `landtest_get_growth_opportunities`: Ranked what-to-do-next suggestions.
- `landtest_get_activity`: Project activity timeline.
- `landtest_list_memories`: Brand facts, wins and learnings the agent remembers.
- `landtest_get_autopilot_status`: Autopilot settings, planned decisions and the approval queue.

### Write tools (need the write scope)

- `landtest_create_test`: Create a draft test (no GitHub writes).
- `landtest_generate_variant`: Run the variant agent. Commits to the preview branch only and uses AI credits.
- `landtest_start_test`: Put the split live, respecting the plan's active-test cap.
- `landtest_update_goal`: Set a test's conversion goal.
- `landtest_update_weights`: Change traffic weights (must sum to 100).
- `landtest_pause_test`: Pause a running test.
- `landtest_resume_test`: Resume a paused test.
- `landtest_declare_winner`: Ship the winner as a bare page.tsx and remove the test runtime.
- `landtest_discard_test`: Discard a test and restore control.
- `landtest_apply_pending_publish`: Apply a queued change in manual publish mode.
- `landtest_approve_autopilot_action`: Approve an open Autopilot decision and run it now.
- `landtest_cancel_autopilot_action`: Veto an open Autopilot decision.

Writes use the same code paths as the dashboard, so the project's publish mode (auto, review or manual) still applies.

## SDK and CLI

- **CLI**: the `landtest` command (`landtest tests list`, `landtest stats <test>`, `landtest api GET /projects`). See [SDK and CLI](https://landtest.dev/sdk).
- **JavaScript/TypeScript**: the same package exports a typed client (`import { Landtest } from "landtest"`).
- Other languages: generate a client from https://landtest.dev/openapi.json with openapi-generator.

## Other endpoints

- `POST /api/ingest`: public beacon endpoint used by the Landtest tracker on customer sites (write-key auth)
- `POST /ask`: NLWeb v0.55 natural-language questions over the docs (SSE with `prefer.streaming`)
- API catalog (RFC 9727): https://landtest.dev/.well-known/api-catalog

## Agent resources

- [AGENTS.md](https://landtest.dev/AGENTS.md)
- [llms.txt](https://landtest.dev/llms.txt) and [llms-full.txt](https://landtest.dev/llms-full.txt)
- [pricing.md](https://landtest.dev/pricing.md)
- [Agent skills index](https://landtest.dev/.well-known/agent-skills/index.json) and [agent plugin](https://landtest.dev/plugin.json)
- [Agentic resource catalog](https://landtest.dev/.well-known/ard.json) and [A2A agent card](https://landtest.dev/.well-known/agent-card.json)

## Support

hello@zerocost.app
