https://github.com/igorhalfeld/cloudflare-ai-api
Simple bypass to access cloudflare ai from web clients
https://github.com/igorhalfeld/cloudflare-ai-api
Last synced: about 2 months ago
JSON representation
Simple bypass to access cloudflare ai from web clients
- Host: GitHub
- URL: https://github.com/igorhalfeld/cloudflare-ai-api
- Owner: IgorHalfeld
- Created: 2024-05-12T19:48:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-12T19:51:14.000Z (about 2 years ago)
- Last Synced: 2025-03-02T22:32:50.519Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 107 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## `cloudflare-ai-api`
Simple bypass to access cloudflare ai from web clients
## How to use
Check available [models and payloads here](https://developers.cloudflare.com/workers-ai/models/)
```
POST - `/ai`
{
"model": "@cf/meta/llama-2-7b-chat-fp16",
"payload": {
"messages": [{ "role": "assistant", "content": "tell me a history" }],
"stream": false
}
}
```
Create a new file `.env` and copy the content from `.env.example` and update the values
You can use fly.io to deploy this project