---
title: "Create Browser Route Run"
method: POST
path: "/routes"
tags: ["routes"]
---

# Create Browser Route Run

`POST /routes`

Start a browser-owned public route run and stream it live (SSE).

The Cheshire run is decoupled from this socket — a detached consumer drives
it to a durable terminal even if the browser backgrounds. ``X-Route-Run-Id``
flushes with the headers; reconnect/replay is ``GET /routes/{run_id}/events``
with ``Last-Event-ID``.

Admission comes before the run row (#1909): a refused ask costs one Valkey
increment, not a persisted run nobody will ever read.

## Request body

- BrowserRouteCreateRequest — Start a public route run from an anonymous browser session.
  - `prompt` string, required
  - `browser_location` PublicRouteBrowserLocation — GPS fix explicitly shared by the browser for one route run. Serializes 1:1 into Cheshire's ``CurrentLocation`` (same field names).
    - `lat` number, required
    - `lng` number, required
    - `accuracy_m` number, nullable
    - `captured_at` string, date-time, required
    - `label` string, nullable
  - `locale` string
  - `units` string, nullable
  - `timezone` string, nullable
  - `provenance` PublicRouteProvenance — Read-only ancestry for route iterations and forks. imperfect-api lineage state only — it is **not** sent to Cheshire (the ``/routes`` contract is ``extra="forbid"``); it is persisted on the run so a continuation can record where it came from.
    - `source_route_hash` string, nullable
    - `source_route_slug` string, nullable
    - `source_public_route_id` string, nullable
    - `source_session_id` string, nullable
    - `source_run_id` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/imperfect/apis/imperfect-api.md) · [All operations](https://skmtc.dev/imperfect/apis/imperfect-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/imperfect/imperfect-api/revisions/55d56c4beab4/schema)
