⚙️ API Config
The boring node that points ComfyUI at your LM Studio server
- API_CONFIG
Every workflow in this pack starts here, even though this node does nothing on its own. ⚙️ API Config holds exactly two pieces of information - where your LM Studio server lives and what key to send - and bundles them into a single API_CONFIG object that 📡 LMStudio Request consumes. It's the "set it once and forget it" node of the pack, and the one most likely to be the culprit when a request fails before it even starts.
The two inputs that matter
- api_address - defaults to
http://127.0.0.1:1234/v1. That's LM Studio's Local Server address out of the box. You almost never need to touch it unless you changed the port in LM Studio's Server settings. - api_key - defaults to
lm-studio. This one trips people up, so here's the honest version: LM Studio's local server doesn't actually validate the key. It's there because the endpoint is OpenAI-compatible and that's the shape of the protocol, so the pack sendsAuthorization: Bearer lm-studioand nobody checks it. Leave it as is; don't go hunting for a real key.
Output is a single API_CONFIG object. Wire it into the api_config input of 📡 LMStudio Request and you're done with it.
Why it exists at all
The pack could hardcode 127.0.0.1:1234/v1 and save you a node. It doesn't, because the server address isn't guaranteed: you might run LM Studio on another machine on your network (then the address becomes something like http://192.168.1.20:1234/v1), or a different port, or you might point this whole pack at a different OpenAI-compatible local server later. Keeping it as a config node means the address lives in one place instead of being buried in a request node's settings.
Setup, the 30-second version
- Install the pack (ComfyUI Manager → search "LM Studio Tools", or
git clone https://github.com/Hazukiaoi/ComfyUI-LM_Studio_ToolsintoComfyUI/custom_nodes, then restart). - Load a model in LM Studio and switch to the Local Server tab. Make sure the server is actually running (it shows a status and the port - 1234 by default).
- Drop
⚙️ API Configon the canvas. Defaults are almost certainly fine.
The pack itself needs nothing else - its only Python dependency is requests, and it downloads no models. The "heavy lifting" all happens inside LM Studio.
When to suspect this node
If your 📡 LMStudio Request returns something like API Request Failed: Connection refused, check this node first, because it's the one place the address lives. Common failures:
- The address still says
http://127.0.0.1:1234/v1but your server is on a different port (LM Studio lets you change it in Server settings). - The server isn't running at all - the Local Server tab isn't "on."
- You're pointing at another machine and the IP is wrong.
There's no real troubleshooting deeper than that, because the node is about as dumb as a config node gets - and that's fine. In a pack where the fun happens in the Request node, this is the boring, necessary base layer. Set it, connect it, move on.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| api_address | STRING | http://127.0.0.1:1234/v1 | — |
| api_key | STRING | lm-studio | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| API_CONFIG | API_CONFIG | — |