Prefy — AI Platform Skill
Quick Start
CODEBLOCK0
Authentication
All endpoints require Authorization: Bearer <key> header.
- - Conductor API: Use Prefy API key (starts with
pc_) - Server/Agent APIs: Use Supabase JWT token
Conductor AI — Smart Model Router
POST INLINECODE2
OpenAI-compatible. Drop-in replacement. Supports streaming.
Models
| Model | Best For | Speed |
|---|
| INLINECODE3 | Auto-route to best model | Auto |
| INLINECODE4 |
Speed priority | ⚡ |
|
conductor:quality | Quality priority | Medium |
|
conductor:creative | Creative tasks | Medium |
|
conductor:private | Privacy priority | Varies |
|
gemini-flash | Quick tasks | ⚡ |
|
gemini-pro | General purpose | Fast |
|
gpt-4o | Best all-round | Fast |
|
gpt-4o-mini | Budget tasks | ⚡ |
|
claude-sonnet | Analysis, writing | Fast |
|
deepseek-v3 | Code, math | Fast |
|
deepseek-r1 | Chain-of-thought | Medium |
|
llama-70b | Complex reasoning | Medium |
|
groq-llama | Speed-critical | ⚡ |
|
qwen-7b | Multilingual | Fast |
Strategies
Append strategy to conductor model name:
- -
:fast — Gemini Flash / Groq (cheapest, fastest) - INLINECODE20 — GPT-4o / Claude (best quality)
- INLINECODE21 — High temperature, diverse outputs
- INLINECODE22 — Routes through privacy-first providers
Web Search
POST INLINECODE23
CODEBLOCK1
Returns Tavily search results with snippets.
Image Generation
POST INLINECODE24
CODEBLOCK2
Returns base64 image. Uses Together AI FLUX Schnell (free tier).
Server Management
Provision and manage dedicated VPS servers.
- -
POST /api/v1/servers/checkout — Create Stripe checkout for server plan - INLINECODE26 — Send command to server agent
- INLINECODE27 — List user's servers
Server Plans
| Plan | Price | Specs |
|---|
| starter | $9.99/mo | 2 vCPU, 2GB RAM, 40GB SSD |
| plus |
$14.99/mo | 4 vCPU, 8GB RAM, 80GB SSD |
| pro | $29.99/mo | 8 vCPU, 16GB RAM, 160GB SSD |
Agent Commands
Send via POST
/api/v1/servers/command:
{"serverId": "...", "command": "stats"}
Available:
stats,
ollama list/pull/run/rm,
cron list/add/remove,
bot connect/stop/status, INLINECODE33
Agent API
POST INLINECODE34
Intelligent agent with memory, web search, intent detection.
CODEBLOCK4
Auto-detects intent: chat, search, flights, hotels, call.
AutoCall (Phone Calls)
POST INLINECODE35
AI phone calls to restaurants/hotels (Vapi + ElevenLabs).
CODEBLOCK5
Events & Activities
GET INLINECODE36
Returns upcoming events and activities for a city.
Rate Limits
| Tier | Requests/day |
|---|
| Free | 10 |
| Starter ($4.99/mo) |
100 |
| Pro ($14.99/mo) | 500 |
| BYOK | Unlimited |
Docs
Full documentation: https://prefy.com/docs
Prefy — AI平台技能
快速开始
bash
聊天补全(兼容OpenAI,支持流式输出)
curl https://prefy.com/api/v1/chat/completions \
-H Content-Type: application/json \
-H Authorization: Bearer $PREFY
APIKEY \
-d {model:conductor:fast,messages:[{role:user,content:你好}],stream:true}
身份验证
所有接口都需要 Authorization: Bearer 请求头。
- - Conductor API:使用 Prefy API 密钥(以 pc_ 开头)
- 服务器/代理 API:使用 Supabase JWT 令牌
Conductor AI — 智能模型路由器
POST https://prefy.com/api/v1/chat/completions
兼容 OpenAI。可直接替换。支持流式输出。
模型
| 模型 | 适用场景 | 速度 |
|---|
| conductor | 自动路由至最佳模型 | 自动 |
| conductor:fast |
速度优先 | ⚡ |
| conductor:quality | 质量优先 | 中等 |
| conductor:creative | 创意任务 | 中等 |
| conductor:private | 隐私优先 | 视情况而定 |
| gemini-flash | 快速任务 | ⚡ |
| gemini-pro | 通用用途 | 快速 |
| gpt-4o | 最佳全能 | 快速 |
| gpt-4o-mini | 预算任务 | ⚡ |
| claude-sonnet | 分析、写作 | 快速 |
| deepseek-v3 | 代码、数学 | 快速 |
| deepseek-r1 | 思维链 | 中等 |
| llama-70b | 复杂推理 | 中等 |
| groq-llama | 速度关键 | ⚡ |
| qwen-7b | 多语言 | 快速 |
策略
将策略附加到 conductor 模型名称后:
- - :fast — Gemini Flash / Groq(最便宜、最快)
- :quality — GPT-4o / Claude(最佳质量)
- :creative — 高温度、多样化输出
- :private — 通过隐私优先提供商路由
网络搜索
POST https://prefy.com/api/v1/search
json
{query: 最新AI新闻, max_results: 5}
返回包含摘要的 Tavily 搜索结果。
图像生成
POST https://prefy.com/api/v1/images/generate
json
{prompt: 山上的日落, model: flux-schnell}
返回 base64 图像。使用 Together AI FLUX Schnell(免费层级)。
服务器管理
配置和管理专用 VPS 服务器。
- - POST /api/v1/servers/checkout — 为服务器套餐创建 Stripe 结账
- POST /api/v1/servers/command — 向服务器代理发送命令
- GET /api/v1/servers/hetzner — 列出用户的服务器
服务器套餐
| 套餐 | 价格 | 规格 |
|---|
| 入门版 | $9.99/月 | 2 vCPU,2GB 内存,40GB SSD |
| 增强版 |
$14.99/月 | 4 vCPU,8GB 内存,80GB SSD |
| 专业版 | $29.99/月 | 8 vCPU,16GB 内存,160GB SSD |
代理命令
通过 POST /api/v1/servers/command 发送:
json
{serverId: ..., command: stats}
可用命令:stats、ollama list/pull/run/rm、cron list/add/remove、bot connect/stop/status、shell
代理 API
POST https://prefy.com/api/v1/agent
具备记忆、网络搜索、意图检测的智能代理。
json
{message: 查找下周从迪拜到伦敦的航班, userId: ...}
自动检测意图:聊天、搜索、航班、酒店、电话。
AutoCall(电话通话)
POST https://prefy.com/api/v1/autocall
AI 电话呼叫餐厅/酒店(Vapi + ElevenLabs)。
json
{
phone: +971...,
venue_name: 餐厅名称,
task: 预订2人桌,周五晚上8点,
language: en
}
活动与活动
GET https://prefy.com/api/v1/events?city=Dubai
返回某个城市即将举行的活动和活动。
速率限制
100 |
| 专业版($14.99/月) | 500 |
| BYOK | 无限制 |
文档
完整文档:https://prefy.com/docs