Public
OpenAI-compatible API adapter for Yandex GPT (free tier)
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Create public val, e.g. alice-openai-adapter:
| File | Type on Val Town |
|---|---|
main.ts | HTTP |
alice.ts | Script |
convert.ts | Script |
- https://www.val.town → New Val → HTTP
- Paste
main.tsintomain.ts(HTTP) - Add file
alice.ts(script) — paste contents - Add file
convert.ts(script) — paste contents - Save → copy endpoint URL from HTTP file
Endpoint looks like:
https://YOURHANDLE--XXXXXXXX.web.val.run
base_url = https://YOURHANDLE--....web.val.run/v1
api_key = anything (ignored)
model = alice
curl https://YOURHANDLE--....web.val.run/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"alice","messages":[{"role":"user","content":"Привет"}]}'
No env vars. Free Alice web, no Yandex Cloud key.
- Do not upload Node
src/files (ws,@hono/node-server) - These Val Town files use Deno
WebSocket+npm:hono - Val Town free credit / rate limits apply to the HTTP val itself