Key4U
Trang chủGiá cảĐăng nhậpĐăng ký
Trang chủGiá cảĐăng nhậpĐăng ký
  1. Responses
  • README
  • Giới thiệu
  • Gửi Request
  • Liên hệ
  • Model hình ảnh
    • README
    • Đối tượng hình ảnh
    • Midjourney
      • Gửi ảnh lên (Upload ảnh)
      • Gửi task "Imagine" (tạo ảnh từ mô tả)
      • Tra cứu trạng thái task theo ID
      • Truy vấn nhiều task theo danh sách ID
      • Lấy seed của ảnh trong task
      • Upscalers (Action)
      • Gửi task hòa trộn ảnh (Blend)
      • Gửi task Describe
      • Gửi task Zoom Out
      • Gửi task kiểu Modal (có thể là chế độ giao diện hoặc cấu hình riêng)
      • Gửi task hoán đổi khuôn mặt (Face Swap)
    • Ideogram
      • Tạo ảnh từ văn bản (Generate)
      • Chỉnh sửa ảnh (Edit)
      • Tái tạo ảnh (Remix)
      • Tái cấu trúc ảnh (Reframe)
      • Thay nền ảnh (Replace Background)
      • Tạo ảnh từ văn bản (Ideogram)
      • Trộn ảnh (Remix)
      • Phóng to ảnh độ nét cao (Upscale)
      • Mô tả ảnh (Describe)
    • GPT Image-1
      • Chỉnh sửa ảnh
      • Tạo mặt nạ (mask)
    • DALL·E 3
    • FLUX
      • Tương thích với OpenAI
        • Chỉnh sửa ảnh tương thích OpenAI Dall-e-3
      • Tương thích Replicate
        • Hướng dẫn tích hợp
        • Tỉ lệ của Flux
        • Tạo hình ảnh black-forest-labs/flux-kontext-dev
        • Truy vấn task
    • Doubao
      • doubao-seededit-3-0-i2i-250628
      • doubao-seedream-4-0-250828 (text-to-image)
      • doubao-seedream-4-0-250828 (multi image-to-image)
      • doubao-seedream-4-0-250828 (image-to-image)
      • doubao-seedream-3-0-t2i-250415
    • Fal-ai
      • Status Code
      • Truy vấn kết quả
      • /fal-ai/nano-banana Tạo hình ảnh
      • /fal-ai/nano-banana Chỉnh sửa hình ảnh
  • Nền tảng Fal-ai
    • Hướng dẫn truy cập
    • Truy vấn kết quả
    • /fal-ai/flux-1/dev
    • /fal-ai/flux-1/dev/image-to-image
    • /fal-ai/flux-1/schnell/redux
    • /fal-ai/flux-pro/kontext/text-to-image
    • /fal-ai/flux-1/dev/redux
    • /fal-ai/flux-pro/kontext/max/multi
    • /fal-ai/flux-pro/kontext/max
    • /fal-ai/flux-pro/kontext
    • /fal-ai/wan/v2.2-a14b/image-to-image
    • /fal-ai/bytedance/seedream/v4/text-to-image
    • /fal-ai/bytedance/seedream/v4/edit
    • /fal-ai/vidu/reference-to-image
    • /fal-ai/imagen4/preview
    • /fal-ai/qwen-image-edit-lora
  • Bắt đầu
    • Bắt đầu nhanh với API
    • Bảng So Sánh Nhóm API
    • Tính Đặc Thù của Nhóm API & Khác Biệt Về Giá
  • Chat
    • OpenAI Cient
      • Audio
        • GPT-4o-audio
        • whisper-1
        • gpt-4o-transcribe
        • text-to-speech
        • translations
      • Chat
        • Chat object
        • Chat stream object
        • Streaming
        • Non-steaming
        • Chat image streaming
        • Chat image with base64 streaming
        • Chat image with base64 non-streaming
        • Tạo ảnh non-streaming
        • Gọi hàm (Function calling)
        • Nhiều output (n output)
        • Danh sách model
        • Gọi hàm (Function calling) non-streaming
        • Output có cấu trúc (structured output)
        • Kiểm soát mức độ suy luận
        • Chat text qwen-mt-turbo
        • Chat text deepseek v3.1 với thinking
      • Completions
        • Completions object
        • Completions
      • Embeddings
        • Embedding object
        • Embeddings
      • Web search
        • web-search
    • Anthropic Claude
      • Chat Completion Object
      • Chat Completion Chunk Object
      • Tạo chat completion (stream) [raw]
      • Gọi hàm Function calling(stream) [raw]
      • Tạo chat suy luận - Reasoning [raw]
      • Tạo chat suy luận
      • Tạo chat completion (stream)
      • Tạo chat completion (non-stream)
      • Tạo chat image(stream)
      • Tạo chat image (non-stream)
    • Gemini
      • Raw
        • Chỉnh sửa hình ảnh [định dạng gốc] gemini-2.5-flash-image-preview
        • google-search [Raw]
        • Thực thi code (codeExecution tool)
        • Chat API [raw]
        • Chat API - stream [raw]
        • Tạo image [raw]
        • Chỉnh sửa ảnh [raw]
        • Đọc ảnh [raw]
        • Output có cấu trúc (structured output) [raw]
        • Gọi hàm (Function calling) [raw]
        • Đọc hiểu tài liệu [raw]
        • Đọc hiểu Video dạng base64 [raw]
        • Đọc hiểu trang web [developing]
        • Đọc hiểu Video qua url [developing]
      • Tương thích OpenAI Client
        • Tạo image
        • Chat
        • Đọc hiểu hình ảnh
        • Chat + Đọc hiểu file
  • Responses
    • Responses API so với Chat API
    • Tạo function call
      POST
    • Tạo chat responses
      POST
    • Tạo chat responses (stream)
      POST
    • Kiểm soát mức độ suy luận
      POST
    • Tạo tìm kiếm trên Internet
      POST
  • Mô hình video
    • Tạo video với veo
      • Truy vấn task
      • Tạo video kèm hình ảnh
      • Tạo video
    • Tạo video với luma
      • Truy vấn thông tin một task
      • Truy vấn thông tin nhiều task
      • Gửi tác vụ tạo video
      • Mở rộng video
    • Tạo video với Kling
      • Callback
      • Tạo hình ảnh
      • Tạo video từ văn bản
      • Tạo video từ hình ảnh
      • Truy vấn task
    • Tạo video với Runway
      • Gửi task tạo video
      • Truy vấn task
      • Gửi task tạo video - định dạng chat
    • Tạo video với Jimeng
      • Gửi task tạo video
      • Truy vấn task
    • Tạo video với Minimax
      • Gửi task tạo video
      • Truy vấn video
    • Tạo video với Doubao
      • Text to video
      • Image to video - Khung hình đầu tiên
      • seedance-lite – khung hình đầu và cuối
      • Base64 to video
      • seedance-lite – hình ảnh tham chiếu
      • Truy vấn một tác vụ
      • Truy vấn danh sách tác vụ tạo video – mặc định
      • Truy vấn danh sách tác vụ tạo video – tìm kiếm nhiều ID tác vụ
  • GPTs liên quan
    • Giới thiệu
    • GPTs Đối thoại
  • Text-to-music với Suno
    • Hướng dẫn
    • Tham số
    • Call API
      • Tạo bài hát (Chế độ cảm hứng)
      • Tạo bài hát (Chế độ tùy chỉnh)
      • Tạo bài hát (Chế độ tiếp tục)
      • Tạo bài hát (Theo phong cách ca sĩ)
      • Tạo bài hát (Remix từ bài hát đã tải lên)
      • Tạo bài hát (Ghép bài hát)
      • Tạo lời bài hát
      • Ghép bài hát
    • Truy vấn
      • Lấy nhiều task cùng lúc
      • Lấy thông tin của một task
  • Mô hình sắp xếp lại (Rerank)
    • Tái sắp xếp thứ tự
  • Nền tảng tích hợp Replicate
    • Hướng dẫn
    • Tỉ lệ hình ảnh của Flux
    • Truy vấn task
    • Tạo một task - version (predictions)
    • Tạo task stability-ai/stable-diffusion
    • Tạo task stability-ai/sdxl
    • Tạo task stability-ai/stable-diffusion-inpainting
    • Tạo task stability-ai/stable-diffusion-img2img
    • Tạo task black-forest-labs/flux-kontext-dev
    • Tạo task lucataco/flux-schnell-lora
    • Tạo task lucataco/flux-dev-lora
    • Tạo task ideogram-ai/ideogram-v2-turbo
    • Tạo task andreasjansson/stable-diffusion-animation
    • Tạo task lucataco/animate-diff
    • Tạo task sujaykhandekar/object-removal
    • Tạo task cjwbw/rembg
    • Tạo task minimax/video-01-live
    • Tạo task minimax/video-01
    • Tạo task recraft-ai/recraft-v3
    • Tạo task recraft-ai/recraft-v3-svg
    • Tạo task black-forest-labs/flux-1.1-pro-ultra
    • Tạo task black-forest-labs/flux-kontext-pro
    • Tạo task black-forest-labs/flux-kontext-max
    • Tạo task flux-kontext-apps/multi-image-kontext-max
    • Tạo task flux-kontext-apps/multi-image-kontext-pro
    • Tạo task lucataco/remove-bg
    • Tạo task riffusion/riffusion
    • Tạo task black-forest-labs/flux-fill-dev
    • Tạo task black-forest-labs/flux-fill-pro
    • Tạo task google/imagen-4-fast
    • Tạo task google/imagen-4-ultra
    • Tạo task google/imagen-4
    • Tạo task prunaai/vace-14b
  • Sử dụng với PHP
    • Ví dụ sử dụng trong PHP
  • Sử dụng với Node.js
    • Hướng dẫn
  • Sử dụng với Python
    • Thư viện của OpenAI (sử dụng AutoGPT, langchain, v.v.)
    • Trò chuyện liên tục
    • Chuyển giọng nói thành văn bản
    • Chuyển văn bản thành lời nói
    • Sử dụng Embeddings để tìm kiếm tương tự
    • DALL·E
    • Gọi đơn giản openai function-calling demo
    • Gọi openai demo với langchain đơn giản
    • Cấu hình llama_index
    • Trò chuyện cơ bản
    • Sử dụng gpt-4o nhận diện ảnh - ảnh cục bộ
    • Sử dụng gpt-4o nhận diện ảnh
    • Sử dụng Claude nhận diện ảnh
    • Xuất dữ liệu dạng luồng
    • gpt sử dụng mô hình thời gian thực (gpt realtime)
    • Request gửi yêu cầu, demo xuất luồng
    • Sử dụng gpt-image-1 để tạo/chỉnh sửa ảnh
  • Hướng dẫn sử dụng các loại plugin/phần mềm
    • Hướng dẫn cấu hình Codex
    • Hướng dẫn cài đặt và sử dụng Claude Code
    • Hướng dẫn sử dụng với Dify
    • Hướng dẫn cấu hình Cline
    • Sử dụng với Aider AI (Terminal Coding)
    • Hướng dẫn sử dụng LobeChat
    • Sử dụng trong extension trình duyệt ChatGPT Sidebar
    • Hướng dẫn cấu hình ChatGPT GPT Academic để tối ưu cho học thuật
  • Trung tâm hỗ trợ
    • Dữ liệu phản hồi của AI: Thông tin liên quan đến suy luận
    • Các mã trạng thái HTTP (HTTP Status code)
  1. Responses

Tạo function call

POST
https://api.key4u.shop/v1/responses
https://platform.openai.com/docs/api-reference/responses/create
Một số mô hình của OpenAI chỉ hỗ trợ định dạng Response, ví dụ như o3-pro, codex-mini-latest.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/json

Example
{
    "model": "string",
    "input": [
        {
            "role": "string",
            "content": "string"
        }
    ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.key4u.shop/v1/responses' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "string",
    "input": [
        {
            "role": "string",
            "content": "string"
        }
    ]
}'

Responses

🟢200Success
application/json
Body

Example
{
    "id": "resp_68ac1558e9488190bcc2cbb94c7d7a140b8064b15a091a77",
    "object": "response",
    "created_at": 1756108120,
    "status": "completed",
    "background": false,
    "content_filters": null,
    "error": null,
    "incomplete_details": null,
    "instructions": null,
    "max_output_tokens": null,
    "max_tool_calls": null,
    "model": "gpt-4.1-data",
    "output": [
        {
            "id": "fc_68ac15594be88190a58217f75a6a54cc0b8064b15a091a77",
            "type": "function_call",
            "status": "completed",
            "arguments": "{\"sign\":\"Aquarius\"}",
            "call_id": "call_6kbB2GTk62PPUNdGuBJPx9KQ",
            "name": "get_horoscope"
        }
    ],
    "parallel_tool_calls": true,
    "previous_response_id": null,
    "prompt_cache_key": null,
    "reasoning": {
        "effort": null,
        "summary": null
    },
    "safety_identifier": null,
    "service_tier": "default",
    "store": true,
    "temperature": 1.0,
    "text": {
        "format": {
            "type": "text"
        }
    },
    "tool_choice": "auto",
    "tools": [
        {
            "type": "function",
            "description": "Get today's horoscope for an astrological sign.",
            "name": "get_horoscope",
            "parameters": {
                "properties": {
                    "sign": {
                        "description": "An astrological sign like Taurus or Aquarius",
                        "type": "string"
                    }
                },
                "required": [
                    "sign"
                ],
                "type": "object"
            },
            "strict": true
        }
    ],
    "top_p": 1.0,
    "truncation": "disabled",
    "usage": {
        "input_tokens": 62,
        "input_tokens_details": {
            "cached_tokens": 0
        },
        "output_tokens": 18,
        "output_tokens_details": {
            "reasoning_tokens": 0
        },
        "total_tokens": 80
    },
    "user": null,
    "metadata": {}
}
Modified at 2025-09-19 14:06:15
Previous
Responses API so với Chat API
Next
Tạo chat responses
Built with