API reference

Vision

Send images to Abliterator's models with OpenAI image_url parts or Anthropic image blocks, using https URLs or base64, plus size limits and how images are billed.

Reviewed APIVisionImages

Quick answer

Both models accept images. In Chat Completions, add image_url content parts with an https URL or a base64 data URL. In the Messages API, use image blocks with a base64 or URL source. Request bodies are limited to 32 MiB.

What is supported

  • Both models take text and images as input and answer in text: kimi-k3.1-pro-abliterated and deepseek-v4.1-flash-abliterated.
  • Sources: a public https URL the model fetches, or the image bytes inline as base64.
  • Formats: PNG, JPEG, WebP and GIF. An animated image is read as its first frame.
  • Several images in one message, mixed with text, in any order.

Image generation is not supported; Abliterator returns text only. The free playground is text-only.

Chat Completions: image_url

Put an image_url part in a user message's content array.

Image URL

import os

from openai import OpenAI

client = OpenAI(base_url="https://abliterator.ai/v1", api_key=os.environ["ABL_API_KEY"])

response = client.chat.completions.create(
    model="deepseek-v4.1-flash-abliterated",
    max_tokens=4096,
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Describe this image in two sentences."},
                {"type": "image_url", "image_url": {"url": "https://upload.wikimedia.org/wikipedia/commons/9/97/The_Earth_seen_from_Apollo_17.jpg"}},
            ],
        }
    ],
)

print(response.choices[0].message.content)

Replace the URL with your own image. The URL must be reachable from the public internet; private or signed URLs that expire quickly will fail.

Base64

import base64
import os
import sys

from openai import OpenAI

client = OpenAI(base_url="https://abliterator.ai/v1", api_key=os.environ["ABL_API_KEY"])

path = sys.argv[1]  # for example: python vision.py screenshot.png
mime = "image/png" if path.endswith(".png") else "image/jpeg"
with open(path, "rb") as f:
    data_url = f"data:{mime};base64,{base64.b64encode(f.read()).decode()}"

response = client.chat.completions.create(
    model="deepseek-v4.1-flash-abliterated",
    max_tokens=4096,
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "This is a screenshot of a login page. Does anything suggest it is a phishing clone? Explain."},
                {"type": "image_url", "image_url": {"url": data_url}},
            ],
        }
    ],
)

print(response.choices[0].message.content)

curl

curl https://abliterator.ai/v1/chat/completions \
  -H "Authorization: Bearer $ABL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash-abliterated",
    "max_tokens": 2048,
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "What is in this image?"},
        {"type": "image_url", "image_url": {"url": "https://upload.wikimedia.org/wikipedia/commons/9/97/The_Earth_seen_from_Apollo_17.jpg"}}
      ]
    }]
  }'

Messages API: image blocks

import base64
import os
import sys

import anthropic

client = anthropic.Anthropic(base_url="https://abliterator.ai", api_key=os.environ["ABL_API_KEY"])

with open(sys.argv[1], "rb") as f:
    image_b64 = base64.b64encode(f.read()).decode()

message = client.messages.create(
    model="kimi-k3.1-pro-abliterated",
    max_tokens=4096,
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "image", "source": {"type": "base64", "media_type": "image/png", "data": image_b64}},
                {"type": "text", "text": "Transcribe the error dialog and explain what likely caused it."},
            ],
        }
    ],
)

print("".join(block.text for block in message.content if block.type == "text"))

For a URL source, use {"type": "image", "source": {"type": "url", "url": "https://..."}}.

Limits

  • Request body: 32 MiB. Base64 makes an image about a third larger than the file. A request over the limit fails with 413 request body exceeds 32 MiB. For large or many images, use URLs.
  • Context: images count toward the model's 1,048,576-token context window.

Billing

Images are billed as input tokens, at the count the model reports in usage.prompt_tokens (or input_tokens). Before the request runs, Abliterator estimates 1,500 tokens per image to reserve credit; the actual charge uses the reported count. Repeated images in a stable prompt prefix can be served from the prompt cache at the cached price.

Measured results

On DeepSeek V4.1 Flash Abliterated, MMMU-Pro (images) went from 79.85 on the original to 79.4 (−0.4, 95% interval −1.7 to +0.9), within noise. Refusals on harmful requests placed inside an image fell from 96% to 1% (n=100). On Kimi K3.1 Pro Abliterated, the same image test went from 93% to 0%. Details are on /benchmarks.