Standardized AI service interfaces in practice
Project adoption/v1/chat/completions
The endpoints fully replicate the OpenAI API specification, with support includingmodel
parameter specification (grok-2/grok-3),messages
Standard fields such as conversation history. Developers can seamlessly switch service providers with the same code, example requests:curl --location "http://127.0.0.1:50005/v1/chat/completions" --header "Authorization: Bearer YourSsoToken" --data '{"model": "grok-3", "messages": [{"role": "user", "content": "测试内容"}]}'
The System VariablesENABLE_MIRROR_API
cap (a poem)API_HATD
Separately control the interface switch and temporary session mode to meet the needs of different development scenarios.
This answer comes from the articleGrok-Mirror: one-click deployment of a profitable Grok mirror siteThe