---
title: "Chat with agent (blocking)"
method: POST
path: "/api/v1/agent/chat"
---

# Chat with agent (blocking)

`POST /api/v1/agent/chat`

## Request

- Base URL: `http://:8080`
- URL: `http://:8080/api/v1/agent/chat`
- Auth: none declared

Chat with agent (blocking).

Auth: Required (bearer token).
Scope: Organization-scoped in authenticated context.
Side effects: May mutate server state.

## Headers

- `Accept` string

## Request body `*/*`

- ChatRequest: ChatRequest schema
  - `input` string
  - `model` string, nullable
  - `thread_id` string, uuid, nullable

## Response `200`

OK

- ChatResponse: ChatResponse schema
  - `balance_cents` integer, nullable
  - `response` string
  - `thread_id` string, uuid
  - `usage` object, nullable
    - `completion_tokens` integer
    - `prompt_tokens` integer
    - `total_tokens` integer

## Other responses

- `400`: Bad Request _(validation or deserialization error)_
- `500`: Internal Server Error _(panics)_
- `default`

## Changes

- **2026-05-07** `c5bacaea7239`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nixopus/apis/nixopus-api/changes/api/v1/agent/chat/post.md)

---

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