[UNTESTED] [Ink-dark/fake-openai-server] 3 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,204 characters
Status: [UNTESTED]
Endpoints found:
http://localhost:8080/v1/chat/completions
http://localhost:8080/v1/models
http://localhost:8080/v1/embeddings
Source: https://github.com/Ink-dark/fake-openai-server
# fake-openai-server
A tiny **OpenAI-compatible** HTTP server written in Rust that returns deterministic fake responses.
Its sole purpose is to let you verify that a model-forwarding proxy — such as
**[NewAPI](https://github.com/Calcium-Ion/new-api)**, One-API, or LiteLLM — can reach a
backend, parse OpenAI-shaped payloads, and proxy both streaming and non-streaming
responses end-to-end. It does **not** run any real model.
## Features
- `GET /health` — liveness probe (no auth)
- `GET /` — service info + endpoint map
- `GET /v1/models` — list fake models (OpenAI `list` shape)
- `POST /v1/chat/completions` — chat completions, streaming (`text/event-stream`) **and** non-streaming
- `POST /v1/completions` — legacy text completions, streaming + non-streaming
- `POST /v1/embeddings` — fixed 16-dim deterministic pseudo-embeddings
- Bearer-token auth on all `/v1/*` routes
- The fake assistant reply echoes the received `model`, message count, `max_tokens`
and the last user message — so you can confirm the proxy actually forwarded the prompt.
All responses follow the OpenAI API object shapes (`chat.completion`,
`chat.completion.chunk`, `text_completion`, `embedding`, `list`), including a
`data: [DONE]` SSE sentinel for streams.
## Configuration (env vars)
| Variable | Default | Description |
| ---------------------- | ------------------------------------------------------------------- | ------------------------------------ |
| `PORT` | `8080` | Listen port |
| `FAKE_OPENAI_API_KEY` | `sk-fake-test-key` (also falls back to `API_KEY`) | Bearer token expected on `/v1/*` |
| `FAKE_OPENAI_MODEL` | `fake-gpt-4o` | Default model when not in request |
| `FAKE_OPENAI_MODELS`