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.

1

Install Codex CLI

Choose an install method for your system, then run the command below.

Official install script

curl -fsSL https://chatgpt.com/codex/install.sh | sh
2

Verify Codex CLI

Confirm the codex command is available before configuring the Flaq provider.

Verify installation

codex --version

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.

Default GPT 5.6 model 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.

1

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.toml
model = "gpt-5.6-sol" model_provider = "flaq" [model_providers.flaq]name = "flaq gpt"base_url = "https://api.flaq.ai/codex-api/v1"wire_api = "responses"requires_openai_auth = true
2

Set 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

export OPENAI_API_KEY="Your_Flaq_Api_Key"

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

codex

Quick test command

codex "What is 2+2?"

Temporarily run the selected model

codex --model gpt-5.6-sol

Enable debug logs

DEBUG=true codex "test"

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.

Awesome Codex Skills

Browse this multilingual repository for categorized Codex skill links, usage notes, source references, and installation details.

Troubleshooting

OpenAI Codex FAQ

Using this guide's setup may significantly increase token usage.