Troubleshooting

Common issues and how to resolve them. When in doubt, run cos doctor — it checks config, connectivity, and your key in one shot.

Invalid API key

A rejected key returns INVALID_API_KEY. Confirm you pasted the full secret (carrier_sk_…) and that it is active (not revoked or disabled) in the Developer Portal, then log in again:

bash
cos login

Not logged in

Commands that need auth will tell you to sign in first. Run:

bash
cos login

API unreachable

If requests fail to connect, check reachability and your configured endpoint:

bash
cos doctor

A clean NETWORK_ERROR with the endpoint printed usually means the API is down or the URL is wrong.

Wrong endpoint

The CLI defaults to https://api.carrieros.ai/v1. Point it at a different API (for example a local instance) with --url:

bash
cos login --url http://localhost:5000/v1
Treat your secret key like a password. If it leaks, revoke it from the API keys page and run cos login with a new one — revocation is instant.
Still stuck? cos version reports the CLI and API versions, and Error Codes lists every code the API can return.