Flaq AI Agent Guide
Practical Guide for Using OpenAI Codex CLI with Flaq AI's API Services and Open-Source AI Agent Skills
Use Flaq AI's OpenAI-compatible endpoint to quickly configure OpenAI Codex CLI with Flaq and access our model services from the terminal. After configuring your API key, follow the examples in this guide to choose a currently supported GPT model and verify the setup. You can also explore reusable open-source Codex skills to extend AI agent capabilities and support additional workflows.
Install
Install Codex CLI
Install the official Codex CLI package or app, then confirm the codex command is available before configuring Flaq AI. Node.js 22+ is required when using npm.
Install Codex CLI
Choose an install method for your system, then run the command below.
Official install script
Verify Codex CLI
Confirm the codex command is available before configuring the Flaq provider.
Verify installation
Install Codex CLI
Choose an install method for your system, then run the command below.
npm global install
Verify Codex CLI
Confirm the codex command is available before configuring the Flaq provider.
Verify installation
Configure
Connect Codex CLI to Flaq AI
Choose a model currently supported by the Flaq Codex endpoint, define Flaq as a Codex model provider, and provide your Flaq API key as OPENAI_API_KEY. Open-source Codex skills cover reusable workflows for coding, deployment, testing, documents, creative work, and other tasks.
GPT model for practical code editing, code explanation, and terminal coding workflows.
Recommended GPT model for stronger coding sessions, planning, and codebase analysis.
Default GPT 5.6 model for Codex coding workflows through Flaq AI.
GPT 5.6 model available for Codex coding workflows through Flaq AI.
GPT 5.6 model available for Codex coding workflows through Flaq AI.
Use a temporary OPENAI_API_KEY in the current terminal session. This keeps your API key out of ~/.codex/auth.json, but Codex still needs the Flaq provider entry in ~/.codex/config.toml.
Codex provider settings
Create or update the provider config and keep wire_api set to responses. On Windows, use %USERPROFILE%\.codex\config.toml.
Codex provider settings
~/.codex/config.tomlCodex provider settings
~/.codex/config.tomlCodex provider settings
~/.codex/config.tomlCodex provider settings
~/.codex/config.tomlCodex provider settings
~/.codex/config.tomlSet Flaq API key for this terminal
This export applies only to the current terminal session. It does not modify ~/.codex/auth.json or your shell profile.
Set Flaq API key for this terminal
Set Flaq API key for this terminal
Set Flaq API key for this terminal
Set Flaq API key for this terminal
Set Flaq API key for this terminal
Use a temporary OPENAI_API_KEY in the current PowerShell session. This keeps your API key out of %USERPROFILE%\.codex\auth.json, but Codex still needs the Flaq provider entry in %USERPROFILE%\.codex\config.toml.
Codex provider settings
Create or update the provider config and keep wire_api set to responses.
Codex provider settings
%USERPROFILE%\.codex\config.tomlCodex provider settings
%USERPROFILE%\.codex\config.tomlCodex provider settings
%USERPROFILE%\.codex\config.tomlCodex provider settings
%USERPROFILE%\.codex\config.tomlCodex provider settings
%USERPROFILE%\.codex\config.tomlSet Flaq API key for this terminal
This command applies only to the current PowerShell session. It does not modify %USERPROFILE%\.codex\auth.json or your PowerShell profile.
Set Flaq API key for this terminal
Set Flaq API key for this terminal
Set Flaq API key for this terminal
Set Flaq API key for this terminal
Set Flaq API key for this terminal
Verify
Verify Flaq in Codex CLI
Send a short prompt with Codex CLI. If it answers normally, Codex can call models through Flaq AI.
Start interactive mode
Start interactive mode
Start interactive mode
Start interactive mode
Start interactive mode
Quick test command
Quick test command
Quick test command
Quick test command
Quick test command
Temporarily run the selected model
Temporarily run the selected model
Temporarily run the selected model
Temporarily run the selected model
Temporarily run the selected model
Enable debug logs
Enable debug logs
Enable debug logs
Enable debug logs
Enable debug logs
Start interactive mode
Start interactive mode
Start interactive mode
Start interactive mode
Start interactive mode
Quick test command
Quick test command
Quick test command
Quick test command
Quick test command
Temporarily run the selected model
Temporarily run the selected model
Temporarily run the selected model
Temporarily run the selected model
Temporarily run the selected model
Enable debug logs
Enable debug logs
Enable debug logs
Enable debug logs
Enable debug logs
Skills
Extend Codex CLI with Open-Source AI Agent Skills
Codex skills are reusable packages of instructions, workflows, scripts, and reference files that extend AI agent capabilities across recurring tasks. Explore skills for coding, deployment, testing, documents, creative work, and other workflows without repeating the same instructions in every session. Review each skill's source, required tools, and permissions before using it.
Browse this multilingual repository for categorized Codex skill links, usage notes, source references, and installation details.
Troubleshooting