Two ways to run on a subscription you already pay for.
Neither route asks you for an API key. One of them is a supported integration and one of them is interop; the difference matters.
There are two routes and they have different risk profiles. The first is to select Claude Code or Codex as the engine, which spawns that vendor's own CLI as a local process using the login it already has; nothing is proxied and Lucid Train never sees a credential. The second is to sign the bundled engine in with Claude or with ChatGPT directly, importing an existing Claude Code or Codex CLI login or running the OAuth flow in your browser, after which the bundled engine runs on that subscription instead of a pay-per-token key. The second route talks to undocumented endpoints and is reverse-engineered interop subject to the vendors' terms.
Route one: drive the vendor's own CLI
This is the conservative option and the one to prefer if you have a choice. Selecting Claude Code, Codex, Cursor CLI or OpenCode as the engine spawns that program from your PATH and speaks its protocol. You are running the vendor's client, doing what the vendor built it to do, and Lucid Train is the thing rendering its output and gating its edits. Nothing about your relationship with that vendor changes.
What that means for the credential
On this route Lucid Train never sees the credential. It looks for the binary on PATH, spawns it as a child process, and speaks its protocol. Authentication is whatever that CLI already did when you signed into it, so the entitlement stays between you and the vendor and nothing is proxied, replayed or re-signed.
Route two: sign the bundled engine in
There is a second route, and it is worth being straight about what it is. The bundled engine can sign in with Claude or with ChatGPT directly, importing an existing Claude Code or Codex CLI login or running the OAuth flow itself, and then run on that subscription rather than on a pay-per-token key. This talks to endpoints the vendors do not document and that expect their own client identifiers. It is reverse-engineered interop, subject to Anthropic's and OpenAI's terms, and it is not officially supported or endorsed by either of them. It works today and could stop working whenever they change something.
Why route two exists at all
The bundled engine is the only one that can route different roles to different models, use the diagram tooling natively and connect a new Grafana instance. Running it on a key you pay per token for is a real cost when you already pay a subscription every month. That is the whole motivation, and it is why the option is there despite the caveat above rather than because the caveat does not apply.
It shares the token file on purpose
The ChatGPT route writes refreshed tokens back to the same auth.json the Codex CLI uses. Refresh tokens there are single-use, so two clients keeping separate copies would invalidate each other on the next refresh and you would be signed out of one at random. Sharing the file keeps both working, which is a small detail that prevents a confusing failure.
The option with no caveat at all
The bundled engine also runs against local Ollama models with no key, no account and no network, and against OpenRouter or any OpenAI-compatible endpoint with a key you own. If the terms question above matters to you or to your employer, those are the routes that raise no question, and local models raise none about data either.
The routes compared
| Drive the vendor CLI | Sign the bundled engine in | |
|---|---|---|
| Needs an API key | No | No |
| Lucid Train sees the credential | No | Yes, stored locally |
| Uses documented interfaces | Yes | No |
| Officially supported by the vendor | It is their own client | No |
| Model routing across roles | No | Yes |
| Can connect a new Grafana | No | Yes |
| Could break without warning | Unlikely | Yes |
Questions
Related
- Run Lucid Train on Claude CodeThe same binary you already run in a terminal, driven from a window that also has your diagrams, your dependency audit and your dashboards in it.
- Run Lucid Train on the Codex CLIJSON-RPC to a local app-server, and the only engine besides Claude Code that can also drive the design canvas.
- Run Lucid Train on the Cursor CLICursor's headless agent, with the diagram canvas and the approval gate wrapped around it.
- Run Lucid Train on OpenCodeThe open-source option, and the only engine that talks HTTP rather than stdio.
Last updated