Setup tutorial by Sriram

OpenAI Codex Installation and Configuration Guide

Follow the setup tutorial below, then use the final checklist before relying on it in a real workflow.

  • Practical setup
  • Beginner-readable
  • Business workflow focus
Work with Sriram

Turn your business process into a working AI assistant.

Send your requirement and get a tailored AI automation blueprint built for your business. No fluff, just what actually works.

Get this built for my business

Setup tutorial

OpenAI Codex Installation and Configuration Guide

A clean setup flow for installing Codex, adding external LLM provider access, storing credentials safely, and verifying the workflow before you use it for real projects.

What this setup gives you

One Codex workspace with repeatable model routing.

Before you start

Collect the setup details first. It prevents half-finished configuration work and gives Codex the exact inputs it needs to update files correctly.

Operating systemWindows 10/11 and macOS use different secure credential stores and startup locations.
Codex accessYou need a working Codex installation or account path before adding extra providers.
Provider API keyFor MiniMax or another external LLM provider, collect the API key from the provider dashboard.
Provider base URLThe connection must know the endpoint and expected wire format.
Model namesUse the exact model IDs you want exposed in Codex so routing can select them predictably.
Project instructionsAGENTS.md documents when Codex should use OpenAI models and when it should route work to the external provider.

1. Install Codex

  1. Install OpenAI Codex using the official method available for your environment.
  2. Open a new terminal or app session so the command path refreshes cleanly.
  3. Start Codex in an empty test folder or a small project, then ask it a basic question.
  4. Confirm Codex can read local files only when you intentionally provide a workspace.
  5. Keep the base OpenAI setup working before adding MiniMax or any other provider.

Prompt to use: Check whether Codex is installed correctly on this machine, tell me the command or app path you found, and run a tiny smoke test without changing any files.

2. Configure provider access

After Codex works on its own, add the external provider configuration. Keep it small and readable: provider name, endpoint, wire format, model IDs, and the secure secret reference.

Provider nameUse a clear label such as MiniMax, OpenRouter, Anthropic-compatible provider, or internal gateway.
Wire formatDocument whether the provider exposes OpenAI-compatible responses, OpenAI-compatible chat, or Anthropic-compatible messages.
Base URLUse the endpoint root supplied by the provider or gateway. Do not hard-code keys in this value.
Model catalogList exact model IDs, readable display names, context length notes, and tool or image support.
Secret referenceUse a named keychain entry or environment variable reference instead of the secret itself.

3. Store credentials safely

Do not paste API keys into AGENTS.md, README files, provider catalogs, screenshots, or chat transcripts. Store the key in the operating system credential store and reference it indirectly.

  • Windows 10/11: Use Windows Credential Manager or a secure secret store exposed to the shell when needed.
  • macOS 13+: Use Keychain Access or the security command-line interface to store and retrieve the provider key.
  • Any platform: Use environment variables only when injected at runtime and never committed to the repository.

Prompt to use: Create a secure local credential entry for my provider API key, then update the Codex provider configuration so it references the secret by name instead of storing the key in a file.

4. Connect the LLM provider

  1. Add the provider entry with the base URL, wire format, model list, and secret reference.
  2. Run a direct test against one small model request, such as a one-sentence response.
  3. If the request fails, check the base URL, API key, model ID, and wire format before changing anything else.
  4. Once direct access works, add routing instructions in AGENTS.md.
  5. Run a second test that asks Codex to explain which model it selected and why.
Install checkCodex starts and responds without provider changes.
Credential checkThe key can be loaded from the secure store and is not visible in project files.
Provider checkThe external model returns a small response from its configured endpoint.
Routing checkCodex follows AGENTS.md and chooses the intended model class for the task.

5. Add routing instructions

Routing instructions make the setup usable day to day. Keep them short and operational: which model should plan, which model should execute routine work, which model should handle long-context tasks, and when Codex should stay on OpenAI models.

Use OpenAI Codex models for high-level planning, architecture judgment, security-sensitive review, and final decisions. Use MiniMax or the configured external LLM for low-risk implementation, boilerplate, documentation drafts, unit tests, lint fixes, and long-context routine work when it is available. Never expose API keys in files or logs.

Final setup checklist

  • Codex opens and answers a basic request.
  • You have the API key, base URL, wire format, and model IDs.
  • The API key is saved in Credential Manager, Keychain, or another secure runtime store.
  • The provider catalog references the provider without exposing secrets.
  • A direct model smoke test returns a response.
  • AGENTS.md explains when to use OpenAI models and when to use the external LLM.
  • A test task uses the intended model path and leaves no secret in project files.

Next step

Want this connected to your real business workflows?

The guide helps you set up the tool. The bigger advantage comes from knowing which automations are worth building for your business.

Sriram Varadarajan Sriram VaradarajanReplies personally

Want this connected to your real business workflows?

The guide helps you set up the tool. The bigger advantage comes from knowing which automations are worth building for your business.

Map my automation