EN ▾
Get API key

OpenAI Compatible API: List Models with /v1/models

To openai compatible api list models, send a GET request to /v1/models with your bearer key. The response is a JSON list, and on this API it contains the model ID you pass in every other call: uncensored.

Updated

A catalogue drawer opening to show a single glowing card, illustrating a models list endpoint
Isometric glowing chat bubbles fed by a server tower, representing a Discord chat bot on an API

Key points

  • GET /v1/models returns the model IDs your key can use.
  • Use the ID exactly as listed; this API serves one model, uncensored.
  • Check credit with GET /v1/balance, the OpenAI-style credit_grants route, or the X-Balance-USD header.
  • A models call is a cheap health check for key and base URL.

The request

The base URL is https://api.uncensoredgpt.cc/v1. The models endpoint is the same path an OpenAI client calls when you run its list function. Authenticate with Authorization: Bearer YOUR_KEY.

curl https://api.uncensoredgpt.cc/v1/models \
  -H "Authorization: Bearer YOUR_KEY"

You get back JSON in the OpenAI list shape: an object field set to list and a data array. Each item has an id. Read that id and use it as the model value in your chat requests. Here the value to expect is uncensored.

The API serves one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. It is not an official vendor API and it is not a router, so the list is short on purpose.

List models in Python

With the official SDK the call is one line. Iterate the result to print every ID.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.uncensoredgpt.cc/v1",
    api_key="YOUR_KEY",
)

for m in client.models.list():
    print(m.id)

If this prints uncensored, your base URL, key and network path are all correct. This makes it the best first test of a new setup, because it costs nothing: a models call does not process tokens.

List models in Node

import OpenAI from "openai";

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

const page = await client.models.list();
for (const m of page.data) {
  console.log(m.id);
}

In a plain fetch call without the SDK, send the same bearer header and read (await r.json()).data. Either way the structure is identical to the OpenAI format, which is why tools that offer a "fetch models" button in their settings usually work against this endpoint without extra steps.

Why a tool says it cannot fetch models

Front ends such as SillyTavern, Open WebUI and editor plugins call GET /v1/models when you press a connect or refresh button. If that fails, work through these causes:

  • Base URL. It should end in /v1 and nothing more. Not /v1/models and not /v1/chat/completions.
  • Key. Wrong key, trailing space, or a key from another service. Test with curl first.
  • Typed model name. If the tool lets you type a model manually, use uncensored, all lowercase.
  • Proxy or browser CORS. A tool that runs in a browser and calls an API directly may be blocked by CORS rules. Use a desktop client or a server-side proxy.

If the list loads but chat fails, check your balance next. The base URL guide covers the settings in more detail.

Check your balance

There are three ways, and each is cheap.

  1. GET /v1/balance returns your remaining credit.
  2. GET /v1/dashboard/billing/credit_grants is the OpenAI-style route, so tools that already know it can show your balance without changes.
  3. The X-Balance-USD header on every API response tells you the balance after the request.
curl https://api.uncensoredgpt.cc/v1/balance \
  -H "Authorization: Bearer YOUR_KEY"

# or read the header on any call
curl -i https://api.uncensoredgpt.cc/v1/models \
  -H "Authorization: Bearer YOUR_KEY" | grep -i x-balance

Other response headers worth logging: X-Request-Id to quote in a support request, and X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency to see your limits. The exact balance field names are listed in the documentation.

A startup check for your app

Run a short health check when your service boots. It catches bad keys, wrong URLs and an empty balance before a user sees an error. This version uses plain requests, so it works without the SDK.

import sys
import requests

BASE = "https://api.uncensoredgpt.cc/v1"
HEAD = {"Authorization": "Bearer YOUR_KEY"}

r = requests.get(BASE + "/models", headers=HEAD, timeout=10)
if r.status_code >= 300:
    sys.exit("models call failed: " + str(r.status_code) + " " + r.text[:200])

ids = [m["id"] for m in r.json()["data"]]
if "uncensored" not in ids:
    sys.exit("model uncensored not listed: " + str(ids))

balance = r.headers.get("X-Balance-USD")
print("ok, model listed, balance:", balance)

Treat a non-200 status as a configuration error and print the body, which usually names the problem. A 429 here means you are over a limit and should wait; check the code field to see whether it is rate_limited or concurrency. Log the X-Request-Id header with the failure so you can quote it later.

Read-only endpoints at a glance

EndpointMethodPurposeCosts tokens?
/v1/modelsGETList model IDsNo
/v1/balanceGETRemaining creditNo
/v1/dashboard/billing/credit_grantsGETOpenAI-style balance routeNo
/v1/chat/completionsPOSTChat generationYes
/v1/responsesPOSTResponses-format generationYes

That is the full surface. There are no endpoints for images, audio, embeddings or fine-tuning, so a client that offers those features will get an error if you point it here. Hide those options in your UI instead of letting users find them by trial.

First chat call

Once the list shows the ID, send a real request:

curl https://api.uncensoredgpt.cc/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","messages":[{"role":"user","content":"Reply with the word ready."}]}'

The same model also works through POST /v1/responses for clients that use the newer format. Other supported features include streaming with stream: true, tool calling, and JSON mode with response_format.

Limits and costs to know

A full key allows 8 concurrent requests and 300 requests per minute, and a trial key 2 and 60. Over a limit, the API returns HTTP 429 with the code rate_limited or concurrency. Model-list and balance calls are light, but do not poll them in a tight loop.

Chat requests cost $0.15 per 1M input tokens and $0.50 per 1M output tokens, so the "ready" test above costs a tiny fraction of a cent. The context window is 100,000 tokens. New users can claim $0.50 of trial credit on the API key page, and the pricing page lists top-ups from $20 to $500.

Questions and answers

Which model IDs will I see?

One: uncensored. This API serves a single open-weight model and is not a router across vendors.

Does listing models cost money?

No tokens are processed by a models call, so it is a free way to test your key and base URL.

Which balance endpoint should I use?

Use GET /v1/balance for a direct answer or the OpenAI-style credit_grants route if your tool expects it. The X-Balance-USD header works on every response.

Can I call the models endpoint from a browser?

Browser requests may be blocked by CORS and expose your key. Call it from a server or a desktop tool.

Your key is one form away

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

On this page