Skip to content

luisfun/ai-paint

Repository files navigation

AI Paint license

👉 Web Site

Fork, Clone, Install, Dev

Fork and Clone

cd ai-paint
npm i
npm run dev

Important

Edit the following file: src\lib\config.ts

Create Pages

Cloudflare Pages

Add Environment variables.
Workers & Pages > ai-paint > Settings > Environment variables

AI_GATEWAY_ENDPOINT = ...
WORKERS_AI_API_TOKEN = ... // secret
TURNSTILE_SECRET = ... // secret

Setup AI Gateway

Creat AI Gateway

Get API Endpoint
AI Gateway > AI Paint API Endpoint > Select Workers AI

Set Caching and Rate-limiting
AI Gateway

Creat API Token
Select template Workers AI

Setup Turnstile

Key issuance and WAF setup

Use the Access policy to restrict access to development previews.
Workers & Pages > ai-paint > Manage > Access policy > Enable access policy

Redirect access to ai-paint.pages.dev using Bulk Redirects.
Bulk Redirects > ...