Skip to content
Dagon Inference

Dagon Inference / Use an uncensored LLM with the OpenAI SDK

Use an uncensored LLM with the OpenAI SDK

Published · Last updated

Change the base URL of your OpenAI or Anthropic SDK to https://inference.dagon.so/v1 and use a Dagon Inference key. Chat Completions, Responses and Messages all work, including streaming, so existing tools and agents keep running.

What does the code look like?

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://inference.dagon.so/v1",
  apiKey: process.env.DAGON_KEY,
});
const reply = await client.chat.completions.create({
  model: "abliterated-model-large-flash",
  messages: [{ role: "user", content: "Explain this stack trace." }],
});

For the Anthropic SDK, set the base URL to https://inference.dagon.so without /v1 and call Messages as usual. Any tool that accepts an OpenAI or Anthropic compatible endpoint works, including coding agents.

Same plug, new socket
DagonInferenceOpenAIAnthropic
The gateway answers on four paths: /v1/chat/completions and /v1/responses for OpenAI SDKs, /v1/messages for Anthropic SDKs, and /v1/messages/count_tokens, a free pass-through. Your client code stays as it is: point its base URL at the gateway and give it a gateway key.

Which model ids can I use?

Use these exact ids; other names are rejected.

ModelModel idInputCached inputOutputContextProviders
Abliterated Large v2abliterated-model-large-v2$1.10$0.165$2.201,048,5763
DeepSeek V4.1 Flash Abliterateddeepseek-v4.1-flash-abliterated$0.132$0.0275$0.4951,048,5762
GLM-5.3 Flash Abliteratedglm-5.3-flash-abliterated$0.132$0.044$0.551,048,5762
Abliterated Large Flashabliterated-model-large-flash$1.10$0.11$2.201,048,5761
Abliterated Modelabliterated-model$1.10$0.11$3.30262,1441

Prices are per 1M tokens in USD at the cheapest provider serving each model, with the 10% markup included (15% on private leases). A request that falls back to another provider is billed at that provider's rate plus the markup; its receipt names the provider. Pinned to price version 2026-11-02.2. Live: /v1/models, also as JSON and Markdown.

Does it support streaming and images?

Streaming is supported. Abliterated Large Flash and Abliterated Model accept image input; Abliterated Large v2, DeepSeek V4.1 Flash Abliterated and GLM-5.3 Flash Abliterated are text only. The default output cap is 16,384 tokens and the maximum is 65,536.

What happens if a request fails halfway?

If the upstream fails or is unreachable before it accepts the request, or reports an error before any output, the charge is zero. A zero receipt is still signed when the request was accepted. If usage is not reported or the stream is cut off, you pay an estimate: the estimated prompt plus the text streamed so far. That estimate can be higher than the real cost.

Common questions

Do I need to change my code beyond the base URL?

No. Keep the SDK, swap the base URL and key, and set the model id.

Where do I get a key?

Create one in the console or with POST https://inference.dagon.so/v1/keys. No email needed.

Create a key in a minute.

Get a key