Docs
Short reference for your local OpenAI-compatible gateway.
Base URL
https://api.f1shy312.com
Use this for direct gateway calls.
OpenAI-style URL
https://api.f1shy312.com/v1
Use this as SDK base URL.
Auth
Personal mode
Bearer keys are optional locally.
Endpoints
| Method | Path | Explanation |
|---|---|---|
| GET | /health | Gateway status, base URL and prompt logging state. |
| GET | /v1/models | OpenAI-compatible model list with your configured aliases. |
| GET | /v1/models/:model | Details for a single model alias. |
| POST | /v1/chat/completions | OpenAI-compatible chat endpoint. Supports streaming with SSE. |
| POST | /v1/responses | Responses API for Codex-style clients. Supports streaming and stored responses. |
| GET | /v1/responses/:response_id | Retrieves a stored response by ID. |
| DELETE | /v1/responses/:response_id | Deletes a stored response. |
| POST | /v1/responses/:response_id/cancel | Cancels an in-progress response. |
| GET | /v1/responses/:response_id/input_items | Lists the input items of a stored response. |
| GET | /admin/stats | Dashboard metrics for requests, latency, errors and cost. |
| GET | /admin/providers | Configured providers, type, base URL and enabled state. |
| POST | /admin/providers | Creates a new provider. |
| POST | /admin/providers/test | Checks whether a provider endpoint is reachable. |
| PATCH | /admin/providers/:id | Updates a provider's name, type, base URL or enabled state. |
| DELETE | /admin/providers/:id | Deletes a provider. |
| GET | /admin/models | Model aliases, provider routes, fallbacks and basic route metrics. |
| POST | /admin/models | Creates a new model alias route. |
| PATCH | /admin/models/:id | Updates a model alias route. |
| DELETE | /admin/models/:id | Deletes a model alias route. |
| POST | /admin/models/test | Tests a model alias by sending a minimal request through its route. |
| GET | /admin/api-keys | Lists locally generated gateway keys without exposing secret values. |
| POST | /admin/api-keys | Creates a gateway key and reveals it once. |
| PATCH | /admin/api-keys/:id | Enables or disables a gateway key. |
| DELETE | /admin/api-keys/:id | Deletes a gateway key. |
| GET | /admin/logs | Metadata-only request logs. Prompts and responses are not stored. |
| GET | /admin/settings | Runtime settings shown in the dashboard. |
| GET | /admin/quota | Z.ai quota policy summary plus local quota/rate-limit events. |
| GET | /admin/quota-settings | Per-provider and per-model quota configuration. |
| PATCH | /admin/quota-settings | Updates quota limits, windows and enabled state. |
Chat completion
curl https://api.f1shy312.com/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "glm5.1",
"messages": [
{ "role": "user", "content": "Write a small TypeScript function." }
],
"temperature": 0.2
}'Streaming
curl -N https://api.f1shy312.com/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "glm5-turbo",
"messages": [
{ "role": "user", "content": "Stream a short coding answer." }
],
"stream": true,
"stream_options": { "include_usage": true }
}'Responses API
curl https://api.f1shy312.com/v1/responses \
-H "Content-Type: application/json" \
-d '{
"model": "glm5-turbo",
"instructions": "You are a coding assistant.",
"input": "Inspect this error and suggest a fix.",
"stream": false
}'For Codex-style clients. Stored responses can be retrieved by ID unless store is set to false.
Use it like a normal OpenAI-compatible API
baseURL: "https://api.f1shy312.com/v1"
model: "glm5.1"
apiKey: "any-local-value-or-your-generated-key"Provider keys stay in the gateway. Client tools only need the local base URL and a model alias.