A familiar command name can select a different program
Microsoft documents the Windows PowerShell aliases, while the curl manual documents native options. Modern PowerShell and customized sessions can resolve the same command name differently. Do not assume that every Windows terminal has the alias or that native curl is installed in every environment. This question concerns command discovery, not the later meaning of a 401 response, model availability or the amount of account credit.
What to do next
- 01
Inspect resolution without including a secret
Run Get-Command curl and, when useful, Get-Command curl.exe to distinguish an alias, function and installed application. Read $PSVersionTable.PSVersion for the shell version. These checks need no account key and do not create media. A parameter-binding error pointing to a cmdlet is different evidence from a native curl exit code or an HTTP response. If discovery shows a customized wrapper, inspect its trusted configuration before assuming a standard command path.
- 02
Choose one command language consistently
If using an installed native curl.exe, invoke it explicitly and check its --version output; apply the native manual's options. If choosing Invoke-WebRequest, use that cmdlet's documented parameters, including a header dictionary rather than a native curl header string. Windows PowerShell's current documentation also recommends -UseBasicParsing to avoid its HTML script-parsing behavior. Do not mix a cmdlet's response object with native-output assumptions, or remove aliases globally simply to make one copied example work.
- 03
End this diagnostic at a read-only boundary
Confirm local execution first with a harmless public target or approved local fixture. For the authenticated AISwapLab connection, follow the existing server-side first-request guide and its documented models read, keeping credentials in private configuration. Do not paste a working key into a reusable support transcript. A successful command invocation can still return an authentication or configuration error; investigate that separate status rather than switching to a paid creation endpoint as a test.
A concrete example
Illustrative failure: a developer pastes a native curl -H example into a Windows PowerShell session where curl resolves to Invoke-WebRequest. PowerShell rejects the header argument locally. Explicitly selecting the intended installed curl.exe resolves that syntax mismatch; it does not automatically validate the key or approve generation. The scenario describes a possible environment, not a universal rule for all PowerShell versions.
Before you call it ready
- Command discovery identifies the executable, alias or wrapper actually used.
- Header syntax and output handling belong to that chosen implementation.
- No paid API operation or secret-bearing public transcript is used for shell diagnosis.
When to stop or choose another method
Stop changing scopes, credit caps or account keys to fix a local parameter error. Establish the shell command first, then handle any real HTTP response under the ordinary read-only API connection procedure.
