---
title: "【目前还未完成】返回与指定 Agent 聊天的下一条消息"
method: POST
path: "/api/v2/chat/completions/{agent_id}"
tags: ["chat", "NOT_USED"]
deprecated: true
---

# 【目前还未完成】返回与指定 Agent 聊天的下一条消息

`POST /api/v2/chat/completions/{agent_id}`

> **Deprecated.**

可以处理包括图片在内的各种消息类型，媒体类型应该先上传，然后将 URL 作为索引发送到此 API

## Path parameters

- `agent_id` string, required

## Request body

- ChatCompletionRequest
  - `messages` ChatMessage[], required
    - `role` string, required
    - `content` string, required
  - `stream` boolean
  - `model` string
  - `language` string
  - `request_id` string, nullable
  - `message_id` string, nullable

## Response `200`

Successful Response

- APIResponse
  - `code` integer
  - `message` string
  - `data` unknown

## Other responses

- `422` — Validation Error

## Changes

- **2025-12-01** `6c3239768e6b` — 1 info
  - added the new optional request property `message_id`
- **2025-11-30** `64a35ff6429d` — 1 info
  - api tag `NOT_USED` added
- **2025-11-25** `05cf5f034c74` — 2 info
  - added `subschema #1` to the `data` response property `anyOf` list for the response status `200`
  - removed `#/components/schemas/ChatCompletionResponse` from the `data` response property `anyOf` list for the response status `200`
- **2025-10-21** `0ee1ca2e37cb` — 1 info
  - endpoint deprecated
- **2025-10-14** `89127d31b5fa` — 2 breaking
  - response property `data/anyOf[subschema #1: ChatCompletionResponse]/choices/items/message/id` list-of-types was widened by adding types `integer` to media type `application/json` of response `200`
  - the `data/anyOf[subschema #1: ChatCompletionResponse]/choices/items/message/id/anyOf[subschema #1]/` response's property type changed from `string` to `integer` for status `200`

[Full history](https://skmtc.dev/nascentcore/apis/inty-backend/changes/api/v2/chat/completions/:agent_id/post.md)

---

[API](https://skmtc.dev/nascentcore/apis/inty-backend.md) · [All operations](https://skmtc.dev/nascentcore/apis/inty-backend/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nascentcore/inty-backend/revisions/1e014c365df2/schema)
