Looking for plans and prices? See pricing →
publik API for builders
publik API is the model access built into apps on publik. Your users need no key to paste. A new install starts at $0.00; linking it to a publik account gives $0.05 of free use, once, and their own key still works. It speaks the OpenAI and Anthropic APIs at one base URL, so the same key works from your scripts.
Chat is priced at publik’s published price for each tier. That price sits above the model’s cost, and you get half the difference on your app’s calls. Audio, embeddings and images pass through at the provider’s price. Plans for your users are on the pricing page.
Ask for a tier, not a vendor slug. When the model behind a tier changes, your code does not. Every name under “Served by” and “Also answers to” is an alias for its tier; nothing is passed through raw.
publik-fast
Quick answers, cleanup, classification. The cheapest tier.
publik-balanced
The default. publik-default is a synonym.
publik-smart
The strongest tier. Needs a computer linked to a publik account.
Point any OpenAI- or Anthropic-compatible client at https://publikhq.com/api/v1. Pass your key as Authorization: Bearer or x-api-key. Keys look like pk_live_…, and apps on your computer have one already. Make one for your scripts on the dashboard.
Each metered call returns x-publik-* headers with:
An empty balance returns a 402 with one link to fix it. An unlinked computer gets a claim link; a linked one gets an add-credit link.
Paste this into Claude Code, Codex or any coding agent, in your app’s repo, with your listing’s slug. The agent shows you a plan and changes nothing until you say yes. You approve it once in this browser, so run it in an interactive session. It adds publik API next to your users’ own-key option and proves it with one real call. No key passes through the chat.
Add publik API to my app (publik slug: <your-app-slug>): ask for a tier slug (publik-fast/balanced/smart), pick the cheapest one the task needs, and write the publik log line. Fetch https://publikhq.com/skills/api.md with curl and follow it step by step.Set up my app on publik: list it, wire publik API if it needs AI, and prove it with a real call from the built app. Fetch https://publikhq.com/skills/setup.md with curl and follow it step by step.List my app on publik. Fetch https://publikhq.com/skills/publish.md with curl and follow it step by step.Reference modules (TypeScript, Python, Swift, Rust) and the notes agents read are linked from /llms.txt.
Requests go through publik’s servers to a shared model account. publik does not train on them. It stores no request bodies beyond a 24-hour idempotency fingerprint. The model provider’s own abuse-monitoring retention applies. Every app that uses publik API also lets you use your own key instead.
Keep requests under 4 MB, base64-encoded images included. Resize screenshots first: about 1568 px on the long side as a JPEG is plenty. Audio for transcription has the same limit; split longer recordings client-side.