Shadow exposes an OpenAI-compatible model proxy for Cloud plays and deployed Buddies. It lets new users start without bringing their own model provider while keeping the official upstream key on the server side.
All requests require a Shadow access token or a limited smp_... model proxy token.
The chat endpoint follows the OpenAI chat completions shape:
The default official provider is configured from environment variables. The default model is
deepseek-v4-flash, with https://api.deepseek.com as the example and compose default base URL.
Both the base URL and model can be changed without code changes.
Default DeepSeek-style pricing:
| Usage bucket | Price |
|---|---|
| Input tokens, cache hit | 0.02 CNY / 1M tokens = 0.4 Shrimp Coins / 1M tokens |
| Input tokens, cache miss | 1 CNY / 1M tokens = 20 Shrimp Coins / 1M tokens |
| Output tokens | 2 CNY / 1M tokens = 40 Shrimp Coins / 1M tokens |
Shadow converts CNY pricing to Shrimp Coins with 1 CNY = 20 Shrimp Coins by default. Wallet
balances remain integer coins, so the proxy accumulates micro-Shrimp usage and only commits whole
coins when the pending usage reaches an integer.
If the wallet cannot cover an official model request, Shadow returns an OpenAI-compatible response
with a shadow:wallet-recharge marker instead of exposing an upstream provider error. Shadow clients
render that marker as a recharge card in the chat area.