APIMaster List Models
The 30-second node that explains your mystery 400
- config
- models
Every node in this space has a dropdown of model ids, and every dropdown goes stale. A gateway adds a model, retires one, renames one - and your workflow that worked last week starts returning 400 or 404 for reasons that look like the node's fault but aren't. APIMaster List Models exists so you can answer that question in 30 seconds instead of filing a bug.
It's the awkward node in the pack: no pixels, no prompt, no money spent. It's also the one I'd wire up first when anything goes wrong.
How it works
The node does a single GET {base_url}/models with your key, pulls the id field off each entry, filters the list, and prints it - both to the node's own on-canvas text display and to the console. It also returns the list as a newline-joined STRING.
Two mechanics worth knowing. It's flagged as an output node, which in ComfyUI means it always runs when you hit Queue, whether or not anything is wired downstream. That's why you can drop it on an empty canvas next to a Config node, hit Queue, and read the answer without building a workflow around it. And it's cheap: a GET with a 30-second client-side timeout, no generation, no token spend.
The two inputs, one output
config is required - it takes the APIMASTER_CONFIG from an APIMaster Config node, which is what carries your endpoint and key.
filter is the useful bit and it's subtler than it looks: it's a plain string, not a dropdown, and it's matched as a case-insensitive substring against each id. Default is image. So vid returns the video models, and a model-specific fragment like kling narrows to those.
Which leads to the one genuine gotcha: because it's a substring match, image only finds ids that literally contain "image". Plenty don't - midjourney-v8.2 and midjourney-niji-7 don't have the word in them, and neither does anything else named after a brand. So if the filter returns nothing, clear the field: an empty filter skips the filtering step entirely and lists everything the endpoint serves. "(no models matched)" means your filter missed, not that the gateway is empty.
The output is models: a STRING of ids, one per line.
Install
Manager: search APIMaster, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/apimaster-ai/ComfyUI-APIMaster
Nothing to pip install; the pack's dependency list is empty on purpose. Set your key in the environment before starting ComfyUI:
export APIMASTER_API_KEY=sk-...
The README also points at a terminal equivalent if you'd rather not open ComfyUI for this:
npx @apimaster/cli models --kind image
When to actually reach for it
Three cases. Model drift - the id in your workflow is six weeks old and now 400s; run this, copy the real id, paste it into model_override on the generator node. Checking your endpoint - it's the cheapest possible test of base_url and key together, and because it's a pure GET it costs nothing, which makes it a much better smoke test than queueing a 4k generation. Third-party gateways - if you've pointed base_url at some other OpenAI-compatible service, this list is exactly what that service is willing to serve, which is the list you must pick model_override values from.
If it fails
HTTP 401 is the key - most often set in a shell that isn't the one ComfyUI was launched from. HTTP 404 is almost always a base_url missing its /v1 suffix. And if you've pointed this at a non-APIMaster gateway, remember that a service can implement image generation perfectly well while never implementing /models; an error here doesn't necessarily mean the endpoint is broken, it means this particular node has nothing to call.
One honest caveat about the whole pack, since this node is where you'll be poking at its plumbing: this pack has almost no community history yet - no threads, no track record, no one who's already hit the weird case for you. The upside is that it's small and readable, and a node that makes one unauthenticated-by-design GET is about the safest thing in it to run first.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| config | APIMASTER_CONFIG | — | |
| filter | STRING | image | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| models | STRING | — |