Skip to content
publik.
Browse appsAppsPricing
+Publish a repoPublish
Browse appsHow it worksPublish a repoGet helpPricingDevelopersGitHubPrivacy
© 2026 Publik

Looking for plans and prices? See pricing →

publik API for builders

One key, every app, priced in dollars.

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.

Models

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.

    Served by
    z-ai/glm-5.3-flash
    Also answers to
    gpt-4o-mini, claude-haiku-4-5
  • publik-balanced

    The default. publik-default is a synonym.

    Served by
    xiaomi/mimo-v2.6-pro
    Also answers to
    gpt-4o, claude-sonnet-4-6
  • publik-smart

    The strongest tier. Needs a computer linked to a publik account.

    Served by
    openai/gpt-6-sol
    Also answers to
    claude-opus-5
Model tiers, what serves each one, and the names it answers to
TierServed byUse it forAlso answers to
publik-fastz-ai/glm-5.3-flashQuick answers, cleanup, classification. The cheapest tier.gpt-4o-mini, claude-haiku-4-5
publik-balancedxiaomi/mimo-v2.6-proThe default. publik-default is a synonym.gpt-4o, claude-sonnet-4-6
publik-smartopenai/gpt-6-solThe strongest tier. Needs a computer linked to a publik account.claude-opus-5

Base URL

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.

curl https://publikhq.com/api/v1/chat/completions \
  -H "Authorization: Bearer pk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"model":"publik-balanced","messages":[{"role":"user","content":"Hello"}]}'

Endpoints

  • POST /chat/completionsOpenAI Chat Completions, streaming included
  • POST /responsesOpenAI Responses
  • POST /messagesAnthropic Messages, translated
  • POST /embeddingsthe provider’s price, nothing added
  • POST /audio/transcriptionsthe provider’s price, nothing added · files under 4 MB
  • POST /audio/speechthe provider’s price, nothing added
  • POST /images/generationsthe provider’s price, nothing added
  • POST /searchweb results for a query · one cent a search, whatever the count
  • GET /modelsthe tiers and every alias, OpenAI list shape
  • GET /walletbalance, this week’s budget and usage, reset time

What every response tells you

Each metered call returns x-publik-* headers with:

  • the model that served it
  • your balance after it
  • this week’s usage and budget
  • when the week resets
  • what the call cost

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.

Add it with your coding agent

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.
  • /skills/setup.md — the whole setup for an app that is not listed yet: list it, add publik API, and prove it with a call from the built app. Prompt: 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.
  • /skills/api.md — add publik API to an app: token, module, first-run card, proof call.
  • /skills/publish.md — list an app on publik from its GitHub repository. Prompt: 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.

Where your prompts go

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.

Request size

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.

Open your dashboard →Browse the apps