Skip to main content
This page walks you through sending your first AI request via Portrix. By the end, you’ll have a working API call that routes through the Portrix gateway to any model in the catalog — all using the same OpenAI SDK you may already have installed.

Prerequisites

Before you start, make sure you have:
  • A Portrix account — sign up for free at app.portrix.ai
  • Basic familiarity with REST APIs or the OpenAI SDK in Python or TypeScript
Your existing OpenAI code works — just change the base URL and use a Portrix API key.

Steps

1

Create your account

Go to app.portrix.ai and sign up for a free account. After you verify your email and complete onboarding, you’ll land in the Portrix dashboard. Your API keys are under Settings → API Keys in the left sidebar.
2

Get your API key

In the dashboard, navigate to Settings → API Keys and click Create new key. Give your key a descriptive label (for example, development or my-app-prod), then click Create. Copy the key immediately — it’s shown only once. Store it somewhere safe, such as a password manager or secrets vault.
3

Install the SDK

Portrix is OpenAI-compatible, so you use the standard openai package. Install it with your preferred package manager:
4

Send your first request

Point the OpenAI SDK at the Portrix base URL and use your Portrix API key. Then choose any model from the catalog using the provider/model-name format.
Run the code and you should see a response printed to your terminal. That request traveled through the Portrix gateway and was routed to OpenAI’s GPT-4o on your behalf.
5

Explore models

Now that your integration is working, try swapping the model field to any other model in the Portrix catalog. The rest of your code stays exactly the same.
Python
Browse the full list of available models in the Supported Models reference.

Next steps

Model Selection Guide

Browse all 400+ models available through Portrix and learn how to choose the right model for your use case.

API Reference

Explore the full Portrix API reference, including streaming, tool use, and advanced routing options.