DEVELOPERS

Nicepe AI API

A single, OpenAI-compatible endpoint. If you already use the OpenAI SDK, just change the base_url and your key — everything else stays the same. One key, one bill, billed per use from your wallet.

🧩 Use Nicepe AI inside VS Code

⬇ Download extension (.vsix)

A built-in AI assistant in your editor — chat, explain & generate code, just like Claude Code. Connects to your Nicepe AI account with one API key.

  1. Download the nicepe-ai.vsix file above.
  2. Open VS Code → top menu View → Extensions. In that panel, click the ··· (three dots, top-right corner) → Install from VSIX… → choose the downloaded file.
  3. Top menu View → Command Palette → type “Nicepe AI: Set API Key” and click it → paste your key from /api-keys.
  4. The Nicepe AI icon now appears on the left side bar — click it to chat. Select code & right-click → Ask about selection / Explain.

⚡ Or install in ONE terminal command — open VS Code's terminal (top menu Terminal → New Terminal) and paste:

curl -L https://ai.nicepe2.com/static/downloads/nicepe-ai.vsix -o nicepe-ai.vsix && code --install-extension nicepe-ai.vsix

Windows (PowerShell): iwr https://ai.nicepe2.com/static/downloads/nicepe-ai.vsix -OutFile nicepe-ai.vsix; code --install-extension nicepe-ai.vsix

No .vsix option? Download the source zip, unzip it into ~/.vscode/extensions/ and reload VS Code.

1 · Base URL & authentication

Send your Nicepe AI key as a Bearer token (or x-api-key). Create keys at /api-keys.

Base URL: https://ai.nicepe2.com/v1 Header: Authorization: Bearer YOUR_NICEPE_KEY

2 · Chat completions

POST /v1/chat/completions — body: model (a tier id from the list below), messages (array of {role, content}), optional max_tokens, temperature. The response is OpenAI-shaped and also carries x_aihub with the request cost and your wallet balance.

curl https://ai.nicepe2.com/v1/chat/completions \ -H "Authorization: Bearer YOUR_NICEPE_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"nicepe-ai-pro","messages":[{"role":"user","content":"Hello!"}]}'
from openai import OpenAI client = OpenAI(base_url="https://ai.nicepe2.com/v1", api_key="YOUR_NICEPE_KEY") r = client.chat.completions.create( model="nicepe-ai-pro", messages=[{"role": "user", "content": "Write a haiku about India"}], ) print(r.choices[0].message.content)
const res = await fetch("https://ai.nicepe2.com/v1/chat/completions", { method: "POST", headers: { "Authorization": "Bearer YOUR_NICEPE_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ model: "nicepe-ai-lite", messages: [{ role: "user", content: "Hi" }] }) }); const data = await res.json(); console.log(data.choices[0].message.content);

3 · Available models

Pick a tier by its id. Higher tiers are more capable; you are billed per token from your wallet (a 402 is returned when your balance runs out — top up at /wallet).

Model idTier
nicepe-ai-freeNicepe AI Free
nicepe-ai-liteNicepe AI Lite
nicepe-ai-standard-6Nicepe AI Standard
nicepe-ai-pro-4Nicepe AI Pro
nicepe-ai-maxNicepe AI Max

4 · Other endpoints

EndpointDescription
GET /v1/modelsList available model tiers.
GET /v1/balanceYour current wallet balance and usage.
POST /v1/chat/completionsGenerate a chat completion (above).