Skip to main content

Crusoe

Overview​

PropertyDetails
DescriptionCrusoe Cloud provides GPU-accelerated inference for open-source large language models, optimized for performance and cost efficiency.
Provider Route on LiteLLMcrusoe/
Link to Provider DocCrusoe Serverless Inference Documentation ↗
Base URLhttps://api.inference.crusoecloud.com/v1 (older LiteLLM versions call a different host by default, see Custom API Base)
Supported Operations/chat/completions


We support ALL Crusoe models, just set crusoe/ as a prefix when sending completion requests

Available Models​

ModelProviderContext Window
crusoe/deepseek-ai/Deepseek-V4-FlashDeepSeek1,048,576 tokens
crusoe/deepseek-ai/DeepSeek-V4.1-FlashDeepSeek1,048,576 tokens
crusoe/deepseek-ai/DeepSeek-V4-ProDeepSeek1,048,576 tokens
crusoe/google/gemma-4-31b-itGoogle262,144 tokens
crusoe/nvidia/NVIDIA-Nemotron-3-Super-120B-A12BNVIDIA262,144 tokens
crusoe/nvidia/NVIDIA-Nemotron-3.5-Super-VLNVIDIA262,144 tokens
crusoe/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3BNVIDIA262,144 tokens
crusoe/nvidia/Nemotron-3-Nano-Omni-Reasoning-30B-A3BNVIDIA262,144 tokens
crusoe/nvidia/Nemotron-3.5-Lightning-30B-A3BNVIDIA262,144 tokens
crusoe/openai/gpt-oss-120bOpenAI131,072 tokens
crusoe/Qwen/Qwen3.8-27BQwen262,144 tokens
crusoe/yutori/n2Yutori262,144 tokens
crusoe/zai-org/GLM-5.3Z.ai1,048,576 tokens
crusoe/zai-org/GLM-5.3-FlashZ.ai1,048,576 tokens

Crusoe retires models often. To list the model ids your key can call, send GET https://api.inference.crusoecloud.com/v1/models with your Crusoe API key, and put crusoe/ in front of each id. Copy ids from that endpoint rather than from Crusoe's docs pages, which spell some of them differently.

LiteLLM's cost map does not have current prices for these models, so their spend logs as $0 or at an outdated price. To track spend, set input_cost_per_token and output_cost_per_token for each model you use from Crusoe's pricing, in the model's litellm_params on the proxy or as completion() arguments in the SDK.

Required Variables​

Environment Variables
os.environ["CRUSOE_API_KEY"] = ""  # your Crusoe API key

Usage - LiteLLM Python SDK​

Non-streaming​

Crusoe Non-streaming Completion
import os
import litellm
from litellm import completion

os.environ["CRUSOE_API_KEY"] = "" # your Crusoe API key

messages = [{"content": "Hello, how are you?", "role": "user"}]

# Crusoe call
response = completion(
model="crusoe/deepseek-ai/Deepseek-V4-Flash",
messages=messages
)

print(response)

Streaming​

Crusoe Streaming Completion
import os
import litellm
from litellm import completion

os.environ["CRUSOE_API_KEY"] = "" # your Crusoe API key

messages = [{"content": "Write a short story about AI", "role": "user"}]

# Crusoe call with streaming
response = completion(
model="crusoe/deepseek-ai/Deepseek-V4-Flash",
messages=messages,
stream=True
)

for chunk in response:
print(chunk)

Function Calling​

Crusoe Function Calling
import os
import litellm
from litellm import completion

os.environ["CRUSOE_API_KEY"] = "" # your Crusoe API key

tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather in a location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
}
},
"required": ["location"]
}
}
}]

messages = [{"role": "user", "content": "What's the weather in Boston?"}]

response = completion(
model="crusoe/deepseek-ai/Deepseek-V4-Flash",
messages=messages,
tools=tools,
tool_choice="auto"
)

print(response)

Usage - LiteLLM Proxy Server​

config.yaml
model_list:
- model_name: deepseek-v4-flash
litellm_params:
model: crusoe/deepseek-ai/Deepseek-V4-Flash
api_key: os.environ/CRUSOE_API_KEY
- model_name: deepseek-v4-pro
litellm_params:
model: crusoe/deepseek-ai/DeepSeek-V4-Pro
api_key: os.environ/CRUSOE_API_KEY
- model_name: gpt-oss-120b
litellm_params:
model: crusoe/openai/gpt-oss-120b
api_key: os.environ/CRUSOE_API_KEY
- model_name: qwen3.8-27b
litellm_params:
model: crusoe/Qwen/Qwen3.8-27B
api_key: os.environ/CRUSOE_API_KEY
- model_name: glm-5.3
litellm_params:
model: crusoe/zai-org/GLM-5.3
api_key: os.environ/CRUSOE_API_KEY

Custom API Base​

Option 1: Environment variable

Older LiteLLM versions, including v1.106 and earlier, send Crusoe calls to https://managed-inference-api-proxy.crusoecloud.com/v1 by default. That host's firewall answers some prompts with an HTTP 403 "Sorry, you have been blocked" page, for example prompts that contain file paths like ../../etc/passwd or SQL injection strings like ' OR 1=1 --. To see which host your version calls, send a request that succeeds and read the x-litellm-model-api-base response header on the proxy, or response._hidden_params["api_base"] in the SDK. A blocked request does not show the host. If it is the old host, set CRUSOE_API_BASE to https://api.inference.crusoecloud.com/v1 as below. If your deployment restricts outbound traffic, allow the host your version calls.

Custom API Base via env var
import os
from litellm import completion

os.environ["CRUSOE_API_BASE"] = "https://api.inference.crusoecloud.com/v1"
os.environ["CRUSOE_API_KEY"] = "" # your API key

response = completion(
model="crusoe/deepseek-ai/Deepseek-V4-Flash",
messages=[{"content": "Hello!", "role": "user"}],
)

Option 2: Pass directly

Custom API Base via parameter
from litellm import completion

response = completion(
model="crusoe/deepseek-ai/Deepseek-V4-Flash",
messages=[{"content": "Hello!", "role": "user"}],
api_base="https://api.inference.crusoecloud.com/v1",
api_key="your-api-key",
)

Supported OpenAI Parameters​

  • temperature
  • max_tokens
  • max_completion_tokens
  • top_p
  • frequency_penalty
  • presence_penalty
  • stop
  • n
  • stream
  • tools
  • tool_choice
  • response_format
  • seed
  • user
  • logit_bias
  • logprobs
  • top_logprobs