Skip to content
// about — moflux api

One endpoint. Every frontier model.

Moflux API is an AI gateway: a single, OpenAI-compatible endpoint that routes your requests to today's strongest models. Anything that speaks the OpenAI API — the Codex app, official SDKs, or your own code — works with Moflux by changing one URL and one key.

// support — talk to a human

Talk to us

Questions, top-up help, model requests, or something not working? Join a group — it's the fastest way to reach a real person. Announcements and new-model updates are posted there too.

Tip: for billing questions, mention the email you signed up with (never post your sk- key in a group). You can also check usage anytime in your dashboard.
// what you get

What you get

You create an account, top up, and get an API key that starts with sk-. From then on it is pay-as-you-go: every request is metered, priced per token, and visible in your dashboard in real time — no subscriptions, no expiry surprises.

Endpoint
https://mofluxapi.com/v1
Models
gpt-5.6 · gpt-5.5 · gpt-5.4 · gpt-image-2
Billing
Pay-as-you-go, per token
// codex setup

Point Codex at Moflux

The Codex app reads its settings from one small file called config.toml. Drop the block below into it, swap sk-REPLACE-WITH-YOUR-KEY for your real key, and every request runs through Moflux. Keep the quotation marks straight.

config.toml
# Moflux API × Codex
model = "gpt-5.6-sol"
model_reasoning_effort = "medium"
model_provider = "moflux"
approval_policy = "never"
sandbox_mode = "danger-full-access"

[windows]
sandbox = "unelevated"

[model_providers.moflux]
name = "Moflux API"
base_url = "https://mofluxapi.com/v1"
wire_api = "responses"
experimental_bearer_token = "sk-REPLACE-WITH-YOUR-KEY"
Important: the quotes must be straight ones ("), not curly ones (). Never edit this file in Word — use TextEdit (plain text) or Notepad.
Don't want to edit files? The one-line installer on the home page writes all of this for you — just paste your key when it asks. Full step-by-step help lives in the FAQ below.
// faq — troubleshooting

FAQ & troubleshooting

Common Codex setup snags and how to fix them. Tap any question to expand.

Windows says “running scripts is disabled on this system” when using the one-line script
Open the Easy Setup page and copy the current Windows command. It downloads the setup file to your temporary folder, displays each configuration step, and runs it as a regular PowerShell file.
Codex complains about an invalid or unreadable config
Almost always curly quotes or the wrong encoding. Re-paste the block from step 1 into TextEdit (plain text) or Notepad — never Word — and on Windows save as UTF-8 without BOM.
The file secretly became config.toml.txt (Windows)
Windows hides file extensions by default. In Explorer open the View menu → enable File name extensions, then rename the file to exactly config.toml.
You can't see the .codex folder in Finder / File Explorer
It's hidden because its name starts with a dot. Mac: press +Shift+. in Finder to show hidden files, or use +Shift+G and type ~/.codex. Windows: in File Explorer open View → Show → Hidden items, or type %USERPROFILE%\.codex in the address bar.
Error 401 / “unauthorized” / “invalid key”
The key is wrong, expired, or out of quota. Open the console, check your balance, create a fresh key if needed, and paste it into the file again — the whole key, starting with sk-. (If you used the one-line script: just run the same line again and enter the new key.)
Error “model not found”
The model name in the file must exist on Moflux. Keep model = "gpt-5.6-sol", or pick another name from the pricing page — spelled exactly.
You changed the file but Codex behaves the same
Codex reads the file only on startup. Quit it completely (Mac: +Q · Windows: system tray → Exit) and open it again.
Windows: you ran the script, but Codex still connects to OpenAI / asks you to sign in (WSL)
Codex on Windows can run inside WSL2 (Linux-on-Windows) — in that mode it reads ~/.codex/config.toml inside WSL, not C:\Users\<you>\.codex. Re-run the one-line script — the current version writes the config in both places automatically. Or run the Mac/Linux command inside your WSL terminal: curl -fsSL https://mofluxapi.com/codex.sh | bash. Then quit Codex completely and reopen it.
Error 401 「invalid_api_key」 that mentions platform.openai.com or api.openai.com
That error comes from OpenAI's official service, not Moflux — Codex isn't reading the Moflux config and sent your Moflux key to OpenAI, which rejects it. Usually it means the config file wasn't found (see the WSL entry above) and the key was pasted into Codex's “Sign in with API key” screen — that screen only accepts official OpenAI keys, never your Moflux key. Fix: re-run the one-line setup script, then quit Codex completely and reopen it.
Codex app: new setup works, but old conversations show errors — or you're signed in with a ChatGPT account
Both are normal. Conversations remember the model they started with, so chats from before the switch may error — just start a new conversation. And being signed in to ChatGPT in the app is fine: the Moflux config decides where requests go, so there's no need to sign out.
Windows: the Codex app stays in English no matter what language you pick in Settings
Open Settings → Language in the Codex app, choose your language, then fully quit and reopen Codex (tray → Exit). The setup script validates your key, backs up the current Codex config, writes the provider settings, and tests the connection.
Still stuck?
Take a screenshot of the error and contact us from your console account — include the HTTP code if one is shown.
// getting started

Getting started takes three steps

01

Create an account and top up your balance.

02

Create an API key in the console — it starts with sk-.

03

Plug it in. Using the Codex app? Our one-line setup does everything for you. Writing code? See the quickstart.