Expose your Triton server by using a tunneling service like ngrok or any other way you prefer. You can skip this step if you’re self-hosting the Gateway.
Copy
Ask AI
ngrok http 11434 --host-header="localhost:8080"
2
Install the Portkey SDK
Copy
Ask AI
npm install --save portkey-ai
3
Initialize Portkey with Triton custom URL
Pass your publicly-exposed Triton server URL to Portkey with customHost
Set target provider as triton.
Copy
Ask AI
import Portkey from 'portkey-ai'const portkey = new Portkey({ apiKey: "PORTKEY_API_KEY", provider: "triton", customHost: "http://localhost:8000/v2/models/mymodel" // Your Triton Hosted URL Authorization: "AUTH_KEY", // If you need to pass auth})