Plenty of tooling is written against Anthropic's Messages API rather than OpenAI's Chat Completions. If that's your stack, you don't need to rewrite it to try an abliterated model. You need an endpoint that speaks the same format. This post walks through one, field by field, including the tool-calling and coding-agent settings listed in the docs.
I'm Aljay Miskino, VP of Partnerships at CommentLLM. Everything below comes from CommentLLM's public API docs and pricing page, re-read on 26 November 2026 (America/New_York). The four public models are marked generally available.
Quick definition, in case you landed here first: an abliterated model is an open-weight model whose refusal direction has been removed from its weights, without retraining. The full explainer on abliteration covers the method and its limits.
The endpoint
| Value | |
|---|---|
| Method and path | POST /v1/messages |
| Anthropic SDK base URL |
https://api.commentllm.com (the SDK appends /v1/messages) |
| Auth |
x-api-key: cllm_... or Authorization: Bearer cllm_...
|
| Model IDs |
glm-5.3-abliterated, glm-5.3-flash-abliterated, deepseek-v4.1-flash-abliterated, deepseek-v4.1-flash-abliterated-fast
|
The most common mistake is the base URL. For the Anthropic SDK, leave off /v1. For the OpenAI SDK on the same host, you include it (https://api.commentllm.com/v1). The same four IDs work on Chat Completions and on the OpenAI Responses endpoint (POST /v1/responses) as well.
Python (Anthropic SDK)
import os
import anthropic
client = anthropic.Anthropic(
base_url="https://api.commentllm.com",
api_key=os.environ["COMMENTLLM_API_KEY"],
)
msg = client.messages.create(
model="deepseek-v4.1-flash-abliterated",
max_tokens=1024,
system="You explain detection logic to a security analyst.",
messages=[{"role": "user", "content": "Explain what this Sigma rule matches and what it misses:\n\n<rule>"}],
)
print(msg.content[0].text)
TypeScript (Anthropic SDK)
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://api.commentllm.com",
apiKey: process.env.COMMENTLLM_API_KEY,
});
const msg = await client.messages.create({
model: "glm-5.3-flash-abliterated",
max_tokens: 1024,
messages: [{ role: "user", content: "Summarize the scope section of this test plan:\n\n<plan>" }],
});
console.log(msg.content[0].type === "text" ? msg.content[0].text : "");
What the endpoint accepts
Per the docs, Messages requests accept:
-
model,max_tokens,system -
messageswith text,tool_useandtool_resultblocks -
stream,temperature,top_p,stop_sequences -
tools,tool_choice
All four models accept text input only. Every response carries an x-request-id header, the same ID the console's Logs and Usage show. It also carries x-ratelimit-limit-requests and x-ratelimit-remaining-requests for the current minute.
Streaming
Set stream: true. The Messages endpoint sends the standard Anthropic event sequence, from message_start to message_stop, so the SDK's streaming helpers work unchanged.
with client.messages.stream(
model="deepseek-v4.1-flash-abliterated",
max_tokens=1024,
messages=[{"role": "user", "content": "Draft a test-plan outline for my authorized scope:\n\n<scope>"}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
One behavior to know: if your organization has a policy that checks responses, the whole answer is checked before any text is sent. The stream then arrives in one piece rather than token by token. The docs also say that while a model is thinking, a stream carries a keep-alive every ten seconds: a ping event on Messages (and a comment line on Chat Completions). For answers that may take longer than a minute, stream, or turn on TCP keep-alive in your client.
Tool calling, and the coding agents the docs name
The docs are direct: "Every model calls tools on all three endpoints, with streaming and parallel calls." You define function tools with a JSON Schema. The model answers with tool calls, and you send each result back as a tool_result block on Messages, as a tool message on Chat Completions, or as a function_call_output item on Responses.
Coding agents work this way. The docs name five, and they do not all use the same endpoint:
-
Claude Code uses the Messages endpoint. Set
ANTHROPIC_BASE_URL=https://api.commentllm.com,ANTHROPIC_AUTH_TOKENto your key, andANTHROPIC_MODELto a model ID. -
Codex CLI uses the Responses endpoint. Add a model provider with
base_url = "https://api.commentllm.com/v1"andwire_api = "responses". -
opencode, Cline and Aider use Chat Completions. For OpenAI-compatible agents, set the base URL to
https://api.commentllm.com/v1, your key, and a model ID.
That's the full list of agent settings the docs give. I haven't added product-specific keys that aren't written there.
Policies apply to tool content. Tool results are checked like any other message. Tool calls and tool definitions cannot be redacted, so an enforcing match blocks the request or the answer. Judge policies do not read tool definitions.
What is still not available, per the same section: images, structured output (response_format), and provider-hosted tools such as web search. Function tools that you define yourself are the supported path.
Picking a model for Messages workloads
From the same docs, with token rates as published on 26 November 2026 (America/New_York). Every current model has a 1,048,576-token context window, shared between input and output, and a 32,768-token output cap. All four are generally available and text-only.
| Model | API model ID | Listed as | Input / cached / output per 1M tokens |
|---|---|---|---|
| GLM 5.3 Abliterated | glm-5.3-abliterated |
Reasoning and coding | $1.00 / $0.15 / $2.00 |
| GLM 5.3 Flash Abliterated | glm-5.3-flash-abliterated |
Fast reasoning and coding | $0.12 / $0.025 / $0.50 |
| DeepSeek V4.1 Flash Abliterated | deepseek-v4.1-flash-abliterated |
Coding and analysis | $0.12 / $0.019 / $0.45 |
| DeepSeek V4.1 Flash Abliterated Fast | deepseek-v4.1-flash-abliterated-fast |
Fast coding and analysis | $0.12 / $0.025 / $0.45 |
The three Flash IDs are close on price; GLM 5.3 Abliterated is the higher-priced reasoning and coding option. Re-check the CommentLLM pricing page before you quote a number. I haven't published quality or refusal scores for any of these rows, so pick on documented limits and price, then run your own task set.
Always set max_tokens. Each request reserves credit for its input plus its maximum output until it settles. If you omit the limit on Chat Completions, the gateway uses the model's maximum (32,768 tokens).
Errors you'll see first
Errors come back in the format of the endpoint you called. The common ones:
-
401 invalid_api_key: check the key; it may be revoked or expired. -
403 aup_not_accepted: an owner or admin needs to accept the acceptable use policy in the console. -
403 policy_violation: one of your organization's policies blocked the request (blocked requests aren't billed). -
400 context_length_exceeded: shorten the conversation. -
429 rate_limit_exceeded: wait forRetry-After. New organizations start at 60 requests per minute.
FAQ
Is there an Anthropic-compatible API for abliterated models?
Yes. CommentLLM documents POST /v1/messages for the four generally available IDs listed above. Use base URL https://api.commentllm.com with the Anthropic SDK. Current IDs and rates are on the CommentLLM pricing page.
Does it support tool use?
Yes. As of the 26 November 2026 docs, every model calls tools on all three endpoints (Messages, Chat Completions, and Responses), with streaming and parallel calls. Images, structured output (response_format) and provider-hosted tools such as web search are not available.
Can I use the OpenAI SDK instead?
Yes. Use base URL https://api.commentllm.com/v1 and chat.completions.create. Same keys, same models. Function tools come back as tool messages on that endpoint. Codex CLI should use the Responses API instead, as in the docs.
Aljay Miskino is VP of Partnerships at CommentLLM. CommentLLM is a hosted, OpenAI- and Anthropic-compatible API for abliterated open-weight models, built for authorized security work.
Top comments (0)