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.

Val Town deploy — Alice OpenAI adapter

Upload (3 files)

Create public val, e.g. alice-openai-adapter:

FileType on Val Town
main.tsHTTP
alice.tsScript
convert.tsScript

Steps

  1. https://www.val.town → New Val → HTTP
  2. Paste main.ts into main.ts (HTTP)
  3. Add file alice.ts (script) — paste contents
  4. Add file convert.ts (script) — paste contents
  5. Save → copy endpoint URL from HTTP file

Endpoint looks like:

https://YOURHANDLE--XXXXXXXX.web.val.run

Use

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.

Notes

  • 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