Using the console
- Registration is invite-only. Ask an existing member for an invite code, then sign up with it.
- After signing in, create an API key under “API Keys”. The full key is shown only once — copy and store it safely.
- Use the key as a Bearer token in API requests. You can disable or delete keys at any time.
- Balance and usage are shown in the console. Top-ups are manual for now — contact the operator.
- The console supports light/dark theme and Chinese/English. All data is scoped to your own account.
Using the API
https://api.plekoai.com/v1
Authorization: Bearer sk-plk-…
Every request must carry the Authorization header with your key.
Models: GET /v1/models lists all available models. “~latest” aliases always resolve to the newest model of a family.
Both streaming (stream: true) and non-streaming responses are supported. Streaming reports usage in the final chunk.
Errors follow the OpenAI error format (JSON with error.message / error.code). HTTP 402 means insufficient balance.
from openai import OpenAI
client = OpenAI(
base_url="https://api.plekoai.com/v1",
api_key="sk-plk-你的密钥",
)
r = client.chat.completions.create(
model="~openai/gpt-sol-latest",
messages=[{"role": "user", "content": "你好"}],
)
print(r.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.plekoai.com/v1",
apiKey: "sk-plk-你的密钥",
});
const r = await client.chat.completions.create({
model: "~openai/gpt-sol-latest",
messages: [{ role: "user", content: "你好" }],
});
console.log(r.choices[0].message.content);
curl -X POST https://api.plekoai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-plk-你的密钥" \
-d '{"model":"~openai/gpt-sol-latest","messages":[{"role":"user","content":"你好"}]}'
Use with opencode
opencode requires a static model list for custom providers. Save the following as your opencode.json, restart opencode, then pick a model with /models.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"plekoai": {
"npm": "@ai-sdk/openai-compatible",
"name": "PlekoAI",
"options": {
"baseURL": "https://api.plekoai.com/v1",
"apiKey": "sk-plk-你的密钥"
},
"models": {
"~anthropic/claude-sonnet-latest": { "name": "Claude Sonnet (latest)" },
"~openai/gpt-sol-latest": { "name": "GPT Sol (latest)" },
"~google/gemini-flash-latest": { "name": "Gemini Flash (latest)" }
}
}
},
"model": "plekoai/~anthropic/claude-sonnet-latest",
"small_model": "plekoai/~google/gemini-flash-latest"
}
Change the default model by editing the top-level model field. Any OpenRouter slug or ~latest alias works.
Use with Cursor
In Cursor, open Settings → Models, enter your sk-plk- key as the OpenAI API key and set the Base URL to https://api.plekoai.com/v1.
Then choose any model — the gateway forwards it to the upstream provider.
Other tools & SDKs
Any OpenAI-compatible SDK or client works: set base_url to https://api.plekoai.com/v1 and api_key to your sk-plk- key (Python openai, Node openai, LobeChat, Chatbox, etc.).