LibreChat custom endpoint for security models

Point a LibreChat custom endpoint at the security catalog: the endpoints.custom block in librechat.yaml, the key variable in .env, the /v1 base URL, a models.default list and a cheap titleModel. Plus the Docker mount, what a chat costs and how to read each error.

Steps checked November 6, 2026 · prices as of November 17, 2026

If your team already lives in LibreChat, you do not need a second chat app for engagement work. A custom endpoint in librechat.yaml takes any OpenAI-compatible API, and that includes the security-tuned and abliterated builds here: the ones that read a scope, review a proof of concept against an in-scope host or draft a finding without declining. One YAML block, billed per token. The same ids also drop into Open WebUI and OpenCode.

What you need

A running LibreChat install, a key from the console, and write access to two files. The custom endpoint is a single entry under endpoints.custom in librechat.yaml at the project root: name, key reference, base URL, model ids. The key itself lives in .env; LibreChat’s docs prefer that apiKey points at an environment variable rather than holding the secret. On Docker, docker-compose.override.yml binds the YAML into the container, and a restart picks it up.

Shortest path to a first reply

  1. Make a key in the console, then write it into .env beside docker-compose.yml:
.env
1# .env
2PENTESTLLM_API_KEY=sk-ptl-live-…
  1. Drop the block below into librechat.yaml. The models.default ids are one reasonable set for engagement work; swap in any id from the models page, security builds included, spelled exactly as shown there:
librechat.yaml
1# librechat.yaml
2version: 1.3.18
3cache: true
4endpoints:
5 custom:
6 - name: 'PentestLLM'
7 apiKey: '${PENTESTLLM_API_KEY}'
8 baseURL: 'https://api.pentestllm.ai/v1'
9 models:
10 default:
11 - 'glm-5.3-uncensored'
12 - 'deepseek-v4-pro-uncensored'
13 - 'deepseek-v4.1-flash-abliterated'
14 - 'glm-5.3-abliterated'
15 - 'glm-5.3-flash-uncensored'
16 fetch: false
17 titleConvo: true
18 titleModel: 'glm-5.3-flash-uncensored'
19 modelDisplayLabel: 'PentestLLM'
  1. Make sure the override file still mounts the YAML, and restart the stack:
docker-compose.override.yml
1# docker-compose.override.yml
2services:
3 api:
4 volumes:
5 - type: bind
6 source: ./librechat.yaml
7 target: /app/librechat.yaml

Run docker compose down && docker compose up -d. On the next page load the endpoint selector shows your chosen name, and the model menu under it holds exactly the ids from models.default. Pick one, paste a scope document or a chunk of recon output, and ask for a prioritised list of what to test first. Want to try the same build before touching YAML? The playground runs it with no install.

The fields, one by one

name
PentestLLM
what the endpoint selector displays; must be set and must not repeat another endpoint
apiKey
${PENTESTLLM_API_KEY}
pulls the sk-ptl- key out of .env; the value user_provided instead asks every user for their own key
baseURL
https://api.pentestllm.ai/v1
keep the /v1; LibreChat adds /chat/completions on its own, so leave directEndpoint alone
models.default
the ids above
the model menu while fetch is false; mandatory
models.fetch
false
set to true, it pulls every id the key can reach into the menu
titleConvo, titleModel
glm-5.3-flash-uncensored
auto-generated chat titles, and the cheap build that writes them
modelDisplayLabel
PentestLLM
the name shown next to the assistant icon; defaults to "AI"

Which build, and what a chat costs

Every turn in LibreChat resends the full conversation in the OpenAI format, which any build on the models page accepts. The figures below price a single turn of 2,000 input tokens and 500 output tokens at the catalog rates of 2026-11-17.

ModelOne turnOne title
GLM-5.3 Uncensored$0.00099$0.0003
DeepSeek V4 Pro Uncensored$0.0029$0.001
DeepSeek V4.1 Flash Abliterated$0.0025$0.00088
GLM-5.3 Abliterated$0.0065$0.0023
GLM-5.3 Flash Uncensored$0.00039$0.00011

The opening turn on GLM-5.3 Uncensored comes to $0.00099. Because titleConvo is on, every fresh chat also fires one title request, roughly 1,000 tokens in and 20 out: $0.0003 if GLM-5.3 Uncensored wrote it, $0.00011 on GLM-5.3 Flash Uncensored. That gap is the reason the example names a separate titleModel.

Uncensored models and their prices per million tokens
GLM-5.3 Uncensoredglm-5.3-uncensoredUncensored$0.282$0.846
DeepSeek V4 Pro Uncensoreddeepseek-v4-pro-uncensoredUncensored$0.97$1.94
DeepSeek V4.1 Flash Abliterateddeepseek-v4.1-flash-abliteratedAbliterated$0.8488$1.6975
GLM-5.3 Abliteratedglm-5.3-abliteratedAbliterated$2.1825$4.365
GLM-5.3 Flash Uncensoredglm-5.3-flash-uncensoredUncensored$0.1053$0.3685

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

Prove the key works before blaming LibreChat

On the host that runs LibreChat, ask the API which models the key may call. Each id you listed under models.default must appear in the response:

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

Next, fire one streamed completion, the same shape LibreChat sends. The -i flag shows the response headers; the request id among them is what to quote to support.

shell
1curl -i https://api.pentestllm.ai/v1/chat/completions \
2 -H "Authorization: Bearer sk-ptl-live-…" \
3 -H "Content-Type: application/json" \
4 -d '{"model": "glm-5.3-uncensored", "messages": [{"role": "user", "content": "Reply with the single word ok."}], "stream": true}'

Both succeed but LibreChat still fails? Then the fault is in the YAML or the volume mount. Read the container log right after docker compose up.

When it breaks

  • No sign of the endpoint in the selector: either the YAML never reached the container, or it failed to parse. The log after docker compose up points at the offending line.
  • 401 invalid_api_key: a bad or revoked key, or the variable in .env is spelled differently from the one inside apiKey.
  • 402 insufficient_balance: not enough credit for this request; add funds in the console. 402 monthly_limit_reached is the monthly cap you put on the key doing its job.
  • 404 model_not_found: one of the models.default entries is not a live id, usually because a display name went in where the id belongs.
  • 429 rate_limited: the key is over its rate limit. Everyone on the same endpoint shares that one key and its limit, so a busy team hits it sooner. Honour the retry-after header.
  • The menu lists the whole catalog instead of your short list: fetch is true. Flip it to false and curate models.default.

Where this came from

The field names, the environment-variable form of apiKey, the /v1 base URL rule and the Docker mount were read from LibreChat’s documentation on 2026-11-06: Custom Endpoint Object Structure and the Custom Endpoints quick start. Every price on this page is pulled from the live catalog when it renders.

Questions

librechat.yaml at the project root. The endpoint is one list item under endpoints.custom carrying name, apiKey, baseURL and models. With Docker, bind the file in through docker-compose.override.yml and restart.

It should: https://api.pentestllm.ai/v1. LibreChat appends /chat/completions itself, matching its own OpenAI-compatible examples. Use directEndpoint only when your URL is already the complete completions path.

Yes. Write apiKey: user_provided and each person pastes a key into the endpoint's settings, spending from their own balance. With the environment-variable form, the whole instance shares the one key in .env.

Every id on the models page does, security-tuned, abliterated and uncensored alike. They all answer /v1/chat/completions on the same key, so copy the id as it appears there straight into models.default. See the models page.

Tokens only. LibreChat is free software; the API bills per token at the live catalog prices from a prepaid balance that never expires, with no subscription required. A small titleModel keeps the automatic titles close to free.

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