Run your own AI provider
Deploy an OpenAI-compatible AI endpoint on Cloudflare with cloudflare-ai-deployer and point Notebooker at it.
Notebooker can use any OpenAI-compatible endpoint as an AI provider. If you’d
like to run the models yourself — for cost control, data residency, or just to
tinker — the open-source cloudflare-ai-deployer
project deploys one to your own Cloudflare account in a single command.
This is the same kind of gateway Notebooker runs in production, made public so you can run your own.
Get cloudflare-ai-deployer on GitHub →
What it deploys
A Cloudflare Worker that exposes an OpenAI-compatible REST API backed by Cloudflare Workers AI:
GET /v1/models list configured models
POST /v1/chat/completions chat / language model
POST /v1/embeddings embeddings
POST /v1/audio/transcriptions speech-to-text
POST /v1/audio/speech text-to-speech
Each endpoint is enabled only if you’ve configured a model for it.
Deploy it
You’ll need: Node.js 18+, a Cloudflare account (the free plan is enough), your Account ID, and an API token with Workers Scripts: Edit, Workers AI: Read, and User Details: Read permissions.
git clone https://github.com/Notebooker-ai/cloudflare-ai-deployer
cd cloudflare-ai-deployer
npm install
cp .env.example .env
# edit .env and set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID
npm run deploy
On the first deploy it auto-generates an API key (saved back to your .env) and
prints your worker’s base URL and bearer key:
Base URL: https://cloudflare-ai.<account-id>.workers.dev/v1
Bearer API key: 3f2a1c…
Keep both — you’ll paste them into Notebooker.
Choose your models
Models are configured in models.json. Each key is an endpoint type, and the
value is a Cloudflare Workers AI model id:
{
"chat": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"embedding": "@cf/baai/bge-base-en-v1.5",
"text_to_speech": "@cf/myshell-ai/melotts",
"speech_to_text": "@cf/openai/whisper-large-v3-turbo"
}
Omit any key to disable that endpoint. Browse the full catalog and copy any model id
from the Cloudflare Workers AI model directory,
then re-run npm run deploy.
Point Notebooker at it
In Notebooker:
- Go to Settings → API keys and Add credential → OpenAI Compatible.
- Fill in:
- Name — e.g. “My Cloudflare AI”
- API key — the bearer key from the deploy output
- Base URL —
https://cloudflare-ai.<account-id>.workers.dev/v1
- Save.
- Go to Settings → Models, Add model, choose provider OpenAI
Compatible, and enter the model name matching a key in your
models.json(e.g.chat,embedding,text_to_speech,speech_to_text).
Now select your model wherever Notebooker asks which model to use — for chat, embeddings, podcasts, and creators.
Verify the endpoint any time with:
curl https://cloudflare-ai.<account-id>.workers.dev/v1/models \
-H "Authorization: Bearer <your-api-key>"
Related
- Notebooker TTS voices — using the speech model.
cloudflare-ai-deployeron GitHub