A LiteLLM OpenAI-compatible endpoint for security models, with a fallback chain

LiteLLM against this endpoint: the openai/ prefix, a model id and api_base, in the Python SDK and the proxy config.yaml, with three builds chained as fallbacks.

Steps checked October 25, 2026 · prices as of November 17, 2026

If LiteLLM already fronts the models behind your tooling, adding this endpoint is three values: openai/ plus a model id, the api_base, and a key. The guide fills them with uncensored builds that answer the recon, exploit review and triage questions a stock model declines, in the Python SDK first and then in the proxy’s config.yaml with three builds chained as fallbacks. Field names come from docs.litellm.ai, checked on 25 October 2026.

New to builds that had their refusals removed? Read abliterated vs uncensored first, then return here for the wiring.

What you need

model
openai/glm-5.3-uncensored
the openai/ prefix in front of any id on the models page
api_base
https://api.pentestllm.ai/v1
stops at /v1
api_key
sk-ptl-live-…
made in the console; exported as PTL_API_KEY

Make the key in the console. It begins with sk-ptl-, you see it once, and it draws on credit you add from $10. The ids live on the model list. To watch a build answer before you touch LiteLLM, the home page prompt box gives a few free turns and the playground runs any build with a key.

Why the model name starts with openai/

LiteLLM reads the provider off the prefix of the model string. A server that serves OpenAI’s /chat/completions gets the openai/ prefix, then that server’s own id. The OpenAI-compatible endpoints doc explains the prefix in a single comment: it is there "so litellm knows to route to OpenAI".

That doc also asks you to keep the base URL as the server gives it, /v1 included. All of the uncensored and security-tuned builds here speak the OpenAI wire format, so the one prefix reaches the whole catalog. Checked against litellm 1.106.3, the PyPI release current on 25 October 2026.

First reply from the Python SDK

A single call and no config file. The reply has the OpenAI shape, so anything you wrote against the OpenAI SDK parses it as before. The sample prompt is recon triage on a host inside your scope.

main.py
1import os
2import litellm
3
4response = litellm.completion(
5 model="openai/glm-5.3-uncensored",
6 api_base="https://api.pentestllm.ai/v1",
7 api_key=os.environ["PTL_API_KEY"],
8 messages=[{"role": "user", "content": "Rank these open ports on the in-scope host by what to test first: 22, 80, 443, 3306, 8080."}],
9 max_tokens=600,
10)
11print(response.choices[0].message.content)

To try another build, change the id behind openai/. The rest of the call stays, since one base URL and one key front every build.

A fallback chain over three builds

Give the Router named deployments and a fallbacks map. The reliability doc describes the behavior: once a call has failed num_retries times it moves to the next name, and the fallbacks are tried in the order written.

router.py
1import os
2from litellm import Router
3
4BASE = "https://api.pentestllm.ai/v1"
5KEY = os.environ["PTL_API_KEY"]
6
7
8def build(model_id):
9 return {"model": f"openai/{model_id}", "api_base": BASE, "api_key": KEY}
10
11
12router = Router(
13 model_list=[
14 {"model_name": "uncensored-primary", "litellm_params": build("glm-5.3-uncensored")},
15 {"model_name": "uncensored-second", "litellm_params": build("deepseek-v4-pro-uncensored")},
16 {"model_name": "uncensored-third", "litellm_params": build("glm-5.3-abliterated")},
17 ],
18 fallbacks=[{"uncensored-primary": ["uncensored-second", "uncensored-third"]}],
19 num_retries=1,
20)
21
22response = router.completion(
23 model="uncensored-primary",
24 messages=[{"role": "user", "content": "Rank these open ports on the in-scope host by what to test first: 22, 80, 443, 3306, 8080."}],
25)
26print(response.choices[0].message.content)

Know what the chain can and cannot absorb. Every entry shares one key, so a 401 or a 402 is identical on all three builds and no fallback repairs it. The chain earns its place when a single build misbehaves: a 404 because the id dropped out of the catalog, a 429, a 5xx, a timeout. And since the docs page states that a request failing before a model answers is never charged, a request that falls through to a backup is billed one time, at the backup’s rate.

The deployment names are aliases. Your scanner or triage script asks for uncensored-primary and never learns a model id, so swapping builds is one edited line in the list, not a code change. num_retries=1 grants a failing build a second attempt before the chain advances; a retry that dies before the model answers costs nothing either, so retries cost you time, not credit.

The same chain as a proxy config.yaml

The proxy loads these deployments from a file and exposes them on an OpenAI-format endpoint of its own, which is how you share one key across a team’s tools. os.environ/ pulls a value from the environment so the key stays out of the file. The model_info prices are the catalog’s at the moment this page rendered, so LiteLLM’s spend tracking lines up with what the API actually bills.

config.yaml
1model_list:
2 - model_name: uncensored-primary
3 litellm_params:
4 model: openai/glm-5.3-uncensored
5 api_base: https://api.pentestllm.ai/v1
6 api_key: os.environ/PTL_API_KEY
7 model_info:
8 input_cost_per_token: 0.000000282
9 output_cost_per_token: 0.000000846
10 - model_name: uncensored-second
11 litellm_params:
12 model: openai/deepseek-v4-pro-uncensored
13 api_base: https://api.pentestllm.ai/v1
14 api_key: os.environ/PTL_API_KEY
15 model_info:
16 input_cost_per_token: 0.00000097
17 output_cost_per_token: 0.00000194
18 - model_name: uncensored-third
19 litellm_params:
20 model: openai/glm-5.3-abliterated
21 api_base: https://api.pentestllm.ai/v1
22 api_key: os.environ/PTL_API_KEY
23 model_info:
24 input_cost_per_token: 0.0000021825
25 output_cost_per_token: 0.000004365
26
27router_settings:
28 fallbacks: [{"uncensored-primary": ["uncensored-second", "uncensored-third"]}]
29
30litellm_settings:
31 num_retries: 1
32 request_timeout: 120
33
34general_settings:
35 master_key: os.environ/LITELLM_MASTER_KEY
shell
1export PTL_API_KEY="sk-ptl-live-…"
2export LITELLM_MASTER_KEY="sk-pick-your-own"
3litellm --config config.yaml

The proxy comes up on port 4000. Any OpenAI SDK reaches it with the master key, requesting uncensored-primary as the model. Per LiteLLM’s custom pricing doc the two *_cost_per_token keys only drive tracking; billing is unaffected.

Fallbacks for context size and content filters

context_window_fallbacks catch LiteLLM’s ContextWindowExceededError. The reliability doc makes enable_pre_call_checks: true under router_settings a requirement for that check; leave it out and every request goes to the provider regardless of size. The check also needs a published window to compare against, and the three builds above publish none in the catalog. If you want a context fallback, add a fourth deployment for nemotron-3-ultra-550b-a55b-uncensored, whose listing shows 262,144 tokens, and map uncensored-primary onto it.

content_policy_fallbacks trigger on a provider’s content-filter error, LiteLLM’s ContentPolicyViolationError. This is the fallback a tester cares about: map a stock model on another provider to uncensored-primary, and the exploit review or malware triage question it filtered lands here instead. One limit: a refusal typed into an ordinary reply is a 200, not an error, so LiteLLM never sees it as something to fall back from.

Which builds belong in the chain

Lead with the build you prefer; the backups only bill on the requests that reach them. At writing time, all three had held steady since 12 October on the daily real-model check, which sends the same prompt to every model once a day and records whether the reply still matches. The column below shows today’s verdict.

Uncensored models and their prices per million tokens
Wire formats
GLM-5.3 Uncensoredglm-5.3-uncensoredUncensored$0.282$0.846—openai
DeepSeek V4 Pro Uncensoreddeepseek-v4-pro-uncensoredUncensored$0.97$1.94—openai
GLM-5.3 Abliteratedglm-5.3-abliteratedAbliterated$2.1825$4.365—openai

Prices per million tokens, read from the live catalog on 2026-11-17.

Build idName in config.yamlToday’s checkContext window
glm-5.3-uncensoreduncensored-primarySteady since Oct 12not published
deepseek-v4-pro-uncensoreduncensored-secondSteady since Oct 12not published
glm-5.3-abliterateduncensored-thirdSteady since Oct 30not published

Context windows from the catalog on 2026-11-17; verdicts read from /proof when the page rendered.

Mixing two GLM builds with a DeepSeek build means an outage across one family still leaves a working answer. More of each family is on the uncensored GLM and uncensored DeepSeek pages.

Cost of a batch through the chain

The worked case, a nightly triage run: 10,000 requests, each 1,200 prompt tokens in and 350 reply tokens out, every one answered by the same build.

Model10,000 requests
GLM-5.3 Uncensored$6.35
DeepSeek V4 Pro Uncensored$18.43
GLM-5.3 Abliterated$41.47

Worked out at render time from the catalog prices on 2026-11-17: requests × 1,200 × input rate, plus requests × 350 × output rate.

An actual month lands near the first row, plus a backup’s rate on whatever fell through. The pricing page has every per-token rate.

Prove the key before you blame the config

This returns the ids your key may call. It is free, so run it first.

curl
1curl https://api.pentestllm.ai/v1/models \
2 -H "Authorization: Bearer sk-ptl-live-…"

A 200 with ids in it means both key and base URL are right. A 401 tells you which kind of wrong the key is:

http
1HTTP 401
2{"error":{"message":"No API key was sent.","type":"authentication_error","param":null,"code":"invalid_api_key"}}
http
1HTTP 401
2{"error":{"message":"The API key is not valid.","type":"authentication_error","param":null,"code":"invalid_api_key"}}

Both bodies exactly as the API sent them on 25 October 2026.

LiteLLM errors against this endpoint

LiteLLM turns each status into an exception, per its exception mapping doc: 401 becomes AuthenticationError, 402 PaymentRequiredError, 404 NotFoundError and 429 RateLimitError.

Every call returns Not Found

The OpenAI-compatible doc’s own fix: api_base must end in /v1. Confirm as well that the model string begins with openai/.

404 model_not_found on a single build

The id behind openai/ does not exist in the catalog; the chain continues with the next build; correct the id against the list the curl above printed.

http
1HTTP 404
2{"error":{"message":"No such model: glm-5.3-uncensord.","type":"not_found_error","param":null,"code":"model_not_found"}}

402 insufficient_balance

Credit is at zero, so each build in the chain fails the same way. Add credit in the console; the refused requests were not charged.

http
1HTTP 402
2{"error":{"message":"The prepaid balance does not cover this request. Top up at … to continue.","type":"insufficient_quota","param":null,"code":"insufficient_balance"}}

Questions

In both directions. A model string starting with openai/ makes it call an OpenAI-compatible endpoint, and its proxy exposes an OpenAI-format endpoint of its own on port 4000.

A server that accepts the requests and returns the responses of OpenAI's /v1/chat/completions, so a client needs nothing beyond a base URL, a key and a model id. Here the base URL is https://api.pentestllm.ai/v1. See the docs page.

model is openai/ followed by the provider's id, api_base is its URL ending in /v1, api_key is its key. For this API: openai/glm-5.3-uncensored and https://api.pentestllm.ai/v1.

Its doc lists provider-specific ones, hosted_vllm among them, for servers that match a known shape. This API takes the plain openai/ prefix. See the model list.

Yes. The proxy speaks the OpenAI format, so the OpenAI Node SDK works with baseURL set to the proxy and the master key as apiKey.

Only when it has the prices. The config above writes the catalog’s per-token rates into model_info, and LiteLLM uses them for tracking alone. See per-token prices.

Every model above is on the uncensored model list with its live price per million tokens. Per-token pricing sets the whole catalog side by side, and the family directory groups the builds by base model.

Get a keyPrepaid from $10, no subscription.

New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.

Help