---
title: "Chat"
method: POST
path: "/api/v1/pipelines/{pipeline_id}/chat"
tags: ["Pipelines"]
---

# Chat

`POST /api/v1/pipelines/{pipeline_id}/chat`

Chat with a managed pipeline using RAG.

Combines retrieval from the pipeline's vector store with an
LLM chat completion. Returns a streaming response.

## Path parameters

- `pipeline_id` string, uuid, required

## Cookies

- `session` string, nullable

## Request body

- ChatInputParams
  - `messages` InputMessage[]
    - `id` string, uuid — ID of the message, if any. a UUID.
    - `role` 'system' | 'developer' | 'user' | 'assistant' | 'function' | 'tool' | 'chatbot' | 'model', required — Message role.
    - `content` string, required
    - `data` object, nullable — Additional data to be stored with the message.
    - `class_name` string
  - `data` ChatData
    - `retrieval_parameters` PresetRetrievalParams — Schema for the search params for an retrieval execution that can be preset for a pipeline.
      - `dense_similarity_top_k` integer, nullable — Number of nodes for dense retrieval.
      - `dense_similarity_cutoff` number, nullable — Minimum similarity score wrt query for retrieval
      - `sparse_similarity_top_k` integer, nullable — Number of nodes for sparse retrieval.
      - `enable_reranking` boolean, nullable — Enable reranking for retrieval
      - `rerank_top_n` integer, nullable — Number of reranked nodes for returning.
      - `alpha` number, nullable — Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.
      - `search_filters` MetadataFilters — Metadata filters for vector stores.
        - `filters` union[], required
          - union
            - MetadataFilter — Comprehensive metadata filter for vector stores to support more operators. Value uses Strict types, as int, float and str are compatible types and were all converted to string before. See: https://docs.pydantic.dev/latest/usage/types/#strict-types
              - …
            - MetadataFilters — recursive
        - `condition` 'and' | 'or' | 'not' — Vector store filter conditions to combine different filters.
      - `search_filters_inference_schema` object, nullable — JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.
      - `files_top_k` integer, nullable — Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).
      - `retrieval_mode` 'chunks' | 'files_via_metadata' | 'files_via_content' | 'auto_routed'
      - `retrieve_image_nodes` boolean — Whether to retrieve image nodes.
      - `retrieve_page_screenshot_nodes` boolean — Whether to retrieve page screenshot nodes.
      - `retrieve_page_figure_nodes` boolean — Whether to retrieve page figure nodes.
      - `class_name` string
    - `llm_parameters` LLMParameters
      - `model_name` 'GPT_4O' | 'GPT_4O_MINI' | 'GPT_4_1' | 'GPT_4_1_NANO' | 'GPT_4_1_MINI' | 'AZURE_OPENAI_GPT_4O' | 'AZURE_OPENAI_GPT_4O_MINI' | 'AZURE_OPENAI_GPT_4_1' | 'AZURE_OPENAI_GPT_4_1_MINI' | 'AZURE_OPENAI_GPT_4_1_NANO' | 'CLAUDE_4_5_SONNET' | 'BEDROCK_CLAUDE_3_5_SONNET_V1' | 'BEDROCK_CLAUDE_3_5_SONNET_V2'
      - `system_prompt` string, nullable — The system prompt to use for the completion.
      - `temperature` number, nullable — The temperature value for the model.
      - `use_chain_of_thought_reasoning` boolean, nullable — Whether to use chain of thought reasoning.
      - `use_citation` boolean, nullable — Whether to show citations in the response.
      - `class_name` string
    - `class_name` string
  - `class_name` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-06-09** `614771991b52` — 2 warning
  - 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
- **2026-06-09** `b17341164de9` — 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
- **2026-04-29** `beb65a9b42eb` — 1 info
  - the `model_name` request property default value changed from `GPT_4O_MINI` to `GPT_4_1_MINI`
- **2026-04-29** `456551b43e3e` — 1 info
  - the `model_name` request property default value changed from `GPT_4_1_MINI` to `GPT_4O_MINI`
- **2026-04-24** `1bbc901f8c0d` — 1 info
  - the `model_name` request property default value changed from `GPT_4O_MINI` to `GPT_4_1_MINI`

[Change history](https://skmtc.dev/run-llama/apis/llama-platform/changes/api/v1/pipelines/:pipeline_id/chat/post.md)

---

[API](https://skmtc.dev/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.dev/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/run-llama/apis/llama-platform/revisions/614771991b52?raw)
