yushangxiao/claude2api ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Go service that turns Claude’s web access into an OpenAI compatible API.

I want to be able to send requests to a /v1/chat/completions style endpoint with a bearer token, and have it forward the chat to Claude behind the scenes. It should support normal text chat, image input, file upload for long context, streaming responses, and a way to return the model’s thinking output too. If the conversation gets too long, it should manage that automatically, and ideally be able to clean up chat sessions after use.

Please make it easy to run with environment variables or a config file, and include Docker support. I also need proxy support, automatic retry on failure, and a mirror mode where a Claude session key can be used directly if enabled. If you need to check the latest API details online while wiring it up, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab