
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@pathcourse/ai
Advanced tools
PathCourse Health provider for the Vercel AI SDK. Drop autonomous agent inference into any Next.js app with a one-line provider swap — no accounts, no credit cards, no KYC.
npm install @pathcourse/ai
// app/api/chat/route.ts
import { streamText } from "ai";
import { pathcourse } from "@pathcourse/ai";
export async function POST(req: Request) {
const { messages } = await req.json();
const result = await streamText({
model: pathcourse("pch-fast"),
messages,
});
return result.toDataStreamResponse();
}
Set PCH_API_KEY in .env.local. That is the only change.
@ai-sdk/openai// Before
import { openai } from "@ai-sdk/openai";
const result = await generateText({ model: openai("gpt-4o-mini"), prompt });
// After
import { pathcourse } from "@pathcourse/ai";
const result = await generateText({ model: pathcourse("pch-fast"), prompt });
Every Vercel AI SDK feature works unchanged — generateText, streamText, generateObject,
tool calls, structured output, multi-turn streaming with useChat.
import { createPathCourse } from "@pathcourse/ai";
import { generateText } from "ai";
const pathcourse = createPathCourse({ apiKey: process.env.PCH_API_KEY });
const { text } = await generateText({
model: pathcourse("pch-pro"),
prompt: "Plan a multi-step research workflow.",
});
import { pathcourseEmbedding } from "@pathcourse/ai";
import { embed } from "ai";
const { embedding } = await embed({
model: pathcourseEmbedding(),
value: "What is Path Score?",
});
| Model | Rate | Min tier | Notes |
|---|---|---|---|
pch-fast | $0.44 / M tokens | uncertified | Fast reasoning, classification, routing |
pch-coder | $3.50 / M tokens | uncertified | Code generation, debugging |
pch-embed | $0.015 / M tokens | uncertified | Text embeddings for semantic search / RAG |
pch-translate | $0.08 / M chars | uncertified | Multilingual translation |
pch-pro | $1.96 / M tokens | bronze | Deep reasoning, multi-step planning |
pch-audio | $1.85 / M chars | bronze | Text-to-speech, standard quality |
pch-documents | $0.26 in / $1.48 out per M tokens | bronze | Document parsing / OCR |
pch-transcribe | $0.0008 / minute | bronze | Speech-to-text |
pch-extract | $0.012 / M tokens | bronze | Structured data extraction |
pch-rerank | $0.025 / M tokens | bronze | Reranking for RAG pipelines |
pch-image | $0.028 / image | silver | Text-to-image |
pch-audio-premium | $37.00 / M chars | silver | Text-to-speech, premium quality |
pch-talk | $0.001 / minute | silver | Voice conversation |
claude-haiku | Common rate | silver | Anthropic Claude Haiku |
claude-sonnet | Common rate | gold | Anthropic Claude Sonnet |
The full list above shows what's reachable through the gateway. pathcourse(model) works for any chat-completion model; for image/audio/transcription, use the PCH JS SDK directly.
Choosing a chat model:
pch-fastpch-propch-coderclaude-sonnet (Gold tier)Set PCH_API_KEY in your environment, or pass apiKey to createPathCourse.
# .env.local
PCH_API_KEY=pch_prod_b_...
Developer access — $5 USDC. Send $5+ USDC on Base (chain ID 8453) to the PCH treasury wallet, then call claimKey({ txHash, wallet }) to retrieve your key. No accounts, no credit card, no KYC. $5 buys thousands of pch-fast calls — enough to verify any Next.js or Vercel AI SDK integration. Top up to $25 lifetime and your account auto-upgrades to Uncertified with pch-coder access. Treasury address: see payment.treasury_wallet in /.well-known/agent.json.
MIT
FAQs
PathCourse Health provider for the Vercel AI SDK
We found that @pathcourse/ai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.