Cursor: what "unification API is unreachable" actually means

You did not get a model error. You did not get a 401. You got a message saying the unification API is unreachable, and it appeared before anything you typed had a chance to reach a model.

That timing is the whole diagnosis. The unification layer is the piece Cursor puts between your editor and whichever model is answering, and it is what lets one editor talk to several vendors with one interface. When it cannot be reached, the request never becomes a model call. So every fix that targets your API key, your base URL, or your model ID is aimed at a stage the request never got to.

You need a key before the code below runs. Create an account, generate a key, and copy the base URL (https://aicomp.ai/v1). Create one free →
Check current rates → Free to sign up · $1 minimum top-up · No prepayment

Rule out the network before you touch the settings

Run the endpoint check from the same machine and the same shell you launch Cursor from. If Cursor was started from a terminal with proxy variables set, that is the environment it inherited.

Don't have an account yet? You need an API key from the gateway before the steps below will work — how the discount works and what you take on. Create one free → (no prepay, $1 minimum top-up)
# Does the endpoint answer at all from this machine?
curl -s -o /dev/null -w "%{http_code} in %{time_total}s\n" \
  --max-time 15 https://aicomp.ai/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY"

Read the two numbers, not just the code:

The three causes that actually show up

Corporate TLS interception

The most common cause on managed machines, and the least obvious. A proxy that rewrites TLS certificates will let curl through, curl is often configured with the corporate CA bundle, while an editor that ships its own trust store refuses the connection. Same URL, same machine, two different outcomes.

Test it by asking curl to use the system store rather than its own:

curl -s -o /dev/null -w "%{http_code}\n" --max-time 15 \
  https://aicomp.ai/v1/models -H "Authorization: Bearer $OPENAI_API_KEY"
env | grep -iE "proxy|ssl_cert|curl_ca|node_extra_ca" || echo "no proxy/CA vars set"

If the proxy variables are set in that shell and not in the environment Cursor was launched from, that is your mismatch. Launching the editor from the same terminal is often the whole fix.

A proxy that only covers part of the path

Some setups route api.openai.com or api.anthropic.com through an allowlist and drop everything else. A gateway hostname that is not on it fails quietly at the connection stage, which presents exactly as "unreachable" rather than as a denial.

Confirm by checking whether the failure is hostname-specific:

for h in https://aicomp.ai/v1/models https://api.openai.com/v1/models; do
  printf "%-40s " "$h"
  curl -s -o /dev/null -w "%{http_code}\n" --max-time 12 "$h" \
    -H "Authorization: Bearer $OPENAI_API_KEY" || echo "failed"
done

One answering and the other timing out is an allowlist, not an outage.

The layer itself being down

It happens. Cursor's unification layer is a service with its own status, and while it is down every model is unreachable through the editor (including models that respond fine when you call them directly).

Distinguish it in one step: call the same model with the same key from outside Cursor. If the direct call succeeds and the editor still reports unreachable, the endpoint and the key are both fine and you are waiting on Cursor's side. Changing your configuration during that window accomplishes nothing, and it is how people end up with a working setup they have edited into a broken one.

What this error is not

It is worth being explicit, because the message sounds like an endpoint problem and sends people to the endpoint settings:

If you are seeing one of those instead, this page is not the one you want, the fix belongs to whichever field the status code points at.

Where a custom endpoint still helps

Once the connection works, the reason to route through a gateway rather than a vendor key is that the failure becomes visible. One endpoint means one place to look: a request log that shows whether calls arrived, which model served them, and what they cost. When something upstream has a bad hour, you can see it in your own log instead of inferring it from an editor error message.

Get API access

FAQ

FAQ

Why does it say unreachable instead of an error code?

Because the failure happened before a response existed. An error code is something the server sends back; this message is the client reporting that it never established the connection. That is why there is no status to look up and no field to fix. The diagnostic information you want is on the network, not in the response.

Can I use a custom endpoint while this is happening?

Changing the endpoint will not fix a connection your machine cannot make. If curl cannot reach any external host from the environment Cursor runs in, no endpoint helps. Establish reachability first, then configure. Otherwise you will attribute a network failure to a setting and change the wrong thing.

Why does curl work when Cursor does not?

Almost always a trust store or a proxy variable. curl reads its CA bundle and the shell's proxy settings; an editor launched from a desktop environment may read neither. Test from the exact shell you launch Cursor from, and set NODE_EXTRA_CA_CERTS to your corporate CA if TLS interception is in play.

Is this the same as a rate limit?

No. A rate limit is a 429 (the server answered and told you to slow down). Unreachable means no answer arrived. The two need opposite responses: a 429 means reduce concurrency, while unreachable means fix connectivity before changing anything about how you send requests.

How do I know when it is Cursor's side and not mine?

Call the same model with the same key from outside the editor. If the direct call succeeds and Cursor still reports unreachable, your configuration is not the variable. Nothing you change in the settings will move it, and the useful action is to stop editing and wait.

Related

Get API access

Rate cards: GPT and Claude