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
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 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.
provider/model-name format.5
Explore models
Now that your integration is working, try swapping the Browse the full list of available models in the Supported Models reference.
model field to any other model in the Portrix catalog. The rest of your code stays exactly the same.Python
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.