giao diện tạo hình ảnh gemini [định dạng tương thích với trò chuyện]
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/chat/completions: post: summary: giao diện tạo hình ảnh gemini [định dạng tương thích với trò chuyện] deprecated: false description: >- Cổng tương thích OpenAI hợp nhất. Chọn nguồn thượng nguồn thông qua `model`, ví dụ:
- `gpt-4o` / `gpt-4o-audio-preview` → OpenAI
- `gemini-2.5-flash-all` → Google Gemini (định dạng tương thích)
- Với các mô hình khác, xem `GET /v1/models`
Tài liệu chính thức của OpenAI: https://platform.openai.com/docs/api-reference/chat/create
Định dạng tên mô hình là: gpt-4-gizmo-*, và hệ thống sẽ tự động nhận dạng.
Ví dụ, GPTs này: https://chatgpt.com/g/g-B3hgivKK9-write-for-me
Khi đó, tên mô hình của nó phải được điền là: gpt-4-gizmo-g-B3hgivKK9
Danh sách GPTs: https://chatgpt.com/gpts operationId: v1_chat_completions tags: - >- OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Trò chuyện/Gemini/Định dạng tương thích với trò chuyện - Trò chuyện parameters: [] requestBody: content: application/json: schema: type: object required: - model - messages properties: enable_thinking: type: boolean description: >- Có bật chế độ suy luận hay không (phần mở rộng của kho này). Chỉ giá trị Boolean `true` mới có hiệu lực; hãy chọn một trong các giá trị của `extra_body.enable_thinking`. extra_body: type: object properties: enable_thinking: type: boolean description: >- Bật chế độ suy luận trong `extra_body`; chỉ chấp nhận giá trị `true`. google: type: object description: >- Các phần mở rộng hộp thoại Gemini như thinking_config, response_modalities. x-apidog-orders: [] description: >- Các tham số mở rộng cho hội thoại. Thường dùng: enable_thinking; một số mô hình Gemini có thể dùng google.thinking_config, vân vân. Việc tham số có hiệu lực hay không phụ thuộc vào kênh và mô hình. x-apifox-orders: - enable_thinking - google x-apidog-orders: - enable_thinking - google frequency_penalty: type: number description: >- Hệ số phạt tần suất, khoảng -2~2. Giá trị dương làm giảm xác suất lặp lại cùng một từ. logit_bias: type: object description: >- Điều chỉnh xác suất xuất hiện theo ID token, và giá trị là một đối tượng ánh xạ với các giá trị nằm trong khoảng từ -100 đến 100. x-apidog-orders: [] max_completion_tokens: type: integer description: >- Giới hạn token tối đa cho phần hoàn thành (thường được dùng hơn trong các mô hình suy luận như dòng o và GPT-5). `max_tokens` có thể được kế thừa khi không được thiết lập. max_tokens: type: integer description: >- Số lượng token tối đa được tạo trong phản hồi này (các trường dùng chung). messages: type: array items: type: object required: - role - content properties: content: oneOf: - type: string - type: array items: type: object required: - type properties: image_url: type: object required: - url properties: detail: type: string enum: - auto - low - high description: >- Độ chính xác khi hiểu hình ảnh: tự động/thấp/cao. url: type: string description: >- URL hình ảnh hoặc data:image/...;base64,... . description: >- Hình ảnh khi type=image_url. Nếu cổng kết nối bật proxy hình ảnh, url có thể bị thay thế. x-apifox-orders: - detail - url x-apidog-orders: - detail - url text: type: string description: Nội dung văn bản khi type=text. type: type: string enum: - text - image_url description: >- Loại khối nội dung: `text` là văn bản, `image_url` là hình ảnh. refName: Phần nội dung x-apifox-orders: - image_url - text - type x-apidog-orders: - image_url - text - type description: >- Nội dung tin nhắn: văn bản thuần túy hoặc mảng kết hợp hình ảnh và văn bản (xem ContentPart). name: type: string description: >- Tùy chọn. Phân biệt tên người nói trong các tình huống có nhiều người dùng. reasoning_content: type: string description: >- Văn bản về quá trình suy luận/tư duy (được dùng khi suy luận về các mô hình và tiếp nối ngữ cảnh). role: type: string enum: - system - user - assistant - tool - developer description: >- Vai trò của thông điệp. system: cài đặt hệ thống; user: người dùng; assistant: mô hình; tool: kết quả trả về của công cụ. tool_call_id: type: string description: >- Bắt buộc khi role là tool, tương ứng với tool_calls[].id của nội dung được trả về tại một thời điểm nhất định. tool_calls: type: array items: type: object properties: function: type: object properties: arguments: type: string description: Các tham số dưới dạng chuỗi JSON. name: type: string description: Tên description: Định nghĩa hoặc kết quả của lời gọi hàm x-apifox-orders: - arguments - name x-apidog-orders: - arguments - name id: type: string description: >- Mã định danh lời gọi, thông điệp của công cụ cần tương ứng với tool_call_id. type: type: string enum: - function description: Kiểu x-apifox-orders: - function - id - type x-apidog-orders: - function - id - type description: >- Một danh sách các yêu cầu gọi công cụ (do mô hình khởi tạo) trong thông điệp của trợ lý. refName: Thông điệp x-apifox-orders: - content - name - reasoning_content - role - tool_call_id - tool_calls x-apidog-orders: - content - name - reasoning_content - role - tool_call_id - tool_calls description: >- Danh sách các tin nhắn trong cuộc hội thoại, ít nhất một tin nhắn. Hỗ trợ nhiều lượt: system/user/assistant/tool. model: type: string description: >- ID mô hình cần sử dụng. Cổng sẽ chọn các kênh bằng cách nhóm mã thông báo và có thể thực hiện ánh xạ tên mô hình hoặc phân giải hậu tố (chẳng hạn như -thinking, -search). 'n': type: integer description: >- Dịch tài liệu kỹ thuật này sang tiếng Việt. Giữ nguyên Markdown, mã nguồn, định danh, URL, đường dẫn, phần giữ chỗ, cấu trúc JSON và định dạng. Chỉ trả về văn bản đã dịch và không để lại ký tự Hán nào.
Tạo một số phương án trả lời của trợ lý cho cùng một lượt đầu vào. parallel_tool_calls: type: boolean description: >- Có cho phép thực hiện nhiều lệnh gọi công cụ song song trong một phản hồi hay không (khi hệ thống đầu nguồn hỗ trợ). presence_penalty: type: number description: >- Có một hệ số phạt, khoảng -2~2. Giá trị dương làm giảm sự lặp lại của các biểu thức chủ đề đã xuất hiện. reasoning_effort: type: string description: >- Mức độ mạnh của mô hình suy luận (chẳng hạn như thấp / trung bình / cao). Giá trị này cũng có thể được cổng kết nối tự động chèn thông qua hậu tố của tên mô hình. response_format: type: object properties: json_schema: type: object description: Định nghĩa cấu trúc đầu ra khi type=json_schema. x-apidog-orders: [] type: type: string enum: - text - json_object - json_schema description: >- text: văn bản thông thường; json_object: đối tượng JSON; json_schema: đầu ra có cấu trúc theo schema. refName: ResponseFormat x-apifox-orders: - json_schema - type x-apidog-orders: - json_schema - type seed: type: number description: >- Hạt giống ngẫu nhiên, dùng để cố gắng thu được kết quả có thể tái tạo với cùng các tham số (không đảm bảo tính nhất quán hoàn toàn). Lưu ý rằng trường này có tên là seed. stop: oneOf: - type: string - type: array items: type: string description: >- Dừng việc tạo nội dung khi gặp các chuỗi này. Có thể là một chuỗi đơn hoặc một mảng chuỗi (tối đa 4 chuỗi). stream: type: boolean description: >- Có truyền phát đầu ra hay không. false: Trả về toàn bộ JSON trong một lần; true: Đẩy tăng dần qua SSE, kết thúc bằng data: [DONE]. stream_options: type: object properties: include_usage: type: boolean description: >- Liệu mức sử dụng (token prompt/completion) có được bao gồm ở cuối luồng hay không. refName: StreamOptions x-apifox-orders: - include_usage x-apidog-orders: - include_usage temperature: type: number description: >- Nhiệt độ lấy mẫu, thường nằm trong khoảng 0~2. Giá trị càng cao, phản hồi càng ngẫu nhiên; giá trị càng thấp, phản hồi càng ổn định. Thông thường, chỉ điều chỉnh một trong hai tham số này cùng với top_p. tool_choice: oneOf: - type: string enum: - none - auto - required - type: object properties: function: type: object required: - name properties: name: type: string description: Tên hàm bắt buộc phải được gọi. description: Định nghĩa hoặc kết quả của lời gọi hàm x-apifox-orders: - name x-apidog-orders: - name type: type: string x-apifox-orders: - function - type x-apidog-orders: - function - type description: >- Dịch tài liệu kỹ thuật này sang tiếng Việt. Giữ nguyên Markdown, mã, định danh, URL, đường dẫn, phần giữ chỗ, cấu trúc JSON và định dạng. Chỉ trả về văn bản đã dịch và không để lại ký tự Hán nào.
Kiểm soát việc có gọi công cụ hay không: none (không gọi), auto (tự động), required (bắt buộc phải gọi), hoặc chỉ định một hàm. tools: type: array items: type: object required: - type - function properties: function: type: object required: - name properties: description: type: string description: >- Phần mô tả chức năng giúp mô hình quyết định thời điểm gọi chức năng đó. name: type: string description: Tên hàm mà mô hình dùng để khởi tạo lệnh gọi. parameters: type: object description: Lược đồ JSON của các tham số hàm. x-apidog-orders: [] description: Định nghĩa hoặc kết quả của lời gọi hàm x-apifox-orders: - description - name - parameters x-apidog-orders: - description - name - parameters type: type: string enum: - function description: Đã sửa thành hàm. refName: Vui lòng cung cấp nội dung tài liệu kỹ thuật cần dịch. x-apifox-orders: - function - type x-apidog-orders: - function - type description: >- Danh sách các công cụ (hàm) mà mô hình có thể gọi, được dùng để gọi hàm trong các cuộc hội thoại. top_p: type: number description: >- Lấy mẫu hạt nhân, 0~1. Chỉ lấy mẫu các token có xác suất tích lũy đạt đến top_p. user: type: string description: >- Mã định danh duy nhất của người dùng cuối giúp phát hiện hành vi lạm dụng và thống kê ở phía nền tảng. web_search_options: type: object properties: search_context_size: type: string enum: - high - medium - low description: >- Kích thước ngữ cảnh tìm kiếm trên Internet; nếu không được truyền, cổng mặc định sử dụng mức trung bình. user_location: type: object description: >- Vị trí địa lý của người dùng, v.v., được sử dụng cho kết quả tìm kiếm đã bản địa hóa (cấu trúc phụ thuộc vào nguồn cung cấp phía trên). x-apidog-orders: [] refName: WebSearchOptions x-apifox-orders: - search_context_size - user_location x-apidog-orders: - search_context_size - user_location refName: V1ChatCompletionsRequest description: >- Chỉ áp dụng cho các tình huống hội thoại nhiều lượt, tương ứng với các trường liên quan đến hội thoại của dto.GeneralOpenAIRequest. Bắt buộc: model, messages (không được để trống). Xác thực: Authorization: Bearer {API Key}. x-apifox-orders: - enable_thinking - extra_body - frequency_penalty - logit_bias - max_completion_tokens - max_tokens - messages - model - 'n' - parallel_tool_calls - presence_penalty - reasoning_effort - response_format - seed - stop - stream - stream_options - temperature - tool_choice - tools - top_p - user - web_search_options x-apidog-orders: - enable_thinking - extra_body - frequency_penalty - logit_bias - max_completion_tokens - max_tokens - messages - model - 'n' - parallel_tool_calls - presence_penalty - reasoning_effort - response_format - seed - stop - stream - stream_options - temperature - tool_choice - tools - top_p - user - web_search_options examples: deepseek_chat: value: extra_body: enable_thinking: true messages: - content: >- Có ba chiếc hộp, chỉ một hộp có phần thưởng. Bạn chọn hộp số 2, người dẫn chương trình mở hộp số 3 (trống), rồi hỏi bạn có muốn đổi sang hộp số 1 không? Hãy phân tích và đưa ra lời khuyên. role: user model: deepseek-chat stream: true stream_options: include_usage: true summary: deepseek_chat description: >- Khuyến nghị nâng cao: Hội thoại suy luận DeepSeek (truyền phát) · stream + extra_body.enable_thinking deepseek_ocr: value: messages: - content: - text: >- Hãy nhận dạng toàn bộ văn bản trong hình ảnh và xuất theo đúng thứ tự của bản gốc, không giải thích. type: text - image_url: detail: cao url: https://example.com/document-scan.png type: image_url role: user model: deepseek-ocr stream: false summary: deepseek_ocr description: >- Khuyến nghị nâng cao: DeepSeek-OCR để nhận dạng văn bản · image_url + từ khóa nhắc nhận dạng hình ảnh gemini_multimodal: value: messages: - content: - text: Trong bức ảnh này có gì? Vui lòng mô tả chi tiết. type: text - image_url: url: >- https://lsky.zhongzhuan.chat/i/2024/10/17/6711068a14527.png type: image_url role: user model: gemini-2.5-flash-all stream: true temperature: 0.5 top_p: 1 summary: gemini_multimodal description: Gemini đa phương thức (khả năng hiểu hình ảnh) gpt4o_audio: value: audio: format: wav voice: hợp kim messages: - content: >- Chó golden retriever có phải là giống chó phù hợp với gia đình không? role: user modalities: - văn bản - âm thanh model: gpt-4o-audio-preview summary: gpt4o_audio description: Đầu ra âm thanh của GPT-4o gpt_4_gizmo_g_2fkfe8rbu: value: messages: - content: Bạn là ai? role: user model: gpt-4-gizmo-g-2fkFE8rbu stream: false summary: gpt_4_gizmo_g_2fkfe8rbu description: Đối thoại GPTs gpt_4o: value: messages: - content: Bạn là một cô gái mèo luôn sẵn lòng giúp đỡ mọi người. role: Vui lòng cung cấp tài liệu kỹ thuật cần dịch. - content: Hãy giúp tôi tóm tắt HTTP là gì. role: user model: gpt-4o summary: gpt_4o description: >- Khuyến nghị cho người mới bắt đầu: hội thoại cơ bản (không truyền phát) gpt_4o_10: value: messages: - content: - text: Tóm tắt nội dung hình ảnh và trả lời theo từng ý. type: text - image_url: detail: cao url: https://example.com/demo.jpg type: image_url role: user model: gpt-4o stream: false summary: gpt_4o_10 description: >- Đề xuất nâng cao: Hình ảnh hội thoại (không truyền phát) · extra_body.google.response_modalities + image_config gpt_4o_11: value: max_tokens: 256 messages: - content: Giới thiệu API gateway là gì trong một câu. role: user model: gpt-4o 'n': 2 temperature: 0.8 summary: gpt_4o_11 description: 'Khuyến nghị nâng cao: nhiều phản hồi ứng viên · n' gpt_4o_12: value: functions: - description: Tra cứu thời tiết thành phố name: get_weather parameters: properties: city: description: Tên thành phố type: string x-i18n: en-US: description: tên thành phố required: - city type: object x-i18n: en-US: description: Kiểm tra thời tiết thành phố messages: - content: Thời tiết ở Bắc Kinh hiện giờ thế nào? role: user model: gpt-4o tool_choice: tự động summary: gpt_4o_12 description: >- Khuyến nghị nâng cao: Gọi hàm (phiên bản cũ) · functions + tool_choice gpt_4o_2: value: messages: - content: >- Hãy dùng 3 câu để giải thích token là gì và đưa ra một ví dụ. role: user model: gpt-4o stream: true stream_options: include_usage: true summary: gpt_4o_2 description: >- Khuyến nghị cho người mới: Hội thoại truyền phát · stream + stream_options.include_usage gpt_4o_3: value: messages: - content: >- Viết một đoạn nội dung quảng bá sản phẩm không quá 200 chữ; khi gặp STOP thì dừng lại. role: user model: gpt-4o stop: - Vui lòng cung cấp nội dung tài liệu kỹ thuật cần dịch. - DỪNG LẠI temperature: 0.4 top_p: 0.9 summary: gpt_4o_3 description: >- Khuyến nghị nâng cao: Kiểm soát lấy mẫu: temperature + top_p + stop gpt_4o_4: value: messages: - content: Thời tiết ở Bắc Kinh hôm nay thế nào? role: user model: gpt-4o tool_choice: tự động tools: - function: description: Lấy thông tin thời tiết của thành phố được chỉ định name: get_weather parameters: properties: city: description: Tên thành phố type: string x-i18n: en-US: description: tên thành phố required: - city type: object x-i18n: en-US: description: >- Lấy thông tin thời tiết cho một thành phố được chỉ định type: function summary: gpt_4o_4 description: 'Khuyến nghị nâng cao: gọi công cụ (tools + tool_choice)' gpt_4o_5: value: messages: - content: >- {"title":"Cách viết tài liệu API","bullets":["Mô tả mục đích, phạm vi và đối tượng sử dụng của API.","Liệt kê URL, phương thức HTTP, tiêu đề yêu cầu và cơ chế xác thực.","Giải thích rõ tham số đường dẫn, tham số truy vấn và nội dung yêu cầu, bao gồm kiểu dữ liệu, điều kiện bắt buộc và giá trị mẫu.","Cung cấp ví dụ yêu cầu và phản hồi, đồng thời giữ nguyên định dạng JSON.","Ghi rõ mã trạng thái HTTP, mã lỗi, thông báo lỗi và cách xử lý.","Nêu quy tắc phân trang, giới hạn tần suất, phiên bản API và lịch sử thay đổi."]} role: user model: gpt-4o response_format: type: json_object summary: gpt_4o_5 description: >- Khuyến nghị nâng cao: Bắt buộc đầu ra có cấu trúc (response_format) gpt_4o_6: value: messages: - content: - text: >- Trong bức ảnh này có gì? Vui lòng mô tả bằng tiếng Trung và đưa ra những bối cảnh có thể xảy ra. type: text - image_url: detail: cao url: https://example.com/image.jpg type: image_url role: user model: gpt-4o summary: gpt_4o_6 description: >- Khuyến nghị nâng cao: Ví dụ đa phương thức: messages.content với hình ảnh (image_url gpt_4o_7: value: messages: - content: >- Gần đây có những bài viết chất lượng cao nào về tác nhân AI? Hãy cung cấp cho tôi 3 bài và mô tả ngắn gọn. role: user model: gpt-4o web_search_options: search_context_size: trung bình summary: gpt_4o_7 description: >- Khuyến nghị nâng cao: Các tùy chọn mạng/tìm kiếm (web_search_options) gpt_4o_8: value: messages: - content: - text: Hãy mô tả bức ảnh này bằng tiếng Trung. type: text - image_url: detail: cao url: https://example.com/demo.jpg type: image_url role: user model: gpt-4o stream: true summary: gpt_4o_8 description: >- Đề xuất nâng cao: Hội thoại bằng hình ảnh và văn bản (truyền liên tục) · stream + image_url.url gpt_4o_9: value: messages: - content: - text: Chữ trong hình là gì? type: text - image_url: detail: tự động url: >- data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg== type: image_url role: user model: gpt-4o stream: true summary: gpt_4o_9 description: >- Khuyến nghị nâng cao: Đối thoại bằng hình ảnh và văn bản (truyền phát) · stream + image_url (base64) o3_mini: value: max_completion_tokens: 2000 messages: - content: >- Chứng minh: Nếu n là số lẻ thì n² cũng là số lẻ. Hãy suy luận từng bước. role: user model: o3-mini reasoning_effort: cao summary: o3_mini description: >- Khuyến nghị nâng cao: Kiểm soát mức độ nỗ lực của mô hình suy luận (reasoning_effort) qwen_max: value: extra_body: enable_thinking: true messages: - content: >- Tính toán: Nếu một hệ thống xử lý 120 yêu cầu mỗi giây, thì trong 5 phút hệ thống đó có thể xử lý bao nhiêu yêu cầu? Hãy trình bày quá trình tính.
5 phút = 5 × 60 = 300 giây
Tổng số yêu cầu có thể xử lý = 120 × 300 = 36.000 yêu cầu
Đáp án: Hệ thống có thể xử lý 36.000 yêu cầu trong 5 phút. role: user model: qwen-max summary: qwen_max description: >- Khuyến nghị nâng cao: sử dụng chế độ suy luận (`enable_thinking` / `extra_body.enable_thinking`) qwen_mt_turbo: value: messages: - content: >- Vui lòng dịch đoạn tiếng Anh dưới đây sang tiếng Trung giản thể, chỉ xuất bản dịch:
Xin chào, chào mừng bạn đến với nền tảng API của chúng tôi. role: user model: qwen-mt-turbo stream: false summary: qwen_mt_turbo description: 'Đề xuất nâng cao: dịch máy · model(qwen-mt) + messages' responses: '200': description: '' content: application/json: schema: type: object required: - id - object - created - model - choices - usage - system_fingerprint - service_tier properties: 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 logprobs: type: string description: Thông tin xác suất lôgarit (nếu được bật) nullable: true message: type: object required: - role - content - refusal - annotations properties: annotations: type: array items: type: string description: Chú thích / thông tin trích dẫn content: type: string description: Nội dung tin nhắn hoặc yêu cầu refusal: type: string description: Nội dung từ chối (nếu có) nullable: true 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: - annotations - content - refusal - role x-apidog-orders: - annotations - content - refusal - role x-apifox-orders: - finish_reason - index - logprobs - message x-apidog-orders: - finish_reason - index - logprobs - 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ụ 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' service_tier: type: string description: Cấp dịch vụ / mức ưu tiên system_fingerprint: type: string description: Dấu vân tay cấu hình phía máy chủ usage: type: object required: - prompt_tokens - completion_tokens - total_tokens - prompt_tokens_details - completion_tokens_details - latency_checkpoint properties: completion_tokens: type: integer description: Số lượng token hoàn thành completion_tokens_details: type: object required: - reasoning_tokens - audio_tokens - accepted_prediction_tokens - rejected_prediction_tokens properties: accepted_prediction_tokens: type: integer description: Số lượng token dự đoán được chấp nhận audio_tokens: type: integer description: Số lượng token liên quan đến âm thanh reasoning_tokens: type: integer description: Số token được sử dụng trong quá trình suy luận rejected_prediction_tokens: type: integer description: Số lượng token dự đoán bị từ chối description: Phân tích chi tiết số token hoàn thành x-apifox-orders: - accepted_prediction_tokens - audio_tokens - reasoning_tokens - rejected_prediction_tokens x-apidog-orders: - accepted_prediction_tokens - audio_tokens - reasoning_tokens - rejected_prediction_tokens latency_checkpoint: type: object required: - engine_tbt_ms - engine_ttft_ms - engine_ttlt_ms - pre_inference_ms - service_tbt_ms - service_ttft_ms - service_ttlt_ms - total_duration_ms - user_visible_ttft_ms properties: engine_tbt_ms: type: integer description: Thời gian giữa các token của engine (ms) engine_ttft_ms: type: integer description: Thời gian của bộ máy đến token đầu tiên (ms) engine_ttlt_ms: type: integer description: Tổng độ trễ của bộ máy (ms) pre_inference_ms: type: integer description: Thời gian chuẩn bị trước khi suy luận (ms) service_tbt_ms: type: integer description: >- Khoảng thời gian giữa các token ở phía dịch vụ (ms) service_ttft_ms: type: integer description: Thời gian từ phía dịch vụ đến mã từ đầu tiên (ms) service_ttlt_ms: type: integer description: Tổng độ trễ phía dịch vụ (ms) total_duration_ms: type: integer description: Tổng thời lượng (ms) user_visible_ttft_ms: type: integer description: >- Thời gian đến token đầu tiên mà người dùng nhìn thấy (ms) description: Thông tin điểm kiểm tra độ trễ x-apifox-orders: - engine_tbt_ms - engine_ttft_ms - engine_ttlt_ms - pre_inference_ms - service_tbt_ms - service_ttft_ms - service_ttlt_ms - total_duration_ms - user_visible_ttft_ms x-apidog-orders: - engine_tbt_ms - engine_ttft_ms - engine_ttlt_ms - pre_inference_ms - service_tbt_ms - service_ttft_ms - service_ttlt_ms - total_duration_ms - user_visible_ttft_ms prompt_tokens: type: integer description: Số lượng token trong lời nhắc prompt_tokens_details: type: object required: - cached_tokens - audio_tokens properties: audio_tokens: type: integer description: Số lượng token liên quan đến âm thanh cached_tokens: type: integer description: Số lượng token trúng bộ nhớ đệm description: Phân tích chi tiết token của lời nhắc x-apifox-orders: - audio_tokens - cached_tokens x-apidog-orders: - audio_tokens - cached_tokens 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 - latency_checkpoint - prompt_tokens - prompt_tokens_details - total_tokens x-apidog-orders: - completion_tokens - completion_tokens_details - latency_checkpoint - prompt_tokens - prompt_tokens_details - total_tokens refName: V1ChatCompletionsResponse x-apifox-orders: - choices - created - id - model - object - service_tier - system_fingerprint - usage x-apidog-orders: - choices - created - id - model - object - service_tier - system_fingerprint - usage examples: example: summary: example value: choices: - finish_reason: dừng index: 0 logprobs: '' message: annotations: [] content: Xin chào, hôm nay tôi có thể hỗ trợ bạn như thế nào? refusal: '' role: >- Vui lòng cung cấp nội dung tài liệu kỹ thuật cần dịch. created: 1677652288 id: chatcmpl-123 model: gpt-4o object: chat.completion service_tier: mặc định system_fingerprint: fp_abc123 usage: completion_tokens: 12 completion_tokens_details: accepted_prediction_tokens: 0 audio_tokens: 0 reasoning_tokens: 0 rejected_prediction_tokens: 0 latency_checkpoint: engine_tbt_ms: 0 engine_ttft_ms: 0 engine_ttlt_ms: 0 pre_inference_ms: 0 service_tbt_ms: 0 service_ttft_ms: 0 service_ttlt_ms: 0 total_duration_ms: 0 user_visible_ttft_ms: 0 prompt_tokens: 9 prompt_tokens_details: audio_tokens: 0 cached_tokens: 0 total_tokens: 21 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/Gemini/Định dạng tương thích với trò chuyện x-apidog-status: released x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45208850-runcomponents: schemas: {} securitySchemes: {}servers: - url: https://api.openaihub.net description: Prod Envsecurity: []