---
title: "Chat"
method: POST
path: "/v1/llm/chat"
tags: ["LLM"]
---

# Chat

`POST /v1/llm/chat`

## Request

- Base URL: `https://api.call2me.app`
- URL: `https://api.call2me.app/v1/llm/chat`
- Auth: HTTP bearer

Chat with LLM (OpenAI) with optional RAG.

## Request body

- ChatRequest
  - `messages` ChatMessageInput[], required
    - `role` string, required
    - `content` string, required
  - `model` string, nullable
  - `temperature` number
  - `max_tokens` integer
  - `functions` FunctionDef[], nullable
    - `name` string, required
    - `description` string, required
    - `parameters` object, required
  - `agent_id` string, nullable: Agent ID for RAG context

## Response `200`

Successful Response

- ChatResponse
  - `content` string, required
  - `provider` string, required
  - `model` string, required
  - `function_call` object, nullable
  - `usage` object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/call2me/apis/call2me-api.md) · [All operations](https://skmtc.dev/call2me/apis/call2me-api/llms.txt) · [OpenAPI document](https://skmtc.dev/call2me/apis/call2me-api/revisions/3951f9b7e47d?raw)
