---
title: "Build Public Tmp"
method: POST
path: "/api/v1/build_public_tmp/{flow_id}/flow"
tags: ["Chat"]
---

# Build Public Tmp

`POST /api/v1/build_public_tmp/{flow_id}/flow`

Build a public flow without requiring authentication.

This endpoint is specifically for public flows that don't require authentication.
It uses a client_id cookie to create a deterministic flow ID for tracking purposes.

Security Note:
- The 'data' parameter is NOT accepted to prevent flow definition tampering
- Public flows must execute the stored flow definition only
- The flow definition is always loaded from the database
- Caller-supplied 'inputs.session' is namespaced under the (client_id,
  flow_id) virtual flow ID so an unauthenticated caller cannot address a
  session that lives outside its own namespace (CVE-2026-33017)

The endpoint:
1. Verifies the requested flow is marked as public in the database
2. Creates a deterministic UUID based on client_id and flow_id
3. Uses the flow owner's permissions to build the flow
4. Always loads the flow definition from the database

Requirements:
- The flow must be marked as PUBLIC in the database
- The request must include a client_id cookie

Args:
    flow_id: UUID of the public flow to build
    background_tasks: Background tasks manager
    inputs: Optional input values for the flow
    files: Optional files to include
    stop_component_id: Optional ID of component to stop at
    start_component_id: Optional ID of component to start from
    log_builds: Whether to log the build process
    flow_name: Optional name for the flow
    request: FastAPI request object (needed for cookie access)
    queue_service: Queue service for job management
    authenticated_user: Optional authenticated user (resolved from cookie/token if present)
    event_delivery: Optional event delivery type - default is streaming

Returns:
    Dict with job_id that can be used to poll for build status

## Path parameters

- `flow_id` string, uuid, required

## Query parameters

- `stop_component_id` string, nullable
- `start_component_id` string, nullable
- `log_builds` boolean, nullable
- `flow_name` string, nullable
- `event_delivery` 'streaming' | 'direct' | 'polling'

## Request body

- BodyBuildPublicTmpApiV1BuildPublicTmpFlowIdFlowPost
  - `files` string[], nullable
  - `inputs` InputValueRequest
    - `client_request_time` integer, nullable — Client-side timestamp in milliseconds when the request was initiated. Used to calculate accurate end-to-end duration.
    - `components` string[], nullable
    - `input_value` string, nullable
    - `session` string, nullable
    - `type` 'chat' | 'text' | 'any', nullable — Defines on which components the input value should be applied. 'any' applies to all input components.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-18** `e94ee92b7c9a` — 1 warning
  - removed the request property `data`
- **2026-03-12** `830c31118215` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2025-12-23** `b0ee9ddb8d9f` — 1 info
  - added the new optional request property `inputs/anyOf[subschema #1: InputValueRequest]/client_request_time`
- **2025-10-16** `9bd3e81318d7` — 3 warning, 1 info
  - removed the request property `inputs/anyOf[subschema #1: InputValueRequest]/client_request_time`
  - removed the optional property `detail/items/ctx` from the response with the `422` status
  - removed the optional property `detail/items/input` from the response with the `422` status
  - added the new optional request property `data`

[Change history](https://skmtc.dev/langflow-ai/apis/langflow/changes/api/v1/build_public_tmp/:flow_id/flow/post.md)

---

[API](https://skmtc.dev/langflow-ai/apis/langflow.md) · [All operations](https://skmtc.dev/langflow-ai/apis/langflow/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/langflow-ai/langflow/revisions/22962dc5e81b/schema)
