Skip to main content

Create Response

Create a response using OpenAI Responses API format.

This endpoint accepts a flow_id in the model parameter and processes the input through the specified Langflow flow.

Args: request: OpenAI Responses API request with model (flow_id) and input background_tasks: FastAPI background task manager api_key_user: Authenticated user from API key http_request: The incoming HTTP request telemetry_service: Telemetry service for logging

Returns: OpenAI-compatible response or streaming response

Raises: HTTPException: For validation errors or flow execution issues

Request Body REQUIRED
model Model REQUIRED

The flow ID to execute (used instead of OpenAI model)

input Input REQUIRED

The input text to process

stream Stream

Whether to stream the response

background Background

Whether to process in background

tools Tools

Tools are not supported yet

previous_response_id Previous Response Id

ID of previous response to continue conversation

include Include

Additional response data to include, e.g., ['tool_call.results']

Responses
200

Successful Response

Schema OPTIONAL
undefined
422

Validation Error

Schema OPTIONAL
detail object[] OPTIONAL
loc undefined[]
msg Message
type Error Type
Search