Skip to main content
Builds take minutes. Read the response as a stream to receive progress and the outcome of the run. An HTTP 200 means the stream opened, not that a function is ready. Both endpoints below use Authorization: Bearer $NOTTE_API_KEY. Keep that key on your server; do not embed a shared key in a public web client.

Choose a transport

The formats differ. Do not use a parser that expects named event: result frames for the AI SDK stream. The public OpenAPI specification describes the first endpoint and its event payloads.

Simple build stream

Send a query describing the function you want. curl -N disables output buffering so events appear as they arrive.
The response has Content-Type: text/event-stream. Each event ends with a blank line. Representative frames:
An unsuccessful build sends an error event instead of a result:
Parse the JSON after data: using the event name from event:. Progress is informational; only result or error is terminal. Check for an HTTP rejection before reading the stream, and handle errors inside a stream that already returned 200.
This endpoint returns its result when it detects a deployed function. That is not proof that the agent has finished testing it. Use the full agent stream below when your application needs to distinguish creation from verified completion.

Full agent stream

The default response from /api/anything/start is streaming. Omit detach, or set it to false.
Save the x-thread-id response header. This endpoint uses the AI SDK UI-message wire format but does not forward the x-vercel-ai-ui-message-stream header, so do not require that header in your client. The stream format is separate from the retired Anything API v1 backend. JSON chunks arrive in data: frames. Relevant chunks include:

Detect verified completion

Track the toolCallId of a tool-input-available chunk whose toolName is complete_build. Its successful tool-output-available output contains a JSON object, possibly encoded as a string, with:
This example shows only the fields a completion reader needs. Require the same thread_id as the response header and a nonempty function ID and version. Wait for normal stream termination, and treat any subsequent error as a failure. Do not infer success from an arbitrary tool’s stdout or an early deployment event. A turn can finish normally after the agent explains a blocker, without a stream error. If no successful complete_build result arrived, report that the run ended without a verified function and show the agent’s explanation.

Python reader

This server-side example uses requests. Its line iterator handles network chunk boundaries; collect data: lines until the blank line that terminates each SSE frame.
Persist the outcome in your own application. A dropped connection or read timeout is an unknown outcome, not permission to resubmit a build. Starting another request without the saved thread ID creates a new thread and can duplicate work and charges.

Detached builds and follow-ups

POST /api/anything/start also accepts detach: true. It returns 202 Accepted immediately:
started acknowledges submission only. The returned URL opens the thread in the app. There is no documented public polling endpoint to recover a detached build’s final status or transcript. Choose streaming when your client needs the outcome programmatically; detached mode does not return a stream to consume later. To send a follow-up after the turn finishes, call /api/anything/start again with a new query and the saved thread_id. This starts another agent turn in the same thread; it is not a read-only status request or stream reconnection. For unattended builds, make that constraint explicit in query: describe the inputs, expected output, authentication available to the run, whether a new function is required, visibility, and how the agent should report missing prerequisites without asking for human input.