Get started

Usage and billing

How Abliterator bills each request: usage.cost, the X-Abl-Cost-Usd header, the key and generation endpoints, monthly plan credit, prepaid balance and discounts.

Reviewed APIBillingPricing

Quick answer

Every OpenAI-format response carries usage.cost in USD, and non-streaming responses also set X-Abl-Cost-Usd. Monthly plan credit pays first, then your prepaid balance. GET /api/v1/generation returns any request's tokens and cost.

What a request costs

Each request is billed on its tokens at the model's price per 1M tokens:

Model Input Cached input Output
kimi-k3.1-pro-abliterated $4.00 $0.40 $15.00
deepseek-v4.1-flash-abliterated $1.00 $0.10 $2.00

The cost of one request is:

cost = (input tokens - cached tokens) x input price
     + cached tokens x cached input price
     + output tokens x output price
     - your plan's usage discount
  • Output tokens include reasoning tokens. If the model reports more total tokens than prompt plus completion, Abliterator bills the difference as output so reasoning reported elsewhere is still counted.
  • Cached input is billed at the cached price, automatically. There is no cache-write surcharge. See prompt caching.
  • Images are billed as the input tokens the model reports for them.
  • Costs are rounded up to the nearest billionth of a dollar.

Failed requests cost nothing; see errors.

Read the cost of a request

usage.cost in the response

Every Chat Completions response includes usage.cost, in USD, after your plan's discount:

{
  "usage": {
    "prompt_tokens": 1834,
    "completion_tokens": 612,
    "total_tokens": 2446,
    "prompt_tokens_details": {"cached_tokens": 1536},
    "cost": 0.001675600
  }
}

Streams carry the same object in their final chunk. Abliterator always asks the model for that usage chunk, whether or not you set stream_options. See streaming.

The Anthropic Messages API has no cost field in its usage object. Use the header or the generation endpoint below.

Response headers

Header Value When
X-Abl-Generation-Id ID of this request, gen-... Every successful response, streaming or not
X-Abl-Model Canonical model ID, even if you called an alias Every successful response
X-Abl-Provider Where the request was served, currently logits Every successful response
X-Abl-Cost-Usd Cost in USD, after discount Non-streaming responses

Read them with the OpenAI Python SDK's raw-response helper:

import os

from openai import OpenAI

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

raw = client.chat.completions.with_raw_response.create(
    model="deepseek-v4.1-flash-abliterated",
    max_tokens=1024,
    messages=[{"role": "user", "content": "One sentence: what is a CVSS base score?"}],
)
completion = raw.parse()

print(raw.headers["x-abl-generation-id"], raw.headers["x-abl-cost-usd"])
print(completion.usage.cost)

GET /api/v1/generation

Look up any request by its generation ID. This works for both APIs and for streams, once the request has finished.

curl "https://abliterator.ai/api/v1/generation?id=gen-3f9a1c0e5b7d2a4c6e8f0a1b" \
  -H "Authorization: Bearer $ABL_API_KEY"
{
  "data": {
    "id": "gen-3f9a1c0e5b7d2a4c6e8f0a1b",
    "model": "deepseek-v4.1-flash-abliterated",
    "provider": "logits",
    "api": "openai",
    "status": "ok",
    "http_status": 200,
    "prompt_tokens": 1834,
    "cached_tokens": 1536,
    "completion_tokens": 612,
    "latency_ms": 5120,
    "ttft_ms": 640,
    "stream": true,
    "attempts": 1,
    "app": "my-eval-runner",
    "created_at": "2026-11-27T18:04:11.532Z",
    "cost": 0.0016756
  }
}
Field Meaning
api openai or anthropic: the endpoint you called
status ok; client_closed_metered or client_closed_estimated when your client disconnected mid-stream; incomplete_metered or incomplete_estimated when the model's stream broke; rejected when the model refused the request as invalid; error for a 502
cached_tokens Input tokens billed at the cached price
ttft_ms Time to the first streamed event (or the full response, if not streaming)
attempts Serving endpoints tried
app Your app label, from X-Abl-App, X-Title or the host of HTTP-Referer
error Present on failed requests

Another account's ID returns 404 Generation not found.. Abliterator stores this metadata, never the prompt or completion text; see /privacy.

GET /api/v1/activity

Returns your account's 100 most recent requests, newest first, each in the same shape as a generation record:

curl https://abliterator.ai/api/v1/activity -H "Authorization: Bearer $ABL_API_KEY"

Label requests by app

Send X-Abl-App: <name> (or X-Title, which many OpenRouter-compatible tools already send) and the value appears as app in generation and activity records. Labels are cut to 100 characters.

Check balance and limits: GET /api/v1/key

curl https://abliterator.ai/api/v1/key -H "Authorization: Bearer $ABL_API_KEY"
Field Meaning
label The key's name
account The account name
balance Prepaid balance in USD, shared by every key on the account
pass_credit Monthly plan credit left this period, in USD
usage What this key has spent since it was created, in USD
limit This key's spend limit in USD, or null
pass_only true if the key may spend only monthly plan credit
plan free, developer, growth or scale
is_free_tier true on the Free plan
rate_limit requests_per_minute and concurrency for the plan

Monthly plan credit and prepaid balance

Your account has two pools of money.

Monthly plan credit Prepaid balance
Comes from Your plan: Developer $20, Growth $50, Scale $200 each month Card top-ups at /account, plus the $1 signup credit
Pays for Both models Both models
Expires At the end of each billing period, no rollover Never
Spent First After monthly credit runs out

A request is paid from monthly credit first. If the credit runs out partway through a request, the rest comes from the balance. Keys created to spend only plan credit never touch the balance; see authentication.

Top-ups: $20, $100 or $500 presets, or any amount from $5 to $2,000, by card through Stripe Checkout. You can turn on auto-reload, which tops up your balance when it drops below a threshold you choose.

Cancel any time from /account, through the Stripe billing portal.

Plan discounts

Paid plans take a discount off the price of every request while the plan is active:

Plan Usage discount
Free None
Developer 2.5%
Growth 5%
Scale 10%

The discount is already applied in usage.cost, X-Abl-Cost-Usd and the generation records. It applies whether monthly credit or balance pays.

Credit reservation and max_tokens

Before a request runs, Abliterator reserves enough to cover its worst case: the estimated prompt cost plus max_tokens of output at list price. The reservation is released when the request settles, and you pay only the actual cost. This stops parallel requests from spending more than you have.

What this means for you:

  • Set max_tokens. Without it, Abliterator reserves the model's full output limit (262,144 tokens for Kimi, 393,216 for Flash). If your available credit cannot cover that, Abliterator sets max_tokens to what it can cover instead of refusing the request.
  • An explicit max_tokens larger than your available credit is refused with a 402 that says how many tokens you can afford.
  • Many parallel requests with large max_tokens can be refused while credit remains, because each one holds a reservation.
  • The prompt estimate is about 4 bytes of text per token plus 1,500 tokens per image. Actual billing uses the token counts the model reports.

A request admitted near the end of your credit can finish slightly over it; the next request is then refused until you add credit.

Disconnected streams are still billed

If your client disconnects during a stream, the model has usually already generated more tokens. Abliterator keeps reading the stream for up to 60 seconds after the disconnect so it can bill the real usage, then stops the model. If the stream ends without a usage report, Abliterator bills an estimate from the prompt and the text streamed so far.

To stop paying sooner, set max_tokens to what you need rather than relying on cancellation.

Frequently asked questions

Are reasoning tokens billed?

Yes, as output tokens at the model's output price. They also count toward max_tokens.

Does unused monthly credit roll over?

No. Monthly plan credit expires at the end of each billing period. Prepaid balance never expires.