> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LiteLLM

> LiteLLM के पीछे Phaseo उपयोग करें या LiteLLM calls को Phaseo के ज़रिए route करें।

अगर आप LiteLLM proxy, budgets या local router पर निर्भर हैं लेकिन Phaseo models, analytics और server tools चाहते हैं, तो LiteLLM के साथ Phaseo उपयोग करें।

## Python से सीधे कॉल करें

```bash theme={null}
pip install litellm
```

```python theme={null}
import os
from litellm import completion

response = completion(
    model="openai/openai/gpt-5-nano",
    api_key=os.environ["PHASEO_API_KEY"],
    api_base="https://api.phaseo.app/v1",
    messages=[{"role": "user", "content": "Reply with only: ok"}],
)

print(response.choices[0].message.content)
```

OpenAI-compatible endpoints के लिए LiteLLM आम तौर पर provider prefix `openai/` उपयोग करता है। Phaseo model ID `openai/gpt-5-nano` ही रहता है, इसलिए LiteLLM model string `openai/openai/gpt-5-nano` दिख सकती है।

## प्रॉक्सी कॉन्फ़िगरेशन

अगर app code में LiteLLM provider prefix नहीं रखना चाहते, तो model alias उपयोग करें:

```yaml theme={null}
model_list:
  - model_name: phaseo-gpt-5-nano
    litellm_params:
      model: openai/openai/gpt-5-nano
      api_key: os.environ/PHASEO_API_KEY
      api_base: https://api.phaseo.app/v1
```

फिर LiteLLM proxy को `model: "phaseo-gpt-5-nano"` के साथ call करें।

## नोट

* Production में model names को readable रखने के लिए LiteLLM aliases को प्राथमिकता दें।
* Phaseo server tools उपयोग करते हों, तो LiteLLM का exact route test करें; कुछ proxy layers अज्ञात tool types को normalize या drop कर देते हैं।
* तय करें कि pricing के लिए LiteLLM, Phaseo या दोनों system of record होंगे।

## संबंधित

* [OpenAI SDK](./openai-sdk.mdx)
* [Server tools](../server-tools/index.mdx)
* [Pricing](../../api-reference/endpoint/pricing-calculate.mdx)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.