EN ▾
Get API key

OpenRouter API Base URL and Key for Our Alternative

The base URL that replaces your openrouter api base url here is https://api.openrouterapi.top/v1, used with your own key and the model ID uncensored. This page shows where each value goes and how to confirm it works.

Updated

A glowing path leading from an address bar to a key and a model cube, showing a base URL swap

Key points

  1. Base URL: https://api.openrouterapi.top/v1. Model ID: uncensored. Auth: Authorization: Bearer <key>.
  2. Create the key after signing up with Google or with email and password.
  3. A one-click trial of $0.50 is available on the key page, valid for 7 days, no card.
  4. Test with GET /v1/models first; if it answers, the URL and key are right.

The three values to swap

An application that talks to an OpenAI-style service stores three settings, and each one needs to change when you move to a different provider. People often change the first two and forget the third.

  1. Base URL: https://api.openrouterapi.top/v1
  2. API key: a key created for this service. A key from another provider will not work here, and this key will not work there.
  3. Model ID: uncensored. A model string copied from another service, especially one with a vendor prefix, will fail.

Authentication is the usual HTTP header, Authorization: Bearer YOUR_API_KEY. The two routes are POST /v1/chat/completions and GET /v1/models. Because the base URL ends in /v1, a client that is configured with it will call https://api.openrouterapi.top/v1/chat/completions on its own.

The service is a hosted, OpenAI-compatible text API with one open-weight model, run by an independent provider. It is not a router across vendors and not an official API of any model maker, so there is nothing else to pick from the model field.

Get the API key

Open the API key page and sign up with Google or with an email and a password. After sign-up the page shows a button that adds trial credit of $0.50 to your account in one click. The credit is valid for 7 days, needs no card and is limited to one claim per person. Copy the key from the same page and keep it out of source control: put it in an environment variable or your secret manager and read it at startup.

The trial key runs with lower limits than a paid key: 2 concurrent requests and 60 requests per minute. A full key has 8 concurrent requests and 300 requests per minute. Top-ups are any whole amount from $20 to $500. The pricing page has the bonus table: 5% extra from $50, 10% from $100, 15% from $200.

Check the connection in one minute

Before touching your application, send two requests from a terminal. The first lists models; the second makes a real chat call.

export API_KEY="paste-your-key-here"

curl -s https://api.openrouterapi.top/v1/models   -H "Authorization: Bearer $API_KEY"

curl -s https://api.openrouterapi.top/v1/chat/completions   -H "Authorization: Bearer $API_KEY"   -H "Content-Type: application/json"   -d '{"model":"uncensored","messages":[{"role":"user","content":"Say hi in five words."}],"max_tokens":20}'

A JSON body with a choices array means everything is in place. Inspect the response headers with curl -i if you want to see X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency. The balance header is handy for a quick spending check from scripts.

Where the URL goes in common setups

Python, official SDK

from openai import OpenAI

client = OpenAI(
    base_url="https://api.openrouterapi.top/v1",
    api_key="YOUR_API_KEY",
)

r = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Name three uses of a base URL."}],
)
print(r.choices[0].message.content)

Node, official SDK

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.openrouterapi.top/v1",
  apiKey: process.env.API_KEY,
});

const r = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Name three uses of a base URL." }],
});
console.log(r.choices[0].message.content);

Environment variables

Many OpenAI-compatible tools read the same two variables. The official SDKs are commonly set up to read them, but check the docs for your version before depending on it.

export OPENAI_BASE_URL="https://api.openrouterapi.top/v1"
export OPENAI_API_KEY="YOUR_API_KEY"
# the model is still set in your app or tool: uncensored

GUI clients and chat front ends

In applications with a settings screen, look for a field called API URL, endpoint, host or base URL, usually in an OpenAI-compatible or custom provider section. Paste the base URL, paste the key, and type uncensored as the model. Some tools want the base URL without /v1 and add it themselves; if the first attempt fails with a not-found error, try removing or adding that segment.

Errors and what they usually mean

SymptomLikely causeFix
Authentication errorWrong key, extra space, or a key from another providerCopy the key again from the key page
Not foundDuplicate /v1/v1 or missing /v1, or a wrong model stringUse exactly the base URL above and model uncensored
429 with rate_limitedToo many requests per minuteSlow down or add a queue
429 with concurrencyToo many requests running at onceLimit parallel calls to 8 (2 on trial)
429 with Retry-After: 5Temporary overloadWait five seconds and retry
Body too largeRequest above 8 MBTrim history or attachments

A streamed response keeps its concurrency slot until the stream finishes. If you start streams and never read them to the end, you will see concurrency errors even at low traffic. Failed or refused requests are not charged, so retrying a failed call does not cost you twice.

Things that differ from a multi-model router

Moving off a router changes a few assumptions. You will not find a long list of model names, so configuration fields for fallbacks, provider order and routing preferences should be emptied. The model list endpoint exists for compatibility, and a client that populates a dropdown from it will show the one model.

The context window is 100,000 tokens, counting prompt plus completion, and max_tokens is optional. The API handles text only, so any feature that sends images or asks for embeddings must stay with another service. Streaming, tool calling and JSON mode are supported, and the usual sampling controls, including temperature, top_p, stop and seed, are passed through. The docs page walks through a first request in five minutes if you want more examples. Prompts are not used for training.

One practical habit helps during a migration: keep the old and new settings side by side in a config file, switch with a single flag, and compare a handful of real prompts through both before you retire the old one. Differences in tone, length and refusals show up quickly that way, and you can tune the system prompt for the new model with real examples in front of you.

Keeping the key safe

A base URL is public information; the key is not. Anyone who holds it can spend your credit. Store it in an environment variable or a secret manager, never in a front-end bundle, a public repository or a mobile app that ships to users. If a page in the browser needs to call the model, put a small server of your own in between and let that server add the header.

If a key leaks, create a new one and replace it everywhere. Watch X-Balance-USD after a suspicious day: a balance that drops faster than your own traffic explains is the signal to rotate. When several services share one account, give each its own configuration entry so that a change in one place does not break the others, and keep the base URL in a single shared setting rather than copying the string across files. That way a future change touches one line.

A quick budget estimate

Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit with no subscription; credit never expires. A typical test call with 3,000 input tokens and 1,000 output tokens costs 3,000 / 1,000,000 x $0.15 = $0.00045 for input plus 1,000 / 1,000,000 x $0.50 = $0.0005 for output, which totals $0.00095. The $0.50 trial credit therefore covers about 526 calls of that size (0.50 / 0.00095), plenty to verify that your base URL and key work in every environment you use: local, staging and production.

Questions and answers

What is the base URL?

https://api.openrouterapi.top/v1. Use it as the base URL in any OpenAI-compatible client, with your key as a Bearer token and uncensored as the model.

Can I keep my old key?

No. Each provider issues its own keys. Create a new one on the API key page after signing up.

Do I add /chat/completions to the URL?

Only if your tool asks for the full route. SDKs and most settings screens expect the base URL ending in /v1 and add the route themselves.

How do I check my balance?

Each response includes an X-Balance-USD header with the remaining credit, so you can read it from code or from curl -i.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API keyRead the docs

$0.50trial credit