1. AI application
AITK-Doc
English
  • 中文
  • English
  • Home Page
  • AITK-API
    • Model
      • Native OpenAI Format
      • Native Gemini Format
    • Chat
      • Native OpenAI Format
      • Native Gemini Format
      • Native Claude Format
      • Responses Request (openai)
    • Audio
      • Native OpenAI Format TTS
      • Native Gemini Format TTS
    • Images
      • Native OpenAI Format Image Editing (JSON)
      • Native OpenAI Format Image Generation
      • Native OpenAI Format Image Editing (Multipart)
      • Native Gemini Format Image Generation
    • Video
      • Seedance2.0 format
        • Create Video Generation Task
        • Query Video Generation Task Status
    • Vector
      • Embeddings
        • Create Embedding
    • Translation
      • Speech Translation
  • AI application
    • AITK API Integration with Claude Code
    • AITK API Integration with Cursor
    • AITK API Integration with Codex-cli
    • AITK API Integration with Codex Desktop
    • AITK API Integration with Hermes Agent
  1. AI application

AITK API Integration with Codex Desktop

AITK Integration with Codex Desktop Tutorial#

This tutorial applies to:
OpenAI Codex Desktop
AITK API
macOS
Windows
OpenAI Compatible API

I. What Is Codex Desktop#

Codex Desktop is a desktop AI programming assistant launched by OpenAI.
Compared with traditional chat windows, Codex Desktop supports:
Code repository analysis
AI Agent
Automatic project modification
Shell execution
Git operations
Multi-task parallelism
Local tool invocation
Developers can directly use their own API provider without being forced to use the official OpenAI API.

II. Does AITK Support Codex Desktop#

Yes.
AITK provides an OpenAI Compatible/Responses API.
Therefore, it can be directly used as:
Custom Provider
OpenAI Compatible Endpoint
to connect to Codex Desktop.
You only need to configure:
API Key
Base URL
Model
to complete the integration.

III. Preparation#

Prepare the following:
ItemDescription
Codex DesktopInstalled
AITK API Keysk-xxxx
AITK API Addresshttps://api.aitk.com/v1
Model Namehttps://www.aitk.com

IV. Download and Install Codex Desktop#

Go to: https://openai.com/zh-Hans-CN/codex/get-started/
Install the latest version of Codex Desktop from the official OpenAI download page.
After installation is complete, launch the application.

V. Obtain AITK API Information#

Go to the AITK Open Platform to apply for an sk.
AITK Open Platform
image-20260514140602533.png
image-20260514140819323.png
Obtain the following information:
Configuration ItemExample
Base URLhttps://api.aitk.com
API Keysk-xxxx
ModelClaude Opus 4.6 / GPT 5.5 ...

VI. Configuration via Environment Variables (OpenAI's Recommended Integration Method)#

Codex CLI essentially uses the OpenAI SDK, so you only need to configure environment variables.
However, this method only applies to OpenAI-related models.
Valid examples: GPT-5.5, GPT-6-Astra
Invalid examples: Claude Haiku 4.5, Gemini 2.5 Pro — this method does not support them.

1. Mac / Linux Configuration#

Open the terminal:
Add:
After saving, run:

2. Windows Configuration (Command-Line Method)#

Open:
CMD
PowerShell
Windows Terminal
Run the following commands.

CMD Configuration Method#

Set API Key#

setx OPENAI_API_KEY "sk-xxxx"

Set Base URL#

setx OPENAI_BASE_URL "https://api.aitk.com/v1"

Set Model#

setx OPENAI_MODEL "GPT-5.6-Sol"

After Configuration#

Close the current terminal.
Reopen CMD or PowerShell.
Verify:
echo %OPENAI_API_KEY%
echo %OPENAI_BASE_URL%
echo %OPENAI_MODEL%

VII. Verify Configuration#

Open Codex Desktop, confirm whether the API has been configured, and test whether it works normally, as follows:
image.png
Or:
Generate a Spring Boot sample project for me
If results are returned normally, it indicates:
API Key is correct
Base URL is correct
Model is correct
AITK integration is successful

VIII. Common Issues#

Unauthorized#

Check:
Whether the API Key is correct

Provider Connection Failed#

Check:
https://api.aitk.com/v1
whether it is filled in correctly.

Model Not Found#

Check the model name.
Make sure to enter:
GPT-5.5
or other models supported by the AITK platform.

IX. Summary#

Through Codex Desktop's Custom Provider feature, you can directly connect to the AITK OpenAI Compatible API.
After configuration is complete, you can use the following in Codex Desktop:
GPT-5.5
GPT-5.6
GPT-6-Astra
to achieve a unified API and multi-model AI programming experience.
修改于 2026-11-23 02:34:48
上一页
AITK API Integration with Codex-cli
下一页
AITK API Integration with Hermes Agent
Built with