fix(crusoe): split Custom API Base docs into two independent examples

The previous example set CRUSOE_API_BASE via env var and also passed
api_base= in the same call, making it look like both were required.
They are independent alternatives.
This commit is contained in:
Emmanuel Acheampong 2026-03-23 12:53:10 -07:00 committed by Sameer Kankute
parent 6e1e6244cf
commit e08b8ef7b6
No known key found for this signature in database

View file

@ -147,21 +147,31 @@ model_list:
## Custom API Base
```python showLineNumbers title="Custom API Base"
**Option 1: Environment variable**
```python showLineNumbers title="Custom API Base via env var"
import os
import litellm
from litellm import completion
# Using environment variable
os.environ["CRUSOE_API_BASE"] = "https://custom.crusoecloud.com/v1"
os.environ["CRUSOE_API_KEY"] = "" # your API key
# Or pass directly
response = completion(
model="crusoe/meta-llama/Llama-3.3-70B-Instruct",
messages=[{"content": "Hello!", "role": "user"}],
)
```
**Option 2: Pass directly**
```python showLineNumbers title="Custom API Base via parameter"
from litellm import completion
response = completion(
model="crusoe/meta-llama/Llama-3.3-70B-Instruct",
messages=[{"content": "Hello!", "role": "user"}],
api_base="https://custom.crusoecloud.com/v1",
api_key="your-api-key"
api_key="your-api-key",
)
```