Contents
To call SolCard Inference from LiteLLM, use openai/solcard-inference-fast as the model and https://api.solcardinference.ai/v1 as the api_base, with your sk-si- key. The openai/ prefix is how LiteLLM’s docs say to route any OpenAI-compatible endpoint. The same two values work in the Python SDK and in the proxy. Everything about LiteLLM below comes from its own docs; we haven’t run it ourselves.
What you need
- A SolCard Inference API key. Make one on the dashboard’s API keys page. Keys start with
sk-si-and are shown once. - Some balance or a plan. One prepaid USD balance covers every key and model; see how billing works.
- LiteLLM, at a pinned version. The last section explains why.
export SOLCARD_INFERENCE_KEY=sk-si-...
The SDK call
One completion call with the prefix, the base URL and the key:
import os
import litellm
response = litellm.completion(
model="openai/solcard-inference-fast",
api_base="https://api.solcardinference.ai/v1",
api_key=os.environ["SOLCARD_INFERENCE_KEY"],
messages=[{"role": "user", "content": "Say hello in five words."}],
max_tokens=4096,
)
print(response.choices[0].message.content)
Keep /v1 on the api_base and add nothing after it. LiteLLM’s OpenAI-compatible page says a “Not Found Error” usually means the api_base is missing /v1, and warns: “Do NOT add anything additional to the base url”. The client appends /chat/completions itself.
Keep max_tokens at or under 32,768. That’s the most any of our models writes per request, and our Chat Completions reference accepts max_tokens as an alias for max_completion_tokens.
The Anthropic route
Use the anthropic/ prefix with https://api.solcardinference.ai, no /v1. LiteLLM’s Anthropic page says it “automatically appends the appropriate suffix (/v1/messages or /v1/complete)” to the base URL, which is why our quickstart gives Anthropic clients the bare host.
response = litellm.completion(
model="anthropic/solcard-inference-large",
api_base="https://api.solcardinference.ai",
api_key=os.environ["SOLCARD_INFERENCE_KEY"],
messages=[{"role": "user", "content": "Plan a refactor of this module."}],
max_tokens=8192,
)
Because LiteLLM adds /v1/messages after whatever you give it, a base URL that already ends in /v1 would end up at /v1/v1/messages. Pick one route per model; openai/ is the simpler one.
Run it as a proxy
The proxy gives the rest of your team one internal URL and their own keys, while your sk-si- key stays in one place. Put all three models in a config.yaml. The configs page says os.environ/<VAR> reads a value from the environment and “works for ANY value on the config.yaml”:
model_list:
- model_name: fast
litellm_params:
model: openai/solcard-inference-fast
api_base: https://api.solcardinference.ai/v1
api_key: os.environ/SOLCARD_INFERENCE_KEY
max_tokens: 4096
model_info:
input_cost_per_token: 0.00000125
cache_read_input_token_cost: 0.000000125
output_cost_per_token: 0.0000025
- model_name: large
litellm_params:
model: openai/solcard-inference-large
api_base: https://api.solcardinference.ai/v1
api_key: os.environ/SOLCARD_INFERENCE_KEY
max_tokens: 8192
model_info:
input_cost_per_token: 0.00000375
cache_read_input_token_cost: 0.000000375
output_cost_per_token: 0.00000625
- model_name: base
litellm_params:
model: openai/solcard-inference-base
api_base: https://api.solcardinference.ai/v1
api_key: os.environ/SOLCARD_INFERENCE_KEY
max_tokens: 4096
model_info:
input_cost_per_token: 0.00000125
cache_read_input_token_cost: 0.000000125
output_cost_per_token: 0.00000375
general_settings:
master_key: os.environ/LITELLM_MASTER_KEY
Start it with litellm --config config.yaml. The docs’ examples serve on port 4000. Clients then call http://0.0.0.0:4000 with a proxy key and model: "fast", not our full id.
The model_info block is what makes LiteLLM’s spend numbers match ours. Our models aren’t in LiteLLM’s price list, and the custom pricing page says to “add a model_info key to your model in the config, and override the desired keys.” The values above are our pay-as-you-go prices per 1M tokens divided by a million. LiteLLM’s figure is an estimate. What actually comes off is our balance, and on a plan, LiteLLM doesn’t know your weekly allowance.
Budgets per key
Virtual keys let you cap what each person or app spends through the proxy. The virtual keys page says they need a Postgres DATABASE_URL and a master_key that “must start with sk-”. The budgets page sets max_budget on /key/generate, and says “After the key crosses it’s max_budget, requests fail”:
curl http://0.0.0.0:4000/key/generate \
-H "Authorization: Bearer $LITELLM_MASTER_KEY" \
-H "Content-Type: application/json" \
-d '{"models": ["fast", "base"], "max_budget": 10}'
Those budgets count against the model_info prices, so they’re only as right as that block. For scale: a day of 200 requests, each sending 3,000 tokens and getting 500 back, is $1.00 on Fast, about $1.13 on Base and about $2.88 on Large plus its reasoning, before any cached-input discount. Fast, Large or Base helps decide which models a key should reach.
What your proxy logs
We keep nothing, but your proxy is your own server, and it writes its own logs. LiteLLM’s logs page says “By default LiteLLM does not track the request and response content”; store_prompts_in_spend_logs: true under general_settings turns that on. Its database page says the spend logs table still records “token usage, spend, and timing information” per request, and that disable_spend_logs: True or disable_error_logs: True under general_settings stops writing those tables. Leave prompt storage off to keep the whole path in line with keeps nothing.
Pin the version
The proxy holds your sk-si- key, so treat upgrades with care. LiteLLM’s March 2026 security update says litellm==1.82.7 and litellm==1.82.8 on PyPI were malicious and were live “for about 40 minutes before being quarantined.” It tells affected users to rotate secrets and pin a known safe release, and says v1.83.0 is clean. If either version ever ran on your machine, revoke your key on the API keys page and make a new one.
Check it works
Test the key without LiteLLM first:
curl https://api.solcardinference.ai/v1/models \
-H "Authorization: Bearer $SOLCARD_INFERENCE_KEY"
The list should name solcard-inference-fast, -large and -base. Then run the SDK example, then the proxy. Codes from our errors page that LiteLLM may pass through:
- 401
invalid_api_key: the key is missing, revoked or unknown. Checkos.environ/names the right variable. - 400
model_not_found: the id afteropenai/must be the fullsolcard-inference-...name. - 400
unsupported_parameter:nabove 1,best_oforstore: truereached us. - 400
unsupported_content: an image or file reached the model; ours take text only. - 402
insufficient_balance: top up, then retry. - 429
rate_limitedorplan_limit_reached: too many requests a minute, or the weekly plan limit is used up.
If LiteLLM itself raises on a parameter before sending, the drop_params page shows drop_params: true under a model’s litellm_params, or additional_drop_params to drop only the ones you name.
FAQ
Is there a SolCard Inference provider in LiteLLM?
No. The openai/ prefix with our api_base is the whole integration.
Which name do clients send through the proxy?
The model_name from your config, such as fast. LiteLLM maps it to openai/solcard-inference-fast.
Can I put Claude Code or Codex behind the proxy? The drop_params page mentions Claude Code and Codex requests, but you don’t need a proxy for them: one sentence adds our models to both.
Are my prompts stored? Not by us: prompts and responses are never logged or stored. On your proxy, that depends on the settings above.