@gabai/pi-gab-ai

Gab AI model provider and media tools package for Pi.

Packages

Package details

extension

Install @gabai/pi-gab-ai from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@gabai/pi-gab-ai
Package
@gabai/pi-gab-ai
Version
0.2.0
Published
May 19, 2026
Downloads
not available
Author
gabai
License
MIT
Types
extension
Size
45 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions/gab-ai.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-gab-ai

Gab AI provider and tools package for Pi.

This package registers Gab AI as a Pi model provider using Gab's OpenAI-compatible API at https://gab.ai/v1. It adds Gab models to Pi's normal model picker, includes a /gab command for first-time setup, model switching, status checks, and logout, and exposes Gab API tools for models, credits, usage, images, videos, speech, embeddings, files, API keys, and account export workflows when those endpoints are available on the API.

Install

From npm:

pi install npm:@gabai/pi-gab-ai

From GitLab:

pi install git:git@gitlab.com:GabAIInc/pi-gab-ai.git

Or over HTTPS:

pi install https://gitlab.com/GabAIInc/pi-gab-ai

From a local checkout:

pi install /path/to/pi-gab-ai

To try it for one Pi run without installing:

pi -e git:git@gitlab.com:GabAIInc/pi-gab-ai.git

Setup

Inside Pi:

/gab

Pi will prompt for your Gab AI API key once, save it in Pi's normal auth store, and then show a Gab model picker.

You can also use Pi's normal login flow:

/login

Then choose Use an API key and select Gab AI.

Environment variables also work:

export GAB_API_KEY="your_gab_api_key"
pi --models "gab/*"

GAB_AI_API_KEY is accepted as an alternative.

Usage

Start Pi with all Gab models available for cycling:

pi --models "gab/*"

Switch directly from inside Pi:

/gab arya
/gab gpt-5-5
/gab status
/gab logout

Or use Pi's normal model flags:

pi --provider gab --model arya
pi --model gab/gpt-5-5
pi --list-models gab

If you select a Gab model before configuring a key, the package prompts for the key on first use.

Gab API tools

The package also registers these Pi tools:

  • gab_get_credits checks the authenticated account credit balance.
  • gab_get_usage fetches API usage history with optional date, endpoint, model, cursor, and limit filters.
  • gab_list_models lists live Gab API models and can filter by text, image, video, audio, or embedding.
  • gab_generate_image calls /v1/images/generations and returns generated image URLs. Small returned images are also attached inline when Pi can fetch them.
  • gab_generate_video calls /v1/videos/generations, returns the async job ID, and can poll /v1/videos/:jobId until completion.
  • gab_text_to_speech calls /v1/audio/speech and returns the generated audio URL.
  • gab_create_embeddings calls /v1/embeddings when /v1/models?type=embedding returns an available embedding model.
  • gab_upload_file, gab_list_files, gab_get_file, and gab_delete_file cover the Gab AI Files API.
  • gab_list_api_keys, gab_create_api_key, and gab_delete_api_key cover API-key management. Creation returns the new secret once; deletion should only be used when explicitly requested.
  • gab_export_account_data calls /v1/account/export and returns a compact summary of the JSON export.

Example:

Use gab_generate_image to create one image of a red square centered on a white background.

Notes

Pi packages run with full system access. Review the extension source before installing third-party packages.

Model metadata is bundled so Gab models are available in Pi immediately, including before API-key setup. The API key is only needed when Pi sends a request to Gab.

For local API development, set GAB_AI_BASE_URL or GAB_BASE_URL to override the default https://gab.ai/v1.