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

# Triton Inference Server

> Integrate Triton-hosted custom models with Portkey for production observability and reliability.

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

> [!NOTE]
>
> 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.

## Integration Steps

**1. Expose your Triton Server**

Expose your Triton server using a tunneling service like [ngrok](https://ngrok.com/) or make it publicly accessible. Skip this if you're self-hosting the Gateway.

```sh theme={"system"}
ngrok http 8000 --host-header="localhost:8080"
```

**2. Add to Model Catalog**

1. Go to [**Model Catalog → Add Provider**](https://app.portkey.ai/model-catalog/providers)
2. Enable **"Local/Privately hosted provider"** toggle
3. Select **Triton** as the provider type
4. Enter your Triton server URL in **Custom Host**: `http://localhost:8000/v2/models/mymodel`
5. Add authentication headers if needed
6. Name your provider (e.g., `my-triton`)

> [card] [Complete Setup Guide](https://docs.portkey.ai/docs/product/model-catalog.md)
>
> See all setup options

**3. Use in Your Application**

```python Python theme={"system"}
from portkey_ai import Portkey

portkey = Portkey(
    api_key="PORTKEY_API_KEY",
    provider="@my-triton"
)

response = portkey.chat.completions.create(
    model="your-model-name",
    messages=[{"role": "user", "content": "Hello!"}]
)

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

```javascript Node.js theme={"system"}
import Portkey from 'portkey-ai';

const portkey = new Portkey({
    apiKey: 'PORTKEY_API_KEY',
    provider: '@my-triton'
});

const response = await portkey.chat.completions.create({
    model: 'your-model-name',
    messages: [{ role: 'user', content: 'Hello!' }]
});

console.log(response.choices[0].message.content);
```

**Or use custom host directly:**

```python Python theme={"system"}
from portkey_ai import Portkey

portkey = Portkey(
    api_key="PORTKEY_API_KEY",
    provider="triton",
    custom_host="http://localhost:8000/v2/models/mymodel",
    Authorization="AUTH_KEY"  # If needed
)
```

```javascript Node.js theme={"system"}
import Portkey from 'portkey-ai';

const portkey = new Portkey({
    apiKey: 'PORTKEY_API_KEY',
    provider: 'triton',
    customHost: 'http://localhost:8000/v2/models/mymodel',
    Authorization: 'AUTH_KEY'  // If needed
});
```

***

## Next Steps

> [card] [Gateway Configs](https://docs.portkey.ai/docs/product/ai-gateway.md)
>
> Add retries, timeouts, and fallbacks

> [card] [Observability](https://docs.portkey.ai/docs/product/observability.md)
>
> Monitor your Triton deployments

> [card] [Custom Host Guide](https://docs.portkey.ai/docs/product/ai-gateway/universal-api.md#integrating-local-or-private-models)
>
> Learn more about custom host setup

> [card] [BYOLLM Guide](https://docs.portkey.ai/docs/integrations/llms/byollm.md)
>
> Complete guide for private LLMs

For complete SDK documentation:

> [card] [SDK Reference](https://docs.portkey.ai/docs/api-reference/sdk/list.md)
>
> Complete Portkey SDK documentation

***

> [card] [Portkey is now PRISMA AIRS AI Gateway. See it in action.](https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\&utm_medium=referral\&utm_campaign=prisma_airs\&utm_content=docs_nav#contact)
>
> Contact Us


## Related topics

- [Remote MCP](https://docs.portkey.ai/docs/product/ai-gateway/remote-mcp.md)
- [Errors](https://docs.portkey.ai/docs/api-reference/inference-api/error-codes.md)
- [Inference.net](https://docs.portkey.ai/docs/integrations/llms/inference.net.md)
- [Enterprise Gateway](https://docs.portkey.ai/docs/changelog/enterprise.md)
- [Agent Servers](https://docs.portkey.ai/docs/product/agent-gateway/servers.md)


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