20128 and endpoints below are examples reported by 9Router documentation/CLI materials, but may vary by version or deployment. Confirm your local startup output and current official docs before relying on them.1. Check whether 9Router is running
Open PowerShell. First try the health endpoint for your current local installation:
curl.exe -i http://localhost:20128/health
If it fails, check whether anything is listening on the example port:
netstat -ano | findstr :20128
- Connection refused / no response: start or restart the service, then check its startup logs and configured port.
- A process is listening: confirm it is the expected 9Router process before changing anything.
- Health path returns 404: verify the health endpoint supported by your installed version; a 404 does not by itself prove the service is down.
2. Check authentication and model listing
Use a real key only in your local terminal. Do not share the command output if it includes secrets.
$env:ROUTER_API_KEY = "YOUR_9ROUTER_API_KEY" curl.exe -i http://localhost:20128/v1/models -H "Authorization: Bearer $env:ROUTER_API_KEY"
- 200: inspect the response and choose a model ID that is actually listed.
- 401: re-check the API key, authorization header, and whether you are calling the intended instance.
- 404: confirm the base URL and API route supported by your version.
- Connection error: return to Step 1 and verify host, port, and service status.
3. Use an available model ID
Do not copy a model ID from an old tutorial and assume it is still available. Copy the exact ID returned by your own model list, including any provider prefix. If the model is listed but requests fail, continue to the provider check.
4. Check provider credentials, quotas, and upstream status
- Confirm the provider is enabled and its credentials have not expired.
- Check provider billing, usage limits, and rate-limit reset information.
- For OAuth-based providers, re-authenticate if the token has expired.
- Record the upstream status code and redacted error text.
5. Confirm the client endpoint
Different clients have different endpoint requirements. CLI tools may support a local endpoint, while Cursor can require a reachable cloud or public endpoint depending on the current integration flow. Do not apply localhost instructions to every client.
Read the Cursor checklist → · Read the Claude Code checklist →
6. Test a minimal chat request
Only after the service, key, and model ID are confirmed, try a small request. Confirm the route and payload shape against your version’s API documentation.
$body = @{
model = "YOUR_AVAILABLE_MODEL_ID"
messages = @(
@{ role = "user"; content = "Reply with OK" }
)
} | ConvertTo-Json -Depth 5
curl.exe -i http://localhost:20128/v1/chat/completions `
-H "Authorization: Bearer $env:ROUTER_API_KEY" `
-H "Content-Type: application/json" `
-d $body7. If the problem remains unresolved
- Record your 9Router version, operating system, client name/version, endpoint type, HTTP status, and a short redacted error excerpt.
- Remove API keys, bearer tokens, cookies, email addresses, private IPs if not needed, and other sensitive values.
- Search existing GitHub issues or consult the current official docs before opening a new issue.
Official references
9Router docs ↗ · GitHub repository and issues ↗
This independent guide is not affiliated with 9Router. Commands are examples and should be verified in a clean test environment before publication.