Multi-Provider
One interface, any provider, any surface. Your backend code is your frontend code - your OpenAI code is your anthropic code.
Multi-Provider
One interface, any provider, any surface. Your backend code is your frontend code - your OpenAI code is your anthropic code.
Type-Safe
Full TypeScript support with intelligent autocompletion and compile-time checks.
Transparent
Build without worrying about magic, read provider official documentation and you already know how to use Provider Protocol.
Modular
Purpose-built interfaces for llm(), embedding(), and image().
import { llm, embedding } from '@providerprotocol/ai';import { anthropic } from '@providerprotocol/ai/anthropic';import { openai } from '@providerprotocol/ai/openai';
// LLM inference with Claudeconst claude = llm({ model: anthropic('claude-sonnet-4-20250514'), system: 'You are a helpful assistant.',});
const response = await claude.generate('Explain quantum computing');console.log(response.text);
// Generate embeddings with OpenAIconst embedder = embedding({ model: openai('text-embedding-3-large'),});
const vector = await embedder.embed('Hello, world!');| Interface | Status | Description |
|---|---|---|
| LLM | Stable | Text generation, streaming, tools, structured output |
| Embedding | Stable | Vector embeddings, batch processing, similarity |
| Image | Stable | Generation, editing, variations |
| Audio | Planned | Speech-to-text, text-to-speech |
Introduction
Learn about Provider Protocol’s goals and architecture.
Quick Start
Follow the Quick Start guide to begin building.