REST API
Every route answers with and without a trailing slash. Errors are {"detail": ...}.
Authentication
Section titled “Authentication”Requests under /api/ are authenticated in this order:
Authorization: Bearer <access token>- the
access_token_lfcookie - the
x-api-keyheader or query parameter
API keys belong to users and act as their owner. Missing credentials answer 401, or 403 on run, webhook, workflow and MCP routes. With auto-login on (the default on loopback binds), requests without credentials run as the superuser.
Every resource is scoped to its owner. Another user’s id answers 404.
curl -X POST 'http://localhost:7860/api/v1/run/<flow id or endpoint name>' \ -H 'Content-Type: application/json' \ -H 'x-api-key: <your API key>' \ -d '{"input_value": "Hello", "input_type": "chat", "output_type": "chat", "session_id": "my-session"}'Endpoints by area
Section titled “Endpoints by area”Health and meta
Section titled “Health and meta”GET /health(liveness) andGET /health_check(runsSELECT 1; 503 when the database fails)GET /api/v1/all(the component catalog),/api/v1/version,/api/v1/config
Auth and users
Section titled “Auth and users”POST /api/v1/login(formusername,password),GET /api/v1/auto_login,POST /api/v1/refresh,GET /api/v1/session,POST /api/v1/logoutPOST /api/v1/users/(sign-up when enabled; superusers always),GET /api/v1/users/whoami,GET /api/v1/users/(superuser),GET/PATCH/DELETE /api/v1/users/{id},PATCH /api/v1/users/{id}/reset-passwordGET/POST /api/v1/api_key/(optionalexpires_at),DELETE /api/v1/api_key/{id}
Flows and projects
Section titled “Flows and projects”GET/POST /api/v1/flows/,GET/PATCH/PUT/DELETE /api/v1/flows/{id}.If-Match: <version_token>is honoured, and a mismatch answers 412.POST /api/v1/flows/batch/,DELETE /api/v1/flows/(a list of ids)POST /api/v1/flows/upload/(JSON or ZIP),POST /api/v1/flows/download/(one id gives JSON, several give a ZIP)/api/v1/projects/and/api/v1/folders/: list, create,GET/PATCH/DELETE /{id},/download/{id}(ZIP),/upload/- Versions:
GET/POST /api/v1/flows/{id}/versions/,GET/DELETE /versions/{vid},POST /versions/{vid}/activate,GET /flows/{id}/version-state,POST /flows/{id}/fork,POST /flows/{id}/overwrite(needsIf-Match) - Starters:
GET /api/v1/starter-projects/,GET /api/v1/flows/basic_examples/
Running flows
Section titled “Running flows”POST /api/v1/run/{flow_id_or_endpoint}withinput_value,input_type,output_type,output_component,session_id,tweaks.?stream=truereturnstext/event-streamending inend{result}.POST /api/v1/webhook/{id}answers 202. The raw body goes into every Webhook node as itsdata, and the flow runs in the background.POST /api/v1/build/{id}/flowreturns{job_id}(start_component_id,stop_component_id). ThenGET /api/v1/build/{id}/events(NDJSON) andPOST /api/v1/build/{id}/cancel.POST /api/v2/workflowswithmodesync,streamorbackground, andstream_protocollangflow(SSE) oragui. AlsoGET /api/v2/workflows?job_id=,POST /api/v2/workflows/stopandGET /api/v2/workflows/{job_id}/events. Stream and background jobs are durable: status, outputs and events survive a restart, withLast-Event-IDreplay.- Human in the loop:
GET /api/v2/workflows/pending,POST /api/v2/workflows/{job_id}/resume. See Human in the loop. POST /api/v1/responses, an OpenAI Responses-style endpoint wheremodelis a flow id or endpoint name.
Variables, files and API keys
Section titled “Variables, files and API keys”GET/POST /api/v1/variables/,PATCH/DELETE /api/v1/variables/{id},POST /api/v1/variables/detections. Credential values are never returned.- Files v2:
POST/GET/DELETE /api/v2/files,GET/PUT/DELETE /api/v2/files/{id},POST/DELETE /api/v2/files/batch/ - Files v1 per flow:
/api/v1/files/{upload,list,download,images,delete}/...
Monitor and traces
Section titled “Monitor and traces”GET/DELETE /api/v1/monitor/messages,/messages/sessions,PUT /messages/{id},PATCH/DELETE /messages/session/{id}GET/DELETE /api/v1/monitor/builds?flow_id=,GET /api/v1/monitor/transactions?flow_id=,GET /api/v1/monitor/job_queueGET/DELETE /api/v1/monitor/traces,GET/DELETE /api/v1/monitor/traces/{id}
Public flows and shared playground
Section titled “Public flows and shared playground”GET /api/v1/flows/public_flow/{id}(no auth; PUBLIC flows only)POST /api/v1/build_public_tmp/{flow}/flow,GET /api/v1/build_public_tmp/{job}/events(anonymousclient_idcookie, 10 starts per minute)GET /api/v1/monitor/messages/shared,/shared/sessions,PUT /shared/{id},PATCH/DELETE /shared/session/{id},POST /api/v2/workflows/publicGET /api/v1/webhook-events/{flow}(SSE)
MCP and A2A
Section titled “MCP and A2A”- MCP server:
POST /api/v1/mcp/streamable, legacy SSEGET /api/v1/mcp/sse+POST /api/v1/mcp/?session_id=, and per project/api/v1/mcp/project/{id},/sse,/streamable. See MCP. - MCP server configs:
GET /api/v2/mcp/servers?action_count=,GET/POST/PATCH/DELETE /api/v2/mcp/servers/{name} - A2A:
GET /api/v1/a2a/agents,GET /api/v1/a2a/{flow}/.well-known/agent-card.json,POST /api/v1/a2a/{flow}/jsonrpc
Models
Section titled “Models”GET /api/v1/models(filtersprovider,model_type,tool_calling,reasoning),/models/providers,/provider-descriptors,/provider-variable-mapping,/enabled_providersGET/POST /api/v1/models/enabled_models,GET/POST/DELETE /api/v1/models/default_model,GET /api/v1/model_options/{language,embedding}
Model lists come from a bundled catalog. There is no live model discovery for Ollama or OpenAI-compatible servers.
Knowledge bases and memories
Section titled “Knowledge bases and memories”GET/POST/DELETE /api/v1/knowledge_bases,POST /preview-chunks,GET/DELETE /{name},GET /{name}/chunks,POST /{name}/ingest(multipart),GET /{name}/runs,/runs/{id},POST /{name}/cancelGET/POST /api/v1/memories?flow_id=,GET/PATCH/DELETE /{id},GET /{id}/sessions,/{id}/messages,POST /{id}/flush,GET /{id}/mismatch,POST /{id}/regenerate
Triggers
Section titled “Triggers”GET /api/v1/triggers?flow_id=,POST,GET/PATCH/DELETE /{id},/{id}/enable,/disable,/pin,/events,/replay,/test,/ingress,/signing-secret- Ingress (anonymous):
POST /api/v1/triggers/ingress/webhook/{public_id}, signed withX-Signature. Every refusal answers 404. There is no rate limit on this route yet.
Schedule Trigger and Inbound Webhook Trigger nodes become trigger rows when you save the flow. A row stays pending until you enable it.
Custom components
Section titled “Custom components”POST /api/v1/custom_component,POST /api/v1/custom_component/updatePOST /api/v1/validate/code(answers “not supported” unless the Python bridge is on),POST /api/v1/validate/prompt
Not provided
Section titled “Not provided”/store, voice, and authorization or enterprise routesPOST /models/validate-provider- the deprecated per-vertex build endpoint
- MCP resources and prompts, and the MCP install and composer routes
- AG-UI replay of jobs that are no longer in memory
Weftra is open source under Apache-2.0. Made by Liceron.