API QUICKSTART

Connect to AblitAI.

AblitAI implements OpenAI Chat Completions for text and multimodal image requests, plus server-sent-event streaming. The launch model remains in private beta. Bitcoin checkout via BTCPay is available; card checkout is closed. New accounts start with zero credits.

Never paste your API key into a repository, browser URL, support message, or client-side application. The examples below read it from an environment variable.

1. Create and save a key

Open Create no-email account. The API returns the plaintext key once, and the browser stores its local copy afterward. Download the backup before continuing.

2. Add credits or use a funded beta account

Open your account and buy a Bitcoin token pack when the Bitcoin rail is open. Card checkout remains closed. Completions require a funded account; creating a key alone does not grant credits; a zero-balance completion returns 402.

3. Set the environment variable

PowerShell

PowerShell
$ablitSecret = Read-Host "AblitAI API key" -AsSecureString
$env:ABLITAI_API_KEY = [System.Net.NetworkCredential]::new("", $ablitSecret).Password
Remove-Variable ablitSecret

macOS or Linux

Shell
printf 'AblitAI API key: ' >&2
ablit_stty="$(stty -g)"
trap 'stty "$ablit_stty"' EXIT HUP INT TERM
stty -echo
IFS= read -r ABLITAI_API_KEY
stty "$ablit_stty"
trap - EXIT HUP INT TERM
unset ablit_stty
printf '\n' >&2
export ABLITAI_API_KEY

4. Verify the key and model

macOS or Linux

macOS / Linux · cURL
curl https://api.ablitai.com/v1/models \
  -H "Authorization: Bearer $ABLITAI_API_KEY"

PowerShell

PowerShell
$headers = @{ Authorization = "Bearer $env:ABLITAI_API_KEY" }
Invoke-RestMethod -Uri "https://api.ablitai.com/v1/models" -Headers $headers

A successful response includes qwen3.8-27b-abliterated. A 401 response means the key is missing or invalid.

5. Make a completion

macOS or Linux

macOS / Linux · cURL
curl https://api.ablitai.com/v1/chat/completions \
  -H "Authorization: Bearer $ABLITAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.8-27b-abliterated",
    "messages": [{"role": "user", "content": "Explain zero-knowledge proofs simply."}],
    "max_tokens": 300
  }'

PowerShell

PowerShell
$headers = @{ Authorization = "Bearer $env:ABLITAI_API_KEY" }
$body = @{
  model = "qwen3.8-27b-abliterated"
  messages = @(@{ role = "user"; content = "Explain zero-knowledge proofs simply." })
  max_tokens = 300
} | ConvertTo-Json -Depth 4
$response = Invoke-RestMethod -Uri "https://api.ablitai.com/v1/chat/completions" `
  -Method Post -Headers $headers -ContentType "application/json" -Body $body
$response.choices[0].message.content

Python

Requires Python 3.10 or newer.

Install tested SDK
python --version
python -m pip install openai==3.8.0
Python · openai
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ABLITAI_API_KEY"],
    base_url="https://api.ablitai.com/v1",
    max_retries=0,
)

response = client.chat.completions.create(
    model="qwen3.8-27b-abliterated",
    messages=[{"role": "user", "content": "Explain zero-knowledge proofs simply."}],
    max_tokens=300,
)
print(response.choices[0].message.content)

Save the Python block as quickstart.py, then run python quickstart.py from the same terminal.

Node.js

Requires Node.js 22 or newer.

Install tested SDK
node --version
npm install openai@7.10.0
JavaScript · openai
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ABLITAI_API_KEY,
  baseURL: "https://api.ablitai.com/v1",
  maxRetries: 0,
});

const response = await client.chat.completions.create({
  model: "qwen3.8-27b-abliterated",
  messages: [{ role: "user", content: "Explain zero-knowledge proofs simply." }],
  max_tokens: 300,
});
console.log(response.choices[0].message.content);

Save the JavaScript block as quickstart.mjs, then run node quickstart.mjs from the same terminal.

The launch examples disable automatic SDK retries so a capacity, balance, or service response is returned once and a metered request is not replayed invisibly.

Streaming

Set stream: true. The API returns OpenAI-compatible SSE events and requests final usage from the inference server. If output starts but a disconnect prevents final usage from arriving, the request may be charged up to its reserved maximum.

Compatibility status

“OpenAI-compatible” currently describes the text Chat Completions route. It does not mean every OpenAI or agent endpoint is live.

Client or protocolStatusRelease condition
cURL, OpenAI Python 3.8.0, OpenAI Node.js 7.10.0Local SDK pass · GPU validatingRepeat the SDK matrix and burn-in on the exact launch GPU.
OpenCodeReference-only · local/mock evidenceTools are on; coding-harness use remains reference-only until sustained exact-GPU evidence is published.
CodexReference-only · local/mock evidenceTools are on; Responses/harness paths remain reference-only until sustained exact-GPU evidence is published.
Claude CodeReference-only · local/mock evidence · unofficialTools are on; Claude Code remains unofficial/reference-only. Anthropic does not support using Claude Code with non-Claude models.

See integration readiness for the exact gates and candidate setup links. The configuration is available for review, but no harness is approved for paid use until live end-to-end validation passes.

Vision / multimodal

Send OpenAI-style multimodal messages. Any request that includes an image_url content part is routed to Huihui-Qwen3-VL-8B-Instruct-abliterated. You can keep using model id qwen3.8-27b-abliterated in the client; the gateway rewrites the upstream model for vision.

Images must be embedded as data:image/...;base64,... URLs. Remote http:// or https:// image fetches are not supported (the API returns 400). Audio and video parts are rejected. Vision context is smaller than the text 131K envelope (~8K on the VL sidecar).

Multimodal · cURL sketch
curl https://api.ablitai.com/v1/chat/completions \
  -H "Authorization: Bearer $ABLITAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.8-27b-abliterated",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "What color is this pixel?"},
        {"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}}
      ]
    }]
  }'

Limits

Concurrency, queueing and errors

Inference admission is shared across API keys. Per API key, up to 3 requests run at once and up to 5 more wait in a fair round-robin queue across keys. Beyond that the API returns 429 with Retry-After: 2.

If the global queue is full (200 deep) or a request waits over 600 seconds, the API returns 503 with Retry-After: 5. Credits are reserved only when a request starts running, so waiting is never billed. A client disconnect while queued drops the ticket with no charge.

Streaming requests that are queued receive SSE comment keepalives (: queued position=N) about every 5 seconds. OpenAI-compatible clients ignore SSE comments. Vision has its own queue (2 slots).

Public live queue: GET https://api.ablitai.com/v1/status/queue (no auth). See also /status.

CodeMeaningTypical Retry-After
402Insufficient credits — top up before retrying.—
429Per-key concurrency / queued cap exceeded (more than 3 running + 5 waiting on that key).2
503Global queue full, max wait exceeded, or readiness/maintenance unavailable.5 (when queue-related)

OpenCode / Claude Code / Codex: respect Retry-After; do not run more than 3 parallel requests per API key. Waiting in the fair queue is not billed; exceeding the per-key wait slots is rejected with 429.

Credits and metering

All prices are USD. One credit pays for one prompt or generated token included in usage.total_tokens. The account page reads the verified live catalog and keeps payment buttons disabled unless the API explicitly opens a provider. Bitcoin beta checkout is open without a customer-facing location attestation. Card checkout remains closed.

Errors

Privacy boundary

AblitAI's application does not intentionally retain prompts or generated responses. Requests are processed transiently in memory by the gateway and inference service. Infrastructure providers may process network and operational metadata; read the privacy notice for the full boundary.