Skip to content
Every guide

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.

shell
npx -y scaledthought@0.3 init --region us --source org-litellm-guide

02

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

shell
npx -y scaledthought@0.3 billing topup --amount-usd 20
npx -y scaledthought@0.3 billing wait

03

Python SDK

npx -y scaledthought@0.3 models --live lists every model live in your region; the examples use deepseek-v4-1-flash.

Python
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.

config.yaml
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_KEY

Notes

  • 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

Questions

Do I need a ScaledThought provider in LiteLLM?
No. The openai/ prefix sends the request to the api_base you 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 key gives requests, tokens and cost per key, so a proxy with its own key shows up on its own line.

Read next

ScaledThought is not affiliated with or endorsed by the makers of LiteLLM. LiteLLM is a trademark of its owner. Not affiliated with or endorsed by Anthropic, OpenAI, Cursor or any model publisher. Claude, Claude Code, Codex, Cursor, OpenAI and model names are trademarks of their owners.

Agent view · paste this into your agent

Opens your agent with the prompt typed. You press Enter.

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.

Agents can read the whole site as markdown at scaledthought.com/llms.txt.