---
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

---

[API](https://skmtc.net/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.net/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/run-llama/llama-platform/revisions/b17341164de9/schema)
