Install
Install with PiG
pig install npm:pi-sub2api-gatewayInstall with Pi
pi install npm:pi-sub2api-gatewayPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./extensions/sub2api.ts"
]
}README
Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.
pi-sub2api-gateway
Connect pi to your own Sub2API gateway — with your own endpoint and API key.
Sync chat models from a Sub2API
instance (self-hosted, OpenAI-compatible) into pi as provider sub2api.
Install
pi install npm:pi-sub2api-gateway
Or from git:
pi install git:github.com/billyriantono/pi-sub2api
What you get
| Command | Role |
|---|---|
/sub2api | Connect · set endpoint + your API key · sync models · diagnose · browse |
/sub2api-refresh | Headless re-sync of the model list |
Provider sub2api is registered with pi's model picker (/model) using the
OpenAI-compatible GET /v1/models catalog, enriched with curated display names,
reasoning/vision flags, and context limits.
60-second start
1. /sub2api # open the menu
2. Connection → Endpoint # your Sub2API base URL, e.g. https://sub2api.example.com/v1
3. Connection → API key # paste your key (Sub2API dashboard → API Keys)
4. Test connection # expect "OK · N models · XXms"
5. Sync models # register chat models
6. /model # provider sub2api
No key? Use the SUB2API_KEY environment variable instead:
export SUB2API_KEY=sk-xxxx # then /sub2api → Sync models
export SUB2API_URL=http://127.0.0.1:8080/v1 # optional, this is the default
Docs
| Doc | (blank) |
|---|---|
| Setup | Install, first run, env vars |
| Usage | Menus, sync, key management |
| Dev | Layout for contributors, tests |
Links
- Sub2API · pi.dev · Package gallery
- Modeled on pi-apikodex / @qmahyar/pi-9router
License
MIT