Tạo nội dung hoàn tất cuộc trò chuyện (truyền trực tuyến) [định dạng gốc]
API origin:
https://api.openaihub.net. Chọn đúng nhóm API và model. Thông số dưới đây là bản tham chiếu kỹ thuật; chưa phải kết quả kiểm thử từng endpoint bằng tài khoản của bạn.
OpenAPI Specification
Phần tiêu đề “OpenAPI Specification”openapi: 3.0.1info: title: '' description: '' version: 1.0.0paths: /v1/messages: post: summary: >- Tạo nội dung hoàn tất cuộc trò chuyện (truyền trực tuyến) [định dạng gốc] deprecated: false description: >- Điểm cuối trò chuyện văn bản MiniMax (đường dẫn xuất của Apifox là `/v1/messages`, không có tiền tố `/minimax/v1/`).
https://platform.minimaxi.com/docs/api-reference/text-post operationId: minimax_v1_messages tags: - OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Trò chuyện/Claude/Định dạng gốc - MiniMax parameters: [] requestBody: content: application/json: schema: type: object required: - model - messages properties: max_completion_tokens: type: integer description: Số lượng token hoàn thành tối đa messages: type: array items: type: object required: - role - name - content properties: content: type: string description: Nội dung tin nhắn hoặc yêu cầu name: type: string description: Tên role: type: string description: >- Vai trò của tin nhắn, ví dụ: system / user / assistant / model x-apifox-orders: - content - name - role x-apidog-orders: - content - name - role description: Danh sách các tin nhắn trong cuộc trò chuyện model: type: string description: Tên mô hình / mã định danh mô hình stream: type: boolean description: Có truyền phát phản hồi hay không stream_options: type: object required: - include_usage properties: include_usage: type: boolean description: Có bao gồm thông tin sử dụng ở cuối luồng hay không description: Tùy chọn truyền luồng x-apifox-orders: - include_usage x-apidog-orders: - include_usage temperature: type: number description: >- Nhiệt độ lấy mẫu; giá trị càng cao thì kết quả càng ngẫu nhiên top_p: type: number description: Ngưỡng xác suất lấy mẫu nucleus refName: PostV1MessagesRequest x-apifox-orders: - max_completion_tokens - messages - model - stream - stream_options - temperature - top_p x-apidog-orders: - max_completion_tokens - messages - model - stream - stream_options - temperature - top_p examples: minimax_m2_1: value: max_completion_tokens: 2048 messages: - content: Bạn là một trợ lý AI chuyên nghiệp và thân thiện. name: Trợ lý AI role: Vui lòng cung cấp tài liệu kỹ thuật cần dịch. x-i18n: en-US: name: AI assistant - content: Hãy giúp tôi viết một bài thơ về mùa thu. name: Trương Tam role: user x-i18n: en-US: name: John Doe model: MiniMax-M2.1 stream: true stream_options: include_usage: true temperature: 0.9 top_p: 0.95 summary: minimax_m2_1 description: tổng hợp văn bản responses: '200': description: '' content: application/json: schema: type: object required: - id - choices - created - model - object - usage - input_sensitive - output_sensitive - input_sensitive_type - output_sensitive_type - output_sensitive_int - base_resp properties: base_resp: type: object required: - status_code - status_msg properties: status_code: type: integer description: Mã trạng thái status_msg: type: string description: Thông báo trạng thái description: >- Trình bao phản hồi của dịch vụ nền (mã trạng thái / thông báo) x-apifox-orders: - status_code - status_msg x-apidog-orders: - status_code - status_msg choices: type: array items: type: object properties: finish_reason: type: string description: 'Lý do kết thúc, ví dụ: stop, length' index: type: integer description: Chỉ mục của mục ứng viên message: type: object required: - content - role - name - audio_content - reasoning_content properties: audio_content: type: string description: Nội dung âm thanh (thường ở dạng Base64) content: type: string description: Nội dung tin nhắn hoặc yêu cầu name: type: string description: Tên reasoning_content: type: string description: Văn bản về quá trình suy luận role: type: string description: >- Vai trò của tin nhắn, ví dụ: system / user / assistant / model description: Vui lòng cung cấp nội dung tài liệu cần dịch. x-apifox-orders: - audio_content - content - name - reasoning_content - role x-apidog-orders: - audio_content - content - name - reasoning_content - role x-apifox-orders: - finish_reason - index - message x-apidog-orders: - finish_reason - index - message description: Danh sách các kết quả ứng viên created: type: integer description: Thời gian tạo (dấu thời gian Unix) id: type: string description: ID tài nguyên hoặc tác vụ input_sensitive: type: boolean description: >- Liệu đầu vào có kích hoạt cơ chế phát hiện nội dung nhạy cảm hay không input_sensitive_type: type: integer description: Loại nội dung nhạy cảm đầu vào model: type: string description: Tên mô hình / mã định danh mô hình object: type: string description: 'Định danh kiểu đối tượng, ví dụ: chat.completion' output_sensitive: type: boolean description: >- Liệu đầu ra có kích hoạt cơ chế phát hiện nội dung nhạy cảm hay không output_sensitive_int: type: integer description: Mức độ nội dung nhạy cảm của đầu ra output_sensitive_type: type: integer description: Loại nội dung nhạy cảm trong đầu ra usage: type: object required: - total_tokens - total_characters - prompt_tokens - completion_tokens - completion_tokens_details properties: completion_tokens: type: integer description: Số lượng token hoàn thành completion_tokens_details: type: object required: - reasoning_tokens properties: reasoning_tokens: type: integer description: Số token được sử dụng trong quá trình suy luận description: Phân tích chi tiết số token hoàn thành x-apifox-orders: - reasoning_tokens x-apidog-orders: - reasoning_tokens prompt_tokens: type: integer description: Số lượng token trong lời nhắc total_characters: type: integer description: Tổng số ký tự total_tokens: type: integer description: Tổng số token description: Thống kê mức sử dụng token x-apifox-orders: - completion_tokens - completion_tokens_details - prompt_tokens - total_characters - total_tokens x-apidog-orders: - completion_tokens - completion_tokens_details - prompt_tokens - total_characters - total_tokens refName: PostV1MessagesResponse x-apifox-orders: - base_resp - choices - created - id - input_sensitive - input_sensitive_type - model - object - output_sensitive - output_sensitive_int - output_sensitive_type - usage x-apidog-orders: - base_resp - choices - created - id - input_sensitive - input_sensitive_type - model - object - output_sensitive - output_sensitive_int - output_sensitive_type - usage examples: example: summary: example value: base_resp: status_code: 0 status_msg: '' choices: - finish_reason: dừng index: 0 message: audio_content: '' content: Xin chào! Tôi có thể giúp gì cho bạn? name: MiniMax AI reasoning_content: ...đã lược bỏ role: >- Vui lòng cung cấp nội dung tài liệu kỹ thuật cần dịch. created: 1755153113 id: 04ecb5d9b1921ae0fb0e8da9017a5474 input_sensitive: false input_sensitive_type: 0 model: MiniMax-M1 object: chat.completion output_sensitive: false output_sensitive_int: 0 output_sensitive_type: 0 usage: completion_tokens: 223 completion_tokens_details: reasoning_tokens: 214 prompt_tokens: 26 total_characters: 0 total_tokens: 249 headers: {} x-apidog-name: '' '400': description: Yêu cầu không hợp lệ hoặc xác thực thất bại content: application/json: schema: type: object required: - error properties: error: type: object required: - message - type properties: message: type: string description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu) type: type: string description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error examples: - new_api_error x-apifox-orders: - message - type x-apidog-orders: - message - type refName: NewApiError x-apifox-orders: - error x-apidog-orders: - error examples: example: summary: example value: error: message: >- Yêu cầu không hợp lệ (mã yêu cầu: 20260805120000123456789AbCdEfGh) type: new_api_error headers: {} x-apidog-name: Yêu cầu không hợp lệ hoặc xác thực thất bại '401': description: Khóa API bị thiếu hoặc không hợp lệ content: application/json: schema: type: object required: - error properties: error: type: object required: - message - type properties: message: type: string description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu) type: type: string description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error examples: - new_api_error x-apifox-orders: - message - type x-apidog-orders: - message - type refName: NewApiError x-apifox-orders: - error x-apidog-orders: - error examples: example: summary: example value: error: message: >- Mã thông báo không hợp lệ (request id: 20260805120000123456789AbCdEfGh) type: new_api_error headers: {} x-apidog-name: Khóa API bị thiếu hoặc không hợp lệ security: [] x-apidog-folder: OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Trò chuyện/Claude/Định dạng gốc x-apidog-status: released x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45208832-runcomponents: schemas: {} securitySchemes: {}servers: - url: https://api.openaihub.net description: Prod Envsecurity: []