Key4U
Trang chủGiá cảDanh sách modelĐăng nhậpĐăng ký
Trang chủGiá cảDanh sách modelĐăng nhậpĐăng ký
  1. Tutorials for using various plugins/software
  • Giới thiệu
  • Liên hệ
  • 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
    • ChatGpt interface
      • ChatGPT Audio (Audio)
        • GPT-4o-audio
        • Audio to text whisper-1
        • Audio to text gpt-4o-transcribe
        • Create voice gpt-4o-mini-tts
        • Create translation (not supported)
      • ChatGPT Chat (Chat)
        • Chat completion object
        • Chat completion block object
        • Create chat completion (streaming)
        • Create chat completion (non-stream)
        • Create chat image recognition (streaming)
        • Create chat image recognition (streaming) best64
        • Create chat image recognition (non-stream)
        • Create chat-generated image (non-stream)
        • Official Function calling invocation
        • Official N Test
        • List models
        • Create chat function call
        • Create structured output
        • Control the effort level of the reasoning model
        • Create chat completion qwen-mt-turbo
        • Create chat completion deepseek v3.1 thinking level (streaming)
        • deepseek-ocr recognition
      • ChatGPT Auto Completion (Completions)
        • Complete object
        • Creation completed
      • ChatGPT Embeddings
        • Embedded Object
        • Create Embedding
      • Web search
        • web search
    • Anthropic Claude interface
      • Chat completion object
      • Chat completion block object
      • Create chat completion (streaming) [native format]
      • Create function call (streaming) [native format]
      • Create thinking chat [native format]
      • Create thinking chat
      • Create chat completion (streaming)
      • Create chat completion (non-stream)
      • Create chat image recognition (streaming)
      • Create chat image recognition (non-stream)
      • PDF support [native format]
      • PDF support [native format] base64 format
    • Google Gemini Interface
      • Native format
        • Text Generation
        • text generation-stream
        • Text Generation + Reasoning - Stream
        • Image generation
        • Image generation gemini-2.5-flash-image
        • Image generation gemini-2.5-flash-image controls aspect ratio
        • Image generation gemini-3-pro-image-preview aspect ratio control + clarity
        • Image editing
        • Image Understanding
        • Formatted output
        • Function call
        • Document Understanding
        • URL context [native format]
        • Code execution
        • google search
        • Video Understanding
        • URL context
        • Video Understanding - URL [Native Format] In Development
        • Imagen 4 in development
        • Audio Understanding
        • Embeddings
      • chat compatible format
        • gemini image creation interface [chat compatible format]
        • Chat Interface [chat-compatible format]
        • Chat Interface - Thinking 1 [chat compatible format]
        • Chat Interface - Thinking 2 [chat compatible format]
        • Image recognition interface [chat-compatible format]
        • Chat + Read File Interface [chat-compatible format]
  • Chat (Responses)
    • Comparison between Responses API and Chat API
    • Create Model Response
    • Create function call
    • Create model response (streaming return)
    • Create model response (control thought length)
    • Create network search
    • Create model response gpt-5 enable thinking
    • Create function call Copy
  • painting model
    • README
    • image object
    • Midjourney
      • Upload image
      • Submit Imagine task
      • Query task status by task ID
      • Query tasks by ID list
      • Get the seed of the task image
      • Execute Action
      • Submit Blend Task
      • Submit Describe Task
      • Submit Modal
    • Ideogram
      • Generate 3.0 (Text-to-Image) Generate
      • Generate 3.0 (Image Editing) Edit
      • Generate 3.0 (Image Remix)
      • Generate 3.0 (Image Reconstruction) Reframe
      • Generate 3.0 (Replace Background) Replace Background
      • ideogram (text-to-image)
      • Remix (Mixed Graph)
      • Upscale (magnify HD)
      • Describe
    • GPT Image-1
      • Create gpt-image-1
      • Edit gpt-image-1
      • mask gpt-image-1
    • Dream Drawing
      • Create Drawing
      • Edit Image
    • DALL·E 3
      • Create DALL·E 3
    • FLUX series
      • gpt compatible format
        • Flux creation (OpenAI dall-e-3 format)
        • Flux editing (OpenAI dall-e-3 format)
      • Official Replicate format
        • Flux resolution
        • Access Tutorial
        • Create task black-forest-labs/flux-kontext-dev
        • Query task
    • Doubao series
      • doubao-seedream-3-0-t2i-250415
      • doubao-seededit-3-0-i2i-250628
      • doubao-seedream-4-0-250828-text-to-image
      • doubao-seedream-4-0-250828-image-to-image
      • doubao-seedream-4-0-250828-multi-image-to-image
    • Fal.ai Platform
      • status code
      • Get request result
      • /fal-ai/nano-banana Text-to-Image
      • /fal-ai/nano-banana/edit Image Editing
    • Qwen-Image series
      • qwen-image-edit-2509
  • video model
    • veo video generation
      • Unified Video Format
        • status code
        • Create Video
        • Create video with image
        • Query task
        • Create video (reference image)
      • OpenAI video format
        • openai create video, with image
        • openai query task
        • openai download video
    • luma video generation
      • Official API Format
        • status code
        • Submit video generation task
        • Extended video
      • Query task
        • Query a single task
        • Batch get tasks
    • Kling Kuaishou Ke Ling
      • Callback protocol
      • image generation
      • Text-to-video
      • Image to Video
      • Query task (free)
      • Multiple image reference live video
      • Virtual Try-On
      • lip sync
      • Video extension
      • Video Effects
    • Runway video generation
      • status code
      • Submit video generation task
      • Query video task (free)
    • Video generation by Jimeng
      • status code
      • Submit video generation task
      • Query video task (free)
    • Video Generation by Conch
      • status code
      • Submit video generation task
      • Video Task Status Query
      • Image to Video
      • First and last frame video
    • Video Generation by Doubao
      • Example of text-to-video generation
      • Image to Video - First Frame
      • seedance-lite-first-and-last-frame
      • Image to video - base64 encoded
      • seedance-lite-reference image
      • Query a single task
      • Query video generation task list - default
      • Query video generation task list - search multiple task IDs
    • sora video generation
      • Unified Video Format
        • Query task
        • Create video with image sora-2
        • Create video sora-2
        • Create video sora-2-pro
        • Create video (with Character)
      • chat format
        • Create Video
        • Create video, with image
        • Continuous modification generates video
      • OpenAI official video format
        • openai query task
        • openai download video
        • openai create video, with image
        • openai create video, with images private mode
        • openai create video (with Character)
        • openai edit video
      • Create Role
    • Qwen Video Generation
      • Generate video
      • Video Query
  • GPTs Related
    • Introduction
    • GPTs conversation
  • System API
    • Get token list
    • Add new token
    • Get token support model
    • Get account information
    • Modify token
    • Search token
    • Delete token
  • Text-to-Music Suno
    • parameter
    • Description
    • Task submission
      • Generate Song (Inspiration Mode)
      • Generate Song (Custom Mode)
      • Generate Song (Continuation Mode)
      • Generate song (singer style)
      • Generate song (upload song for secondary creation)
      • Generate song (concatenate song)
      • Generate lyrics
      • Song Splicing
    • Query Interface
      • Batch get tasks
      • Query a single task
      • Get wav
  • Python configuration method
    • python uses speech-to-text
    • python use text to speech
    • python uses Embeddings for vectorization
    • python calls DALL·E
    • python simple call openai function-calling demo
    • Simple langchain calling openai demo
    • python llama_index configuration
    • Python Basic Dialogue
    • Python uses gpt-4o to recognize images - local images
    • Python uses gpt-4o to recognize images
    • Python uses Claude to identify images
    • python library stream output
    • gpt realtime model call
    • python request stream output demo
    • python uses gpt-image-1 to create and edit images
    • python openai official library (using AutoGPT, langchain, etc.)
    • python continuous dialogue
  • Rerank model
    • Reordering
  • Replicate Aggregation Platform
    • Access Tutorial
    • Flux Resolution
    • Query task
    • Create task - via model version (predictions)
    • Create task stability-ai/stable-diffusion
    • Create task stability-ai/sdxl
    • Create task stability-ai/stable-diffusion-inpainting
    • Create task stability-ai/stable-diffusion-img2img
    • Create task lucataco/flux-schnell-lora
    • Create task lucataco/flux-dev-lora
    • Create task andreasjansson/stable-diffusion-animation
    • Create task sujaykhandekar/object-removal
    • Create task cjwbw/rembg
    • Create task lucataco/animate-diff
    • Create task ideogram-ai/ideogram-v2-turbo
    • Create task black-forest-labs/flux-kontext-dev
    • Create task minimax/video-01-live
    • Create task minimax/video-01
    • Create task recraft-ai/recraft-v3
    • Create task recraft-ai/recraft-v3-svg
    • Create task black-forest-labs/flux-1.1-pro-ultra
    • Create task black-forest-labs/flux-kontext-pro
    • Create task black-forest-labs/flux-kontext-max
    • Create task flux-kontext-apps/multi-image-kontext-max
    • Create task flux-kontext-apps/multi-image-kontext-pro
    • Create task lucataco/remove-bg
    • Create task riffusion/riffusion
    • Create task black-forest-labs/flux-fill-dev
    • Create task black-forest-labs/flux-fill-pro
    • Create task google/imagen-4-fast
    • Create task google/imagen-4-ultra
    • Create task google/imagen-4
    • Create task prunaai/vace-14b
    • Create task bytedance/seedream-4
  • Fal-ai Aggregate Platform
    • Access Tutorial
    • falai-veo3 video generation
      • /fal-ai/veo3
      • /fal-ai/veo3/fast/image-to-video
      • /fal-ai/veo3/fast
      • /fal-ai/veo3/requests/{request_id}
      • /fal-ai/veo3/image-to-video
    • Get request result
    • /fal-ai/flux-1/dev
    • /fal-ai/flux-1/dev/image-to-image
    • /fal-ai/flux-1/dev/redux
    • /fal-ai/flux-1/schnell/redux
    • /fal-ai/flux-pro/kontext
    • /fal-ai/flux-pro/kontext/text-to-image
    • /fal-ai/flux-pro/kontext/max
    • /fal-ai/flux-pro/kontext/max/multi
    • /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
    • /fal-ai/qwen-image-edit-plus
    • /fal-ai/kling-video/v2.5-turbo/pro/text-to-video
    • /fal-ai/kling-video/v2.5-turbo/pro/image-to-video
    • /fal-ai/flux-lora
    • /fal-ai/flux-lora/image-to-image
    • /fal-ai/flux-lora/inpainting
    • /fal-ai/kling-video/v2.5-turbo/pro/text-to-video
    • /fal-ai/qwen-image-edit-lora
  • PHP configuration method
    • PHP image editing demo
  • Node.js configuration method
    • Node.js basic dialogue
  • Tutorials for using various plugins/software
    • 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
  • Help Center
    • AI response field: Thinking related
    • HTTP status codes and their meanings
    • Self-hosted image hosting API
    • Upload image to image hosting service
  1. Tutorials for using various plugins/software

Hướng dẫn cấu hình Codex

Hướng dẫn cài đặt và cấu hình Codex#


Hướng dẫn phiên bản Windows#

Yêu cầu hệ thống#

Windows 10 hoặc Windows 11
Node.js 22+
npm 10+
Kết nối mạng

Các bước cài đặt#

Bước chuẩn bị!!!
Cài đặt Git Bash, vui lòng truy cập Git - Downloads để tải xuống phiên bản phù hợp với hệ thống máy tính của bạn, sau đó liên tục nhấn "Tiếp theo" để hoàn thành cài đặt.
1. Cài đặt Node.js
Truy cập trang web chính thức Node.js để tải xuống và cài đặt phiên bản LTS mới nhất.
2. Cài đặt codex
Mở Command Prompt (CMD) hoặc PowerShell, chạy lệnh:
3. Xác minh cài đặt
Mở Command Prompt (CMD) hoặc PowerShell, chạy lệnh:

Cấu hình API#

1. Lấy Auth Token
Truy cập trang key4u.shop và thực hiện các thao tác sau:
Nhấn Bảng điều khiển → API Token
Nhấn Thêm Token
Nhóm token vui lòng chọn: Codex (bắt buộc phải chọn nhóm này, nếu không sẽ không thể sử dụng)
Tên token tùy ý
Khuyến nghị hạn mức: Đặt thành Hạn mức không giới hạn
Các tùy chọn khác giữ mặc định
image.png
2. File cấu hình
Lưu ý quan trọng: Vui lòng thay thế sk-xxx dưới đây bằng API key thực tế mà bạn tạo trên key4u.shop!
Lưu ý quan trọng: Vui lòng thay thế sk-xxx dưới đây bằng API key thực tế mà bạn tạo trên key4u.shop!
Lưu ý quan trọng: Vui lòng thay thế sk-xxx dưới đây bằng API key thực tế mà bạn tạo trên key4u.shop!
1.
Vào thư mục .codex trong thư mục người dùng hiện tại, ví dụ: C:\Users\testuser\.codex.
(Lưu ý: Nếu không thấy thư mục này, có nghĩa là bạn chưa bật "Hiển thị các mục ẩn" của Windows, vui lòng bật tính năng này trong File Explorer trước.)
image.png
2. Nếu không có thư mục .codex, vui lòng tạo thư mục này thủ công, sau đó tạo hai file config.toml và auth.json bên trong.
3.
Điền cấu hình (cần thay thế sk-xxx bằng SK thật mà bạn tạo).
a. Cấu hình trong auth.json:
{"OPENAI_API_KEY": "sk-xxx"}
b. Cấu hình trong config.toml (sao chép trực tiếp nội dung dưới đây):
model_reasoning_effort có thể chọn high, medium, low, tương ứng mức độ nỗ lực suy nghĩ của model (cao, trung bình, thấp).
model_provider = "api111"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.api111]
name = "api111"
base_url = "https://api.key4u.shop/v1"
wire_api = "responses"

Khởi động codex#

Khởi động lại terminal! Khởi động lại terminal! Khởi động lại terminal!
Sau đó vào thư mục dự án của bạn:
Chạy lệnh sau để khởi động:
image.png

Plugin VSCode codex#

Sau khi hoàn thành cấu hình trên, tìm kiếm và cài đặt codex trong VSCode Extension Store.
image.png
Sau khi cài đặt xong sẽ xuất hiện trong thanh bên.

image.png#

Hướng dẫn phiên bản Mac#

Yêu cầu hệ thống#

macOS 12 hoặc cao hơn
Node.js 22+
npm 10+
Kết nối mạng

Các bước cài đặt#

1. Cài đặt Node.js
Cách 1: Truy cập trực tiếp trang web chính thức Node.js để tải xuống và cài đặt phiên bản LTS mới nhất.
Cách 2: Sử dụng Homebrew (khuyến nghị)
2. Cài đặt codex
Mở Terminal, chạy lệnh (có thể cần thêm sudo):
3. Xác minh cài đặt
Mở Terminal, chạy lệnh:

Cấu hình API#

1. Lấy Auth Token
Truy cập trang key4u.shop và thực hiện các thao tác sau:
Nhấn Bảng điều khiển → API Token
Nhấn Thêm Token
Nhóm token vui lòng chọn: codex đặc cung (bắt buộc phải chọn nhóm này, nếu không sẽ không thể sử dụng)
Tên token tùy ý
Khuyến nghị hạn mức: Đặt thành Hạn mức không giới hạn
Các tùy chọn khác giữ mặc định
2. File cấu hình
Lưu ý quan trọng: Vui lòng thay thế sk-xxx dưới đây bằng API key thực tế mà bạn tạo trên key4u.shop!
Lưu ý quan trọng: Vui lòng thay thế sk-xxx dưới đây bằng API key thực tế mà bạn tạo trên key4u.shop!
Lưu ý quan trọng: Vui lòng thay thế sk-xxx dưới đây bằng API key thực tế mà bạn tạo trên key4u.shop!
1.
Tạo thư mục và file:
2.
Chỉnh sửa file auth.json:
Nhấn i để vào chế độ chèn, dán nội dung sau (thay thế sk-xxx bằng key của bạn), sau đó nhấn phím ESC, gõ :wq và Enter để lưu và thoát.
{"OPENAI_API_KEY": "sk-xxx"}
3.
Chỉnh sửa file config.toml:
Nhấn i để vào chế độ chèn, dán nội dung sau, sau đó nhấn phím ESC, gõ :wq và Enter để lưu và thoát.
model_provider = "key4u"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.key4u]
name = "key4u"
base_url = "https://api.key4u.shop/v1"
wire_api = "responses"

Khởi động codex#

Khởi động lại terminal! Khởi động lại terminal! Khởi động lại terminal!
Sau đó vào thư mục dự án của bạn:
Chạy lệnh sau để khởi động:

Plugin VSCode codex#

Sau khi hoàn thành cấu hình trên, tìm kiếm và cài đặt codex trong VSCode Extension Store.
Sau khi cài đặt xong sẽ xuất hiện trong thanh bên.

Hướng dẫn phiên bản Linux#

Yêu cầu hệ thống#

Các bản phân phối Linux chính (Ubuntu 20.04+, Debian 10+, CentOS 7+, v.v.)
Node.js 22+
npm 10+
Kết nối mạng

Các bước cài đặt#

1. Cài đặt Node.js
Ubuntu/Debian
CentOS/RHEL/Fedora
Arch Linux
2. Cài đặt codex
Mở Terminal, chạy lệnh:
3. Xác minh cài đặt
Mở Terminal, chạy lệnh:

Cấu hình API#

1. Lấy Auth Token
Truy cập trang key4u.shop và thực hiện các thao tác sau:
Nhấn Bảng điều khiển → API Token
Nhấn Thêm Token
Nhóm token vui lòng chọn: kênh codex-gpt (bắt buộc phải chọn nhóm này, nếu không sẽ không thể sử dụng)
Tên token tùy ý
Khuyến nghị hạn mức: Đặt thành Hạn mức không giới hạn
Các tùy chọn khác giữ mặc định
2. File cấu hình
Lưu ý quan trọng: Vui lòng thay thế sk-xxx dưới đây bằng API key thực tế mà bạn tạo trên key4u.shop!
Lưu ý quan trọng: Vui lòng thay thế sk-xxx dưới đây bằng API key thực tế mà bạn tạo trên key4u.shop!
Lưu ý quan trọng: Vui lòng thay thế sk-xxx dưới đây bằng API key thực tế mà bạn tạo trên key4u.shop!
1.
Tạo thư mục và file:
2.
Chỉnh sửa file auth.json:
Nhấn i để vào chế độ chèn, dán nội dung sau (thay thế sk-xxx bằng key của bạn), sau đó nhấn phím ESC, gõ :wq và Enter để lưu và thoát.
{"OPENAI_API_KEY": "sk-xxx"}
3.
Chỉnh sửa file config.toml:
Nhấn i để vào chế độ chèn, dán nội dung sau, sau đó nhấn phím ESC, gõ :wq và Enter để lưu và thoát.
model_provider = "api111"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.api111]
name = "api111"
base_url = "https://api.key4u.shop/v1"
wire_api = "responses"

Khởi động codex#

Khởi động lại terminal! Khởi động lại terminal! Khởi động lại terminal!
Sau đó vào thư mục dự án của bạn:
Chạy lệnh sau để khởi động:

Plugin VSCode codex#

Sau khi hoàn thành cấu hình trên, tìm kiếm và cài đặt codex trong VSCode Extension Store.
Sau khi cài đặt xong sẽ xuất hiện trong thanh bên.

Các vấn đề thường gặp#

Khi gặp lỗi vui lòng kiểm tra theo các bước sau:
1.
Xác nhận việc tạo API Key có đúng không: Hạn mức chọn Hạn mức không giới hạn, không hạn chế model, nhóm chọn Codex.
Để biết thêm chi tiết về cấu hình và sử dụng codex, vui lòng tham khảo hướng dẫn chính thức của codex.
Modified at 2025-12-02 13:49:34
Previous
Node.js basic dialogue
Next
Hướng dẫn cài đặt và sử dụng Claude Code
Built with