stream ▸ session live 0

A logged-in browser, behind an OpenAI-compatible endpoint.

Open a session once, signed in as your persona, and call it like a model: every message becomes a turn in a real browser, with a tab per conversation. Watch it, steer it mid-run, or hand it named handlers.

A live session, watched turn by turn

chat A→tab-1live

"Read the latest invoice total."

chat B→tab-2live

"Export this month's orders."

Steer mid-run: send the next turn any time.

why ▸ an endpoint, steerable, signed in 2
An endpoint, not a black boxPoint any OpenAI client at it; every turn streams as it happens: the page, the action, the result.
Steer it mid-runSend the next instruction any time; the session stays warm between turns.
Signed in as your personaIdentity, fingerprint, and 2FA are applied when the session starts.
oai ▸ openai-compatible 5
01
Drop-in

OpenAI-compatible chat API

Point any OpenAI-compatible client at a Writ streaming session and chat with it like a model, except the "model" is a real browser acting on a real site. Each message lands in your own handler script — a JS handler you write — which drives the page and streams the reply. No AI model receives anything unless you put one in your handler. Use the SDKs and tools you already have; swap the base URL.

cURL
curl https://api.usewrit.app/v1/streaming/{session}/chat/completions \
  -H "Authorization: Bearer wt_..." \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      { "role": "user", "content": "Open the latest invoice and read the total." }
    ],
    "user": "conversation-7"
  }'
Python
from openai import OpenAI

# Drop-in: bring your existing OpenAI client, swap the base URL.
client = OpenAI(
    base_url="https://api.usewrit.app/v1/streaming/{session}",
    api_key="wt_...",
)

resp = client.chat.completions.create(
    model="writ-browser",
    messages=[{"role": "user", "content": "Open the latest invoice and read the total."}],
    user="conversation-7",  # routes to its own browser tab
)
print(resp.choices[0].message.content)

Drop-in compatible: bring your existing OpenAI client and change the base URL. The browser acts on your own authenticated accounts; this is authorized-access automation, not circumvention.

fn ▸ callable handlers 9
02
Deterministic surface

Callable handlers

Define handlers on a live session and call them by name. Each handler is a unit of browser work you control (navigate, fill, extract, click through a multi-step flow), invoked on the warm, logged-in session. Handlers are deterministic: they do exactly what you defined, on the page state that's already there.

call-handler.http
// Invoke a named handler on a warm, logged-in session.
POST /v1/streaming/{session}/handlers/extract_orders
Authorization: Bearer wt_...

{
  "since": "2026-06-01",
  "status": "shipped"
}
  • Invoke by name on a live session.
  • Operate on existing page state, with no re-login per call.
  • Compose handlers into longer flows.
id ▸ signed in as your persona 13
03
Identity

Signed in as your persona, before the first turn

Link a persona to a session and Writ applies it at start: the account identity, a consistent browser profile, and stored session state. Email and SMS one-time codes and TOTP are handled up front, so the AI lands on a page already logged in as you.

  • Identity and a consistent browser profile resolved from the persona at session start.
  • TOTP and mailbox / SMS one-time codes cleared before the run begins.
  • On your own authorized accounts: authorized-access automation, not circumvention.

Applied at session start

  • Persona identity + browser profile
  • TOTP · email / SMS OTP
  • Stored session state

The AI takes its first turn already logged in as you.

vs ▸ cold vs warm 17
04
Why persistent

Cold automation vs. a live session

A cold, per-call browser pays the login and warm-up tax on every request and loses its state. A live session authenticates once, stays logged in, and lets you watch and drive it turn by turn. Long, multi-step runs feel continuous.

CriterionLive sessionCold, per-call
Login / warm-up cost Paid once, reused Paid on every call
Page & session state Kept between turns Lost after each call
Visibility Watch each turn stream Opaque until it returns
Long, multi-step runs Continuous, steer as it goes Stitched across separate runs

Live session compared to cold per-call automation

iso ▸ a tab per conversation 21
05
Isolation

A tab per conversation

Run several conversations against one session and each gets its own browser tab. Conversation state stays isolated; one chat's navigation and page context never bleed into another's. A stuck turn in one conversation can't wedge the others; turns are bounded and recoverable per tab.

One live session
↓
tab-1conversation-7
tab-2conversation-8
tab-3conversation-9
  • routingPer-conversation tab routing, so chats don't collide.
  • timeoutsPer-turn timeouts so one slow turn can't block the rest.
  • recoveryTab reload and recovery built in.
mtr ▸ ai in credits 25
06
Honest billing

Builds are included. Session AI is in credits.

When a session uses managed cloud AI, you see real token usage per turn, the same numbers your provider would bill, charged in credits from your included credits and then your prepaid balance.

Managed AI is billed by tokens, in credits, with the price shown before you run; a handler that uses no model costs no AI at all. Writ-AI builds are a separate, included count; past it a build is 1,500 credits, charged in full only when it delivers a working API; a build you stop pays what it used, never more.

How AI is billed

3,200credits per million tokens
meteredmanaged token cost
5Writ-AI builds a month included on Free

Managed AI is metered purely by tokens used, with no per-call minimum. Runs on your own machine cost 0 credits. See billing & credits.

cloud plain call 2 cr browser call 20 cr +10 cr when a CAPTCHA was solved (Pro and up) 0 cr when the call fails your machine any call 0 cr pricing →

ag ▸ built for agents 29
07
For AI agents

Built for agents

Streaming is how an AI agent operates a website as a living tool: keep a session warm, send it turns, watch each one, get structured results, hand it the next instruction. Combined with REST endpoints and MCP, your agent can call a Writ API as a tool and drive a live browser as a conversation, on sites that never shipped an API.

app ▸ session surface 33
tab-1 · conversation-7 tab-2 · conversation-8 session warm · authenticated
extract_orders read_invoice_total export_csv refresh_session

The Streaming surface: a live session, callable handlers, and the per-conversation tab strip.

faq ▸ questions logged 37
08
FAQ

Questions, answered

Is the chat API really OpenAI-compatible?

Yes. It exposes an OpenAI-compatible chat surface, so you can point an existing OpenAI client at a Writ streaming session by changing the base URL. Each message lands in your own handler, which drives the page and streams the reply.

Can I really watch the AI work?

Yes. A streaming session logs each turn as it happens: the page it is on, the handler it called, and the result. You can send the next instruction while it runs.

How does the session sign in as me?

Link a persona and Writ applies it at session start: a stable, consistent browser identity and stored session state, with TOTP and email / SMS one-time codes handled up front. The first turn happens already logged in.

Do multiple conversations interfere with each other?

No. Each conversation runs in its own tab with isolated state, per-turn timeouts, and tab recovery.

How is AI billed in a streaming session?

Managed cloud AI is charged by tokens used, in credits, with the price shown before you run. Writ-AI builds are included per plan; past the count a build is 1,500 credits, charged in full only when it delivers; a build you stop pays what it used, never more. A session on your own machine with Writ Desktop costs 0 credits.

Does it run on my own accounts?

Yes. The browser acts on your own authenticated accounts, on sites you are authorized to use.

go ▸ open a session 41

Open a live session.

Point your OpenAI client at a logged-in browser, then watch and steer it turn by turn.

Writ runs on your own accounts, with your own credentials and data, on sites you are authorized to use.