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

# Triton

> Integrate Trtiton-hosted custom models with Obiguard and take them to production

Obiguard provides a robust and secure platform to observe, govern, and manage your **locally** or **privately** hosted custom models using Triton.

<Info>
  Here's the official [Triton Inference Server documentation](https://docs.nvidia.com/deeplearning/triton-inference-server/user-guide/docs/getting_started/quickstart.html) for more details.
</Info>

## Integrating Custom Models with Obiguard SDK

<Steps>
  <Step title="Expose your Triton Server">
    Expose your Triton server by using a tunneling service like [ngrok](https://ngrok.com/) or any other way you prefer. You can skip this step if you’re self-hosting the Gateway.

    ```sh theme={null}
    ngrok http 11434 --host-header="localhost:8080"
    ```
  </Step>

  <Step title="Install the Obiguard SDK">
    <Tabs>
      <Tab title="Python SDK">
        ```sh theme={null}
        pip install obiguard
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Initialize Obiguard with Triton custom URL">
    1. Pass your publicly-exposed Triton server URL to Obiguard with `customHost`
    2. Set target `provider` as `triton`.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        from obiguard import Obiguard

        client = Obiguard(
            obiguard_api_key="sk-obg***",  # Your Obiguard API key
            provider="triton",
            custom_host="http://localhost:8000/v2/models/mymodel" # Your Triton Hosted URL
            Authorization="AUTH_KEY", # If you need to pass auth
        )
        ```
      </Tab>
    </Tabs>

    More on `custom_host` [here](/gateway/universal-api#integrating-local-or-private-models).
  </Step>

  <Step title="Invoke Chat Completions">
    Use the Obiguard SDK to invoke chat completions (generate) from your model, just as you would with any other provider:

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        completion = client.chat.completions.create(
            messages= [{ "role": 'user', "content": 'Say this is a test' }]
        )
        ```
      </Tab>
    </Tabs>
  </Step>
</Steps>

## Next Steps

Explore the complete list of features supported in the SDK:

<Card title="SDK" href="/api-reference/sdk/python" />
