# Why do I get ECONNRESET or "Connection reset by server" with the Unlid API?

ECONNRESET means the network connection between your machine and Unlid was cut, so your app never received an HTTP answer. The usual causes are a VPN, proxy or firewall dropping long-lived connections, or a long non-streaming request that sits silent until something on the way closes it; turning on streaming and testing without the VPN fixes most cases.

## Fixes, most likely first

1. **Use streaming** (`stream: true`). A non-streaming request sends nothing until the whole answer is ready, which can take a minute on a long reply; many proxies and some clients cut a connection that idle. Streaming sends data continuously.
2. **Try without the VPN or proxy**, or switch to another VPN server. Retries that come in waves, then stop, point to the network path.
3. **Raise the client's timeout** if it has one, to at least 180 seconds.
4. **Check the address**: the base URL is `https://api.unlid.ai/v1`.

## Was I charged?

Only if the request reached Unlid and the model finished it: the connection broke on the way back, after the work was done. If the request never reached Unlid, nothing was billed. The request log on your account page shows every request that arrived; send us an `x-unlid-trace-id` or the time and model if you want us to check.

## Test from the same machine

```
curl https://api.unlid.ai/v1/models -H "Authorization: Bearer ul-…"
```

If this fails too, the problem is between your machine and the internet, not in the app. If it works, compare the app's settings with its page under [Apps & clients](https://unlid.ai/docs/clients.md). Large tool lists are fine: there is no limit on the number of tools beyond the model's context window.

## Related questions

- [What does 504 upstream_stalled or upstream_timeout mean?](https://unlid.ai/answers/upstream-stalled-504.md)
- [Why does my Unlid API key return 401 invalid_api_key?](https://unlid.ai/answers/invalid-api-key-401.md)
- [Which uncensored models support tool calling (function calling)?](https://unlid.ai/answers/uncensored-models-with-tool-calling.md)

Something not covered? Ask in the support chat at the bottom right, or see the [FAQ](https://unlid.ai/faq.md) and the [API docs](https://unlid.ai/docs.md).
