openzoo-ai-provider
v0.1.0
Published
OpenZoo provider for the Vercel AI SDK — free OpenAI-compatible inference, no signup required
Maintainers
Readme
OpenZoo AI Provider for the Vercel AI SDK
Community provider for the Vercel AI SDK that gives access to
OpenZoo — pay-per-call, OpenAI-compatible inference with
no signup and no API key required (each request settles via x402 or card) —
via its hosted endpoint (https://api.openzoo.fun/v1) or a local gateway
(npx openzoo, http://localhost:8402/v1) that pays automatically from a
burner wallet.
Installation
npm install openzoo-ai-providerSetup
There is nothing to set up. OpenZoo accepts any API key — the provider defaults to
the OPENZOO_API_KEY environment variable if present, and otherwise sends the
literal sk-openzoo. You never need to create an account or set a variable.
Usage
import { openzoo } from 'openzoo-ai-provider';
import { generateText } from 'ai';
const { text } = await generateText({
model: openzoo('z-ai/glm-5.3-flash'),
prompt: 'Say this is a test',
});
console.log(text);Streaming
import { openzoo } from 'openzoo-ai-provider';
import { streamText } from 'ai';
const result = streamText({
model: openzoo('z-ai/glm-5.3-flash'),
prompt: 'Write a haiku about pay-per-call inference.',
});
for await (const chunk of result.textStream) {
process.stdout.write(chunk);
}Local gateway
Run the local OpenZoo gateway and point the provider at it:
npx openzooimport { createOpenZoo } from 'openzoo-ai-provider';
const openzoo = createOpenZoo({
baseURL: 'http://localhost:8402/v1',
});Custom configuration
import { createOpenZoo } from 'openzoo-ai-provider';
const openzoo = createOpenZoo({
apiKey: 'sk-anything-works', // optional — any value is accepted
baseURL: 'https://api.openzoo.fun/v1',
headers: { 'X-Custom': 'value' },
});Available Models
The model list is free to query at any time:
curl https://api.openzoo.fun/v1/modelsz-ai/glm-5.3-flash is a good default. Any model ID returned by /v1/models
can be passed as a plain string.
License
MIT
