Public
Likeopenai-compatible-proxy
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.
A production-ready proxy that accepts standard OpenAI API requests, maps model names to upstream equivalents, and forwards them to a configurable backend — with full streaming support.
https://tmpmanueluhn65--c80791de310a11f1a33142dde27851f2.web.val.run
| Method | Path | Description |
|---|---|---|
GET | /api/v1/models | List available models (OpenAI format) |
POST | /api/v1/chat/completions | Chat completions (streaming & non-streaming) |
OPTIONS | * | CORS preflight |
| Alias | Upstream Model |
|---|---|
gpt-5 | chat-gpt |
gpt-5-turbo | chat-gpt |
gpt-4o | chat-gpt |
gpt-4-turbo | chat-gpt |
claude-4.6-sonnet | anthropic-claude-sonnet-4-5 |
gemini-2.5-pro | google-gemini-2-5-pro |
| (unknown) | chat-gpt |
curl https://tmpmanueluhn65--c80791de310a11f1a33142dde27851f2.web.val.run/api/v1/models
curl -X POST https://tmpmanueluhn65--c80791de310a11f1a33142dde27851f2.web.val.run/api/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_UPSTREAM_TOKEN" \ -d '{ "model": "gpt-5", "messages": [{"role": "user", "content": "Hello!"}] }'
curl -X POST https://tmpmanueluhn65--c80791de310a11f1a33142dde27851f2.web.val.run/api/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_UPSTREAM_TOKEN" \ -d '{ "model": "claude-4.6-sonnet", "messages": [{"role": "user", "content": "Hello!"}], "stream": true }'
Rendering mermaid diagram...
Pass your upstream API token as a Bearer token. The proxy validates the header format and forwards the token to the upstream provider. No tokens are stored.
When stream: true, the proxy:
- Fetches the full response from upstream with
stream: false - Splits the content into ~4-character chunks
- Emits SSE events: first chunk (role), content chunks, finish chunk,
[DONE]