Open-weight models through CrofAI
A pi provider extension with reasoning, vision, and live usage status.
- OpenAI-compatible API - Uses CrofAI's
/v1/chat/completionsendpoint - Reasoning models - Support for thinking models with
reasoning_effortparameter - Vision models - Image input support on Kimi K2.5, Kimi K2.6, GLM 5.1 (Precision), and Qwen 3.5 / 3.6
- Tool use - Function calling support
- Streaming - Real-time token streaming
- Free tier - Some models available at no cost (GLM 4.7 Flash, Qwen3.5 9B)
- Usage status bar β Displays your remaining credits and daily request count in the pi footer, updated live across sessions
| Model | Context | Vision | Reasoning | Input $/M | Output $/M |
|---|---|---|---|---|---|
| DeepSeek V3.2 | 164K | β | β | $0.18 | $0.35 |
| DeepSeek V4 Flash | 1.0M | β | β | $0.12 | $0.21 |
| DeepSeek V4 Pro | 1.0M | β | β | $0.35 | $0.80 |
| DeepSeek V4 Pro (Lightning) | 1.0M | β | β | $0.80 | $1.60 |
| Gemma 4 31B IT | 262K | β | β | $0.10 | $0.30 |
| GLM 4.7 | 203K | β | β | $0.25 | $1.10 |
| GLM 4.7 Flash | 203K | β | β | $0.04 | $0.30 |
| GLM 5 | 203K | β | β | $0.48 | $1.90 |
| GLM 5.1 | 203K | β | β | $0.45 | $2.15 |
| GLM 5.2 | 1.0M | β | β | $0.30 | $1.05 |
| Greg (Roleplay) | 229K | β | β | $0.10 | $0.30 |
| Greg 1 Mini | 229K | β | β | $0.07 | $0.15 |
| Greg 2 Super | 229K | β | β | $1.50 | $5.00 |
| Greg 2 Ultra | 229K | β | β | $3.00 | $10.00 |
| Kimi K2.5 | 262K | β | β | $0.35 | $1.70 |
| Kimi K2.5 (Lightning) | 131K | β | β | $1.00 | $3.00 |
| Kimi K2.6 | 262K | β | β | $0.50 | $1.99 |
| Kimi K2.7 Code | 262K | β | β | $0.55 | $2.25 |
| MiMo-V2.5-Pro | 1.0M | β | β | $0.40 | $0.80 |
| MiniMax M2.5 | 205K | β | β | $0.11 | $0.95 |
| Qwen3.5 397B A17B | 262K | β | β | $0.35 | $1.75 |
| Qwen3.5 9B | 262K | β | β | $0.04 | $0.15 |
| Qwen3.6 27B | 262K | β | β | $0.20 | $1.50 |
Install directly from GitHub:
pi install https://github.com/monotykamary/pi-crofai-providerThen set your API key and run pi:
# Recommended: add to auth.json
# See Authentication section below
# Or set as environment variable
export CROFAI_API_KEY=your-api-key-here
piGet your API key from crof.ai.
-
Clone this repository:
git clone https://github.com/monotykamary/pi-crofai-provider.git cd pi-crofai-provider -
Set your CrofAI API key:
# Recommended: add to auth.json # See Authentication section below # Or set as environment variable export CROFAI_API_KEY=your-api-key-here
-
Run pi with the extension:
pi -e /path/to/pi-crofai-provider
The CrofAI API key can be configured in multiple ways (resolved in this order):
auth.json(recommended) β Add to~/.pi/agent/auth.json:The{ "crofai": { "type": "api_key", "key": "your-api-key" } }keyfield supports literal values, env var names, and shell commands (prefix with!). See pi's auth file docs for details.- Runtime override β Use the
--api-keyCLI flag - Environment variable β Set
CROFAI_API_KEY
Get your API key from crof.ai.
| Variable | Required | Description |
|---|---|---|
CROFAI_API_KEY |
No | Your CrofAI API key (fallback if not in auth.json) |
Add to your pi configuration for automatic loading:
{
"extensions": [
"/path/to/pi-crofai-provider"
]
}Once loaded, select a model with:
/model crofai kimi-k2.5
Or use /models to browse all available CrofAI models.
For reasoning models, control thinking depth:
/reasoning high
Values: none, low, medium, high
Once authenticated, the pi footer shows your CrofAI account status:
$12.35 | β 450
$X.XXβ Remaining credit balance (hidden when $0)β Nβ Daily requests remaining (hidden when not on a subscription plan)
The count is fetched from CrofAI's usage API on session start and after each user prompt. Between syncs, the request count is decremented locally per turn to avoid unnecessary API calls.
The CrofAI proxy differs from native provider APIs in several ways. These are handled via patch.json:
| Aspect | Native APIs | CrofAI |
|---|---|---|
| Max tokens field | max_completion_tokens |
max_tokens |
| Thinking format | Varies (openai, zai, qwen-chat-template) | openai (always reasoning_content) |
| Developer role | Varies per model | β Supported on all models |
| Reasoning effort | Varies per model | Accepted by all reasoning models |
store parameter |
Varies | β Not supported |
Note: The CrofAI
/v1/modelsendpoint does not reliably report reasoning capability. Many models that support thinking are missing thecustom_reasoningorreasoning_effortflags.patch.jsoncorrects these based on E2E testing.
- CrofAI Docs: https://crof.ai/docs
- OpenAI-compatible endpoint:
https://crof.ai/v1 - Models endpoint:
https://crof.ai/v1/models - Usage endpoint:
https://crof.ai/usage_api/
MIT