Guide · LiteLLM
Use ScaledThought with LiteLLM
LiteLLM can be pointed at ScaledThought as an OpenAI-compatible endpoint: use the model name openai/deepseek-v4-1-flash with api_base https://api.us.scaledthought.com/v1 and your ST_API_KEY, from the Python SDK or in the proxy's config.yaml.
Deep links into apps you have installed. Claude and Claude Code are trademarks of Anthropic; Codex is a trademark of OpenAI. ScaledThought is not affiliated with or endorsed by either.
Or run it yourself:
Before you start
The Python SDK and the proxy both call /v1/chat/completions, so streaming, tools and response_format use the OpenAI request shapes.
01
Create the account
Paste the prompt above into your coding agent, or run the command yourself in your project's directory. It creates the account, writes ST_API_KEY and ST_BASE_URL to ./.env (mode 0600) and adds .env to .gitignore. Only the US region is open; Canada is coming soon.
npx -y scaledthought@0.3 init --region us --source org-litellm-guide02
Buy credits
Usage is prepaid, so a new account answers 402 insufficient_credits until its first top-up. This prints a payment link and opens it in your browser; nothing is charged until you pay on it. How prepaid credits work
npx -y scaledthought@0.3 billing topup --amount-usd 20
npx -y scaledthought@0.3 billing wait03
Python SDK
npx -y scaledthought@0.3 models --live lists every model live in your region; the examples use deepseek-v4-1-flash.
import os, litellm
resp = litellm.completion(
model="openai/deepseek-v4-1-flash",
api_base="https://api.us.scaledthought.com/v1",
api_key=os.environ["ST_API_KEY"],
max_tokens=1024,
messages=[{"role": "user", "content": "Reply with OK"}],
)
print(resp.choices[0].message.content)04
Proxy
Add the model to the proxy's config.yaml, then start it with litellm --config config.yaml. The proxy reads the key from its environment.
model_list:
- model_name: deepseek-v4-1-flash
litellm_params:
model: openai/deepseek-v4-1-flash
api_base: https://api.us.scaledthought.com/v1
api_key: os.environ/ST_API_KEYNotes
- Give the proxy its own sub-agent key with a daily budget, so one runaway client can't spend the account's balance:
npx -y scaledthought@0.3 keys create --child --name litellm-proxy --budget-usd 5.
Sources
- LiteLLM: OpenAI-compatible endpoints, read 2026-10-10.
- ScaledThought: /llms.txt (the setup protocol) and the docs.
Questions
- Do I need a ScaledThought provider in LiteLLM?
- No. The
openai/prefix sends the request to theapi_baseyou give, with the ScaledThought model id after the slash. - How do I see what the proxy spent?
npx -y scaledthought@0.3 usage --days 7 --by keygives requests, tokens and cost per key, so a proxy with its own key shows up on its own line.
Read next