Documentation

Build with Pixelit

One OpenAI-compatible API for 35+ open-source models at up to 70% below list price. If your code talks to OpenAI, it already talks to Pixelit — change two lines and you're in.

Quickstart

  1. 1Create an account and open your dashboard.
  2. 2Click New key, then copy it immediately; it's shown once. Add credits before your first billable request.
  3. 3Point any OpenAI-compatible client at our base URL with your key:

Base URL

https://api.pixelit.pro/v1

local dev: http://localhost:4000/v1

Authentication

Every request needs your virtual API key as a Bearer token. Keys are scoped to your account, carry your credit balance and rate limits, and can be revoked anytime from the dashboard.

Authorization: Bearer pxit-sk-••••••••••••

Never ship keys in client-side code — call from your backend.

Code examples

chat.py
1from openai import OpenAI
2
3client = OpenAI(
4 base_url="https://api.pixelit.pro/v1",
5 api_key="pxit-sk-...", # from your dashboard
6)
7
8resp = client.chat.completions.create(
9 model="kimi-k3",
10 messages=[{"role": "user", "content": "Explain KV caching in 2 lines"}],
11 stream=False,
12)
13print(resp.choices[0].message.content)
Python · openai SDK
stream.ts
1import OpenAI from "openai";
2
3const client = new OpenAI({
4 baseURL: "https://api.pixelit.pro/v1",
5 apiKey: process.env.PIXELIT_API_KEY,
6});
7
8// streaming works too
9const stream = await client.chat.completions.create({
10 model: "glm-5.2",
11 messages: [{ role: "user", content: "Hello!" }],
12 stream: true,
13});
14
15for await (const chunk of stream) {
16 process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
17}
TypeScript · streaming
request.sh
1curl https://api.pixelit.pro/v1/chat/completions -H "Authorization: Bearer $PIXELIT_API_KEY" -H "Content-Type: application/json" -d '{
2 "model": "deepseek-v4-pro",
3 "messages": [{"role": "user", "content": "Hello!"}]
4 }'
cURL

Coding agents

Use Pixelit inside your favorite AI coding tool — cheap open models for autocomplete, chat and agentic coding. Anything that speaks the OpenAI or Anthropic API works.

Claude Code

terminal
1export ANTHROPIC_BASE_URL=https://api.pixelit.pro
2export ANTHROPIC_AUTH_TOKEN=pxit-sk-...
3export ANTHROPIC_MODEL=kimi-k3
4
5claude
our gateway also speaks the Anthropic Messages API

Codex CLI

~/.codex/config.toml
1model_provider = "pixelit"
2model = "kimi-k3"
3
4[model_providers.pixelit]
5name = "pixelit.pro"
6base_url = "https://api.pixelit.pro/v1"
7env_key = "PIXELIT_API_KEY"
8wire_api = "chat"

Cursor

  1. Open Settings → Models
  2. Under OpenAI API Key, paste your pxit-sk-… key
  3. Enable Override OpenAI Base URLhttps://api.pixelit.pro/v1
  4. Add a model named kimi-k3 (or any from the catalog) and select it

opencode

~/.config/opencode/opencode.json
1{
2 "$schema": "https://opencode.ai/config.json",
3 "provider": {
4 "pixelit": {
5 "npm": "@ai-sdk/openai-compatible",
6 "name": "pixelit.pro",
7 "options": {
8 "baseURL": "https://api.pixelit.pro/v1",
9 "apiKey": "pxit-sk-..."
10 },
11 "models": {
12 "kimi-k3": { "name": "Kimi K3" },
13 "glm-5.2": { "name": "GLM 5.2" }
14 }
15 }
16 }
17}

pi

~/.pi/agent/extensions/pixelit.ts
1import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
3export default function (pi: ExtensionAPI) {
4 pi.registerProvider("pixelit", {
5 name: "pixelit.pro",
6 baseUrl: "https://api.pixelit.pro/v1",
7 apiKey: "$PIXELIT_API_KEY",
8 api: "openai-completions",
9 models: [
10 {
11 id: "kimi-k3",
12 name: "Kimi K3",
13 reasoning: true,
14 input: ["text"],
15 cost: { input: 0.3, output: 1.5, cacheRead: 0, cacheWrite: 0 },
16 contextWindow: 1000000,
17 maxTokens: 8192,
18 },
19 {
20 id: "glm-5.2",
21 name: "GLM 5.2",
22 reasoning: true,
23 input: ["text"],
24 cost: { input: 0.076, output: 0.242, cacheRead: 0, cacheWrite: 0 },
25 contextWindow: 1000000,
26 maxTokens: 8192,
27 },
28 ],
29 });
30}
restart pi, then /login or set PIXELIT_API_KEY

Aider

terminal
1export OPENAI_API_BASE=https://api.pixelit.pro/v1
2export OPENAI_API_KEY=pxit-sk-...
3
4aider --model kimi-k3

Thinking / reasoning models

Reasoning models (Kimi K3, GLM 5.2, DeepSeek V4 Pro, DeepSeek R1) return their chain-of-thought in a separate reasoning_content field alongside the answer in content. When streaming, reasoning chunks arrive first, then the answer — perfect for a “show thinking” UI. Token usage splits are in usage.completion_tokens_details.reasoning_tokens.

response.json
{
"choices": [{
"message": {
"role": "assistant",
"reasoning_content": "Compute 17*23: 17*20 + 17*3 = 391.",
"content": "17 × 23 = 391"
}
}],
"usage": {
"completion_tokens_details": { "reasoning_tokens": 30 }
}
}

Model catalog

Request any model by its ID — e.g. kimi-k3, glm-5.2, deepseek-v4-pro. A sample of the catalog — prices per 1M tokens, list vs Pixelit:

ModelIn / OutSave
Kimi K3$3.00/$15.00$0.90/$4.5070%
GLM 5.2$0.76/$2.42$0.23/$0.7370%
DeepSeek V4 Pro$0.28/$0.42$0.084/$0.1370%
DeepSeek V4 Flash$0.090/$0.18$0.027/$0.05470%
Kimi K2.7 Code$0.73/$3.50$0.22/$1.0570%
MiniMax M3$0.30/$1.20$0.090/$0.3670%
Nemotron 3 Ultra$0.60/$3.60$0.18/$1.0870%
Nemotron 3 Super$0.085/$0.40$0.025/$0.1270%
Mistral Medium 3.5$1.50/$7.50$0.45/$2.2570%
Codestral$1.00/$3.00$0.30/$0.9070%
gpt-oss-120b$0.037/$0.17$0.011/$0.05170%
Trinity Large Thinking$0.22/$0.85$0.066/$0.2670%
DeepSeek V3.2$0.28/$0.42$0.084/$0.1370%
DeepSeek R1$0.28/$0.42$0.084/$0.1370%
Llama 4 Maverick$0.20/$0.80$0.060/$0.2470%
Qwen3 235B$0.23/$2.30$0.069/$0.6970%
Mistral Large 3$0.50/$1.50$0.15/$0.4570%
GLM-4.6$0.30/$0.90$0.090/$0.2770%
Qwen3 Coder$0.12/$0.80$0.036/$0.2470%
Llama 3.3 70B$0.59/$0.79$0.18/$0.2470%
Gemma 3 27B$0.080/$0.45$0.024/$0.1470%
Mistral Small 3$0.060/$0.18$0.018/$0.05470%

Full live list: GET /v1/models with your key.

Errors & retries

Errors follow the OpenAI shape with standard HTTP status codes. Transient blips are retried automatically — if a request still fails, you get a clean, honest error. No silent degradation, ever.

error.json
{
"error": {
"message": "You have exceeded your credit budget",
"type": "budget_exceeded",
"code": 429
}
}
200Success
400Bad request — check model name, messages format & params
401Invalid or revoked API key
429Out of credits, or plan RPM/TPM limit hit — top up or back off
500Something failed on our side — logged & alerted instantly

Rate limits & credits

Pay as you go

30 RPM · 100K TPM · top up before use · all 33 models

4-Day Unlimited · $40

Kimi K3 and GLM 5.2 · renews every 4 days · 120 RPM safeguard

Model access, RPM, and TPM safeguards are enforced at the gateway. Admins can set custom per-user limits — contact us for bursts.

FAQ

Which SDKs work with Pixelit?

Anything OpenAI-compatible: the official OpenAI Python/Node SDKs, LangChain, LlamaIndex, Vercel AI SDK, or plain HTTP. Just change base_url and api_key.

How do credits work?

1 credit = $1 of usage at our discounted rates. Pay as you go with packs (never expire), or go Pro ($40/mo) for 5,000 requests every day. Our gateway enforces your quota on every request — you get a clean 429 when you run out.

What happens when a request fails?

Transient blips are retried automatically. If it still fails, you get a standard HTTP error code (400/401/429/500) with a clear message — we never silently swap your model or hide failures. Every error is deduped and visible to our ops team in real time.

Do you train on my data?

Never. Prompts pass through to the model provider and are not stored or used for training. Enterprise plans can enable zero-retention mode.

Why only open-source models?

Open weights mean no vendor lock-in, transparent pricing, and the freedom to fine-tune. We pass the infra savings straight to you — that's how we hit 70% off.