From c009d401fb1dc470a79b4a8c951e85a068698e60 Mon Sep 17 00:00:00 2001 From: hobokenchicken Date: Tue, 5 May 2026 09:36:51 -0400 Subject: [PATCH] docs: add Responses API endpoint to README --- README.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5d8fddfd..832b7de8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # GopherGate -A unified, high-performance LLM proxy gateway built in Go. It provides a single OpenAI-compatible API to access multiple providers (OpenAI, Gemini, DeepSeek, Moonshot, Grok, Ollama) with built-in token tracking, real-time cost calculation, multi-user authentication, and a management dashboard. +A unified, high-performance LLM proxy gateway built in Go. It provides OpenAI-compatible `/v1/chat/completions`, `/v1/images/generations`, `/v1/responses`, and `/v1/models` endpoints to access multiple providers (OpenAI, Gemini, DeepSeek, Moonshot, Grok, Ollama) with built-in token tracking, real-time cost calculation, multi-user authentication, and a management dashboard. ## Features -- **Unified API:** OpenAI-compatible `/v1/chat/completions`, `/v1/images/generations`, and `/v1/models` endpoints. +- **Unified API:** OpenAI-compatible `/v1/chat/completions`, `/v1/images/generations`, `/v1/responses`, and `/v1/models` endpoints. + - The `/v1/responses` endpoint (OpenAI Responses API) is currently supported for OpenAI models only. Non-OpenAI providers (Gemini, DeepSeek, Moonshot, Grok, Ollama) return a "not supported" response. - **Multi-Provider Support:** - **OpenAI:** GPT-4o, GPT-4o Mini, o1, o3 reasoning models, DALL-E 2/3 image generation. - **Google Gemini:** Gemini 2.0 Flash, Pro, and vision models (with native CoT support), Imagen 3 image generation. @@ -146,6 +147,30 @@ response = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello!"}] ) +``` + +### Responses API + +```python +from openai import OpenAI + +client = OpenAI( + base_url="http://localhost:8080/v1", + api_key="YOUR_CLIENT_API_KEY" +) + +# OpenAI Responses API (supported for OpenAI models only) +response = client.responses.create( + model="gpt-4o", + input="Explain quantum computing in one paragraph.", + instructions="You are a helpful assistant.", + temperature=0.7, + max_output_tokens=500 +) +print(response.output_text) +``` + +**Note:** The `/v1/responses` endpoint is currently supported for OpenAI models only. Requests routed to Gemini, DeepSeek, Moonshot, Grok, or Ollama models return a "not supported" error. ### Image Generation (DALL-E / Imagen) @@ -175,7 +200,6 @@ resp = client.images.generate( ) print(resp.data[0].url) # Returns data URI (Gemini returns base64) ``` -``` ## License