How to connect Codex to Higgsfield.ai
Connect local Codex CLI to Higgsfield with the official CLI and skills, then verify one complete image generation.
Free guide · Updated
Based on official documentation · Checked
Ask your agent
Copy the prompt and paste it into your assistant.
Quick answer
Connect a local Codex CLI session to Higgsfield by installing the official Higgsfield CLI and agent skills, signing in to your Higgsfield account, and asking Codex to run a generation task. The skills tell the agent how to use the CLI; the CLI performs authenticated requests. Installing skills alone does not sign you in.
This guide covers the official CLI and skills route for local Codex sessions. Use the source links below for installation alternatives and the current model catalog.
Before you start
You need a working local Codex CLI installation, Node.js and npm for the installation route below, and access to the intended Higgsfield account. You may need workspace credits for generation. Check the account and selected model before submitting a job; do not assume your Codex subscription pays for Higgsfield usage.
Start in the project where you want Codex to use Higgsfield. Keep account tokens out of prompts, repositories and screenshots.
Install the Higgsfield CLI
The official CLI offers an npm installation route:
npm install -g @higgsfield/cliThen sign in interactively:
higgsfield auth loginComplete the sign-in flow with the account you intend to use. If login opens a browser, finish authorization there instead of pasting credentials into your agent conversation. See the official CLI installation and quickstart for supported alternatives and current command syntax.
Add the official agent skills
From your project terminal, run:
npx skills add higgsfield-ai/skillsSelect Codex if the installer asks which agent to configure. Review the installation scope before accepting. Keep the installer's reported destination: do not copy a Claude-specific skills path into Codex settings.
Start a fresh Codex CLI session so it can discover the installed skills. Ask it to identify the Higgsfield generation skill and explain the available workflow before submitting a paid generation. This checks discovery; it does not yet prove that generation works.
Verify the full connection from Codex
Use one small, neutral request, for example:
Use the installed Higgsfield generation skill to create one image of a simple blue ceramic cup on a plain background. Before submitting, confirm the model and expected cost. Return the completed result.
Submit the request from Codex so the agent uses the installed skill and CLI. Running a command in a separate terminal does not check whether Codex can discover the skill.
Open the returned image. If the job is still running, inspect that job before submitting another request that could spend more credits.
If the connection stops working after an update, include the client and CLI versions when reporting the problem. Remove credentials from any shared logs.
Troubleshooting
The command is unavailable. Confirm installation completed and that the terminal launching Codex can locate the Higgsfield executable. A separate terminal with a different environment may behave differently.
The skill is missing. Check the installer's selected client and scope, then start a fresh Codex session. Do not solve this by replacing unrelated skills directories.
Authentication fails. The CLI documentation identifies expired or missing authentication as reasons to repeat the login flow. Confirm the intended account before retrying a generation.
The model is unavailable. Inspect the current model catalog rather than substituting an invented model name. Availability and credit requirements can change.
A job has no accessible result. Preserve its identifier and inspect the existing job's state before submitting another chargeable request. A timeout alone does not establish failure.
Is MCP required?
The CLI-and-skills route described here does not require adding an MCP server. Higgsfield also documents an MCP connection, while Codex documents support for external MCP tools. Those two facts alone do not establish that a particular authentication flow works between them. For this guide, use the documented CLI and skills setup above.
Disconnect and clean up
Remove only the skills and CLI installation created for your test. Consult the installed CLI's help for the current logout command and use the account's access controls to revoke the applicable authorization. Do not delete a shared skills directory or another project's connection.
Close temporary login tabs and stop any helper processes created during setup after confirming they are no longer needed. Keep an output only if you need it as evidence or intend to use it.
Sources
Read the primary material
- Higgsfield IntegrationsHiggsfield
- Higgsfield SkillsHiggsfield AI
- Higgsfield CliHiggsfield AI