From 37d74efc2db05805d698d1a7a06a32eeed670640 Mon Sep 17 00:00:00 2001 From: Benson Wong Date: Tue, 30 Dec 2025 21:04:58 -0800 Subject: [PATCH] proxy: add /v1/images/generations (#443) Add support for the /v1/images/generations endpoint Updates #433 Closes #191 --- README.md | 1 + proxy/proxymanager.go | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index daf934bb..de4ae057 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Built in Go for performance and simplicity, llama-swap has zero dependencies and - `v1/embeddings` - `v1/audio/speech` ([#36](https://github.com/mostlygeek/llama-swap/issues/36)) - `v1/audio/transcriptions` ([docs](https://github.com/mostlygeek/llama-swap/issues/41#issuecomment-2722637867)) + - `v1/images/generations` - ✅ Anthropic API supported endpoints: - `v1/messages` - ✅ llama-server (llama.cpp) supported endpoints diff --git a/proxy/proxymanager.go b/proxy/proxymanager.go index 5a0752ac..4a0d0e07 100644 --- a/proxy/proxymanager.go +++ b/proxy/proxymanager.go @@ -299,6 +299,7 @@ func (pm *ProxyManager) setupGinEngine() { // Support audio/speech endpoint pm.ginEngine.POST("/v1/audio/speech", pm.apiKeyAuth(), pm.proxyInferenceHandler) pm.ginEngine.POST("/v1/audio/transcriptions", pm.apiKeyAuth(), pm.proxyOAIPostFormHandler) + pm.ginEngine.POST("/v1/images/generations", pm.apiKeyAuth(), pm.proxyInferenceHandler) pm.ginEngine.GET("/v1/models", pm.apiKeyAuth(), pm.listModelsHandler)