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.
Account guide · Billing · Troubleshooting · Status
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
$ablitSecret = Read-Host "AblitAI API key" -AsSecureString
$env:ABLITAI_API_KEY = [System.Net.NetworkCredential]::new("", $ablitSecret).Password
Remove-Variable ablitSecretmacOS or Linux
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_KEY4. Verify the key and model
macOS or Linux
curl https://api.ablitai.com/v1/models \
-H "Authorization: Bearer $ABLITAI_API_KEY"PowerShell
$headers = @{ Authorization = "Bearer $env:ABLITAI_API_KEY" }
Invoke-RestMethod -Uri "https://api.ablitai.com/v1/models" -Headers $headersA successful response includes qwen3.8-27b-abliterated. A 401 response means the key is missing or invalid.
5. Make a completion
macOS or Linux
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
$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.contentPython
Requires Python 3.10 or newer.
python --version
python -m pip install openai==3.8.0import 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.
node --version
npm install openai@7.10.0import 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 protocol | Status | Release condition |
|---|---|---|
| cURL, OpenAI Python 3.8.0, OpenAI Node.js 7.10.0 | Local SDK pass · GPU validating | Repeat the SDK matrix and burn-in on the exact launch GPU. |
| OpenCode | Reference-only · local/mock evidence | Tools are on; coding-harness use remains reference-only until sustained exact-GPU evidence is published. |
| Codex | Reference-only · local/mock evidence | Tools are on; Responses/harness paths remain reference-only until sustained exact-GPU evidence is published. |
| Claude Code | Reference-only · local/mock evidence · unofficial | Tools 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).
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
- Text context: engine max
131,072tokens forqwen3.8-27b-abliteratedon RTX 5090 (AWQ W4A16, bf16 compute, fp8 KV, vLLM 0.29.0). - Max output: up to
131,072tokens; ifmax_tokens/max_completion_tokensis omitted, the gateway defaults to512. - Prompt byte cap: the gateway also enforces
ABLIT_MAX_PROMPT_BYTES=131072(bytes, not tokens). Very long prompts can hit the byte limit before the token envelope. - Vision:
Huihui-Qwen3-VL-8B-Instruct-abliteratedhas an 8,192-token context on the vision path only. Images must bedata:image/…;base64,…URLs (remote http(s) image URLs are rejected). No video. Tools are not supported on image requests. - Per-key concurrency: 3 concurrent requests per API key.
- Account creation: 5 new accounts per minute.
- Checkout create: 3 checkout creations per hour.
- Signup credits: new accounts start with zero credits; buy Bitcoin packs via BTCPay when checkout is available.
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.
| Code | Meaning | Typical Retry-After |
|---|---|---|
402 | Insufficient credits — top up before retrying. | — |
429 | Per-key concurrency / queued cap exceeded (more than 3 running + 5 waiting on that key). | 2 |
503 | Global 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
400— invalid or unsupported request.401— missing or invalid API key.402— insufficient token credits.409— checkout capacity or rolling sales cap reached.413— request exceeds the configured context guard.429— concurrent request, per-key queue overflow, or checkout-attempt limit reached. See concurrency.503— inference/checkout readiness unavailable, global queue full, or max queue wait exceeded. See concurrency.
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.