langflow-ai/langflow · error · HTTPException

The /task endpoint is deprecated and will be removed in a fu

Error message

The /task endpoint is deprecated and will be removed in a future version. Please use /run instead.

What it means

Error "The /task endpoint is deprecated and will be removed in a future version. Please use /run instead." thrown in langflow-ai/langflow.

Source

Thrown at src/backend/base/langflow/api/v1/endpoints.py:1266

async def process(_flow_id) -> None:
    """Endpoint to process an input with a given flow_id."""
    # Raise a depreciation warning
    await logger.awarning(
        "The /process endpoint is deprecated and will be removed in a future version. Please use /run instead."
    )
    raise HTTPException(
        status_code=status.HTTP_400_BAD_REQUEST,
        detail="The /process endpoint is deprecated and will be removed in a future version. Please use /run instead.",
    )


@router.get("/task/{_task_id}", deprecated=True, include_in_schema=False)
async def get_task_status(_task_id: str) -> TaskStatusResponse:
    """Get the status of a task by ID (Deprecated).

    This endpoint is deprecated and will be removed in a future version.
    """
    raise HTTPException(
        status_code=status.HTTP_400_BAD_REQUEST,
        detail="The /task endpoint is deprecated and will be removed in a future version. Please use /run instead.",
    )


@router.post(
    "/upload/{flow_id}",
    status_code=HTTPStatus.CREATED,
    deprecated=True,
    include_in_schema=False,
)
async def create_upload_file(
    file: UploadFile,
    flow: Annotated[Flow, Depends(get_flow)],
    current_user: CurrentActiveUser,
    settings_service: Annotated[SettingsService, Depends(get_settings_service)],
) -> UploadFileResponse:
    """Upload a file for a specific flow (Deprecated).

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Migrate the client to call /run instead of /task.

When it happens

Trigger: Occurs when a client calls the deprecated /task endpoint instead of /run; returned as a deprecation warning/error.

Common situations: See trigger scenarios.


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/d209a4602da7843e. Report an issue: GitHub.