Skip to main content
STOP. Do not read past this section until you have read and followed /quickstart.md.Goal: produce a reliable SDK automation script. The intended authoring flow is generate then edit, not write browser automation from scratch.Do not hand-write SDK code with element IDs, selectors, or form fields from memory. Element IDs, selectors, and field mappings must come from a live observe() call, CLI notte page observe output, or generated workflow code. Guessed browser targets fail on real pages.Use the Notte skill and CLI to inspect the live site, validate actions/selectors, handle auth/session state, and export workflow code with notte sessions workflow-code before using SDK docs or SDK code.SDK reference pages are for understanding, running, or editing generated workflow code. They are not the starting point for manually authoring the initial browser automation. SDK-first code is guesswork on real-world pages with dynamic selectors, auth state, CAPTCHAs, and anti-bot behavior.
The Anything API lets you describe a task in plain English, and Notte will build, deploy, and run a web automation function for you — all through a single HTTP request. The response streams the agent’s progress as an AI SDK UI message stream, or you can detach and let the run continue in the background.

Try it now

Open the Anything API web app.

Get your API key

Create an account on the Console to get started.

Quick start

The API streams the agent’s work back as an AI SDK UI message stream. The x-thread-id response header identifies the thread handling your run, so you can send follow-up turns into the same thread later.

Request

string
required
A natural-language description of the task you want automated.
string (UUID)
Send a follow-up turn into an existing thread. The sandbox state and conversation carry over. Omit to start a new thread.
boolean
default:"false"
Start the run and return immediately instead of streaming. See Detached mode.
string
Optional model override for the agent.
string
Optional reasoning effort override for the agent.
string
default:"v2"
API contract version. "v2" is the only supported value and the default, so you can omit this field. Explicit "v1" returns 400 — see Migrating from v1.
POST /api/anything/start
Headers

Response

Streamed (default)

By default, the response is an AI SDK UI message stream — the same format the Vercel AI SDK’s useChat hook consumes, so you can back a chat UI with it or read the stream yourself. Call it from your server, not from the browser: see Calling from a browser. Response headers

Detached mode

Pass detach: true to start the run and return immediately with 202 Accepted:
The response body contains:

Follow-up turns

Pass the thread_id from a previous response to continue the conversation in the same thread. The sandbox state and conversation history carry over, so the agent can build on its earlier work:
Follow-up turns work in both streamed and detached mode.

Consuming the stream

Python

consume_stream.py

TypeScript

If you are building a chat interface, you can skip the manual parsing: the stream is directly compatible with the AI SDK’s useChat hook. Point it at your own proxy route, not at anything.notte.cc.

Using the Node SDK

The Node SDK wraps this endpoint as client.anything.start(). It posts to api.notte.cc/anything/start, which proxies to the same v2 backend and pipes the stream back, so you get the parsed events without writing the reader yourself:
Two differences from calling the endpoint directly:
  • The SDK field is task, not query — the proxy maps it before forwarding.
  • The proxy forwards only that field, so thread_id, detach, model, and reasoningEffort are not available through it. run.threadId still tells you which thread ran, but sending a follow-up turn into it means calling anything.notte.cc directly, as above.
The Python SDK does not wrap the Anything API yet — use the HTTP example above.

Calling from a browser

Your NOTTE_API_KEY is a server-side secret. A browser client that sends Authorization: Bearer <NOTTE_API_KEY> ships the key to every visitor, who can then spend your credits. There are no browser-scoped keys for this endpoint.
Put a route on your own server between the browser and the Anything API. The route holds the key, forwards the request, and pipes the stream back unchanged — so useChat still sees the AI SDK UI message stream it expects:
app/api/anything/route.ts
Then point the browser at your route — useChat({ api: "/api/anything" }). Authenticate and authorize your own users in that route: it is now the thing standing between them and your Notte credits.

Re-running a created function

When a run creates a reusable Notte Function, you can run it again via the Notte CLI or SDK:

Migrating from v1

The v1 backend is retired. Requests with version: "v1" return 400 {"error": "unsupported_version"} with a retirement message.
If you were calling the v1 API:
  • Omit version (or send "v2"). It now defaults to "v2".
  • Responses are an AI SDK UI message stream instead of the v1 SSE event feed. The v1 event types (status, thinking_delta, done, …) no longer exist.
  • Follow-ups use thread_id. The v1 concepts resume_strategy, snapshot semantics, and claude_code_session_id are gone: pass the thread_id from the x-thread-id response header to continue a thread.
  • The x-vercel-ai-ui-message-stream: v1 response header refers to the AI SDK’s own stream-format version, not the retired v1 backend.

Error handling