Prerequisites
Create a PipeShift account
Sign up at pipeshift.com if you do not already have an account.
Generate a PipeShift API key
In the PipeShift dashboard, create an API key for your workspace.Store the key securely. You will paste it into the gateway’s Custom Headers configuration — not in client application code.
Get your TrueFoundry API key and gateway URL
You need a TrueFoundry API key (
TFY_API_KEY) and your gateway base URL to call models through the gateway. See Gateway base URL and Authentication.Adding models
Add PipeShift to the AI Gateway using Custom Endpoints.Create a Custom Endpoint provider account
In the TrueFoundry dashboard, go to AI Gateway → Models → Custom Endpoints and click Add Custom Endpoint.In Configure Account, set:
- Name (Account Name): any unique label for this provider (for example,
pipeshift) — this is your provider account name and appears as the first path segment in every request URL ({providerAccountName}) - Endpoint Type:
None - Header Auth: keep disabled
Add a PipeShift endpoint
On the Endpoints step, add an integration and configure:
- Display Name: any unique label for this endpoint (for example,
model) — this is your custom endpoint display name and appears as the second path segment in every request URL ({endpointName}) - Base URL:
https://api.pipeshift.com/api
Content-Type:application/jsonAuthorization:Bearer <PIPSHIFT_API_KEY>

The Authorization header here is sent from the gateway to PipeShift. Your application should only send the TrueFoundry API key to the gateway.
Inference
Once saved, call PipeShift through the gateway’s proxy-api path. URL shape and path rules are documented under Custom Endpoints.How the request URL is built
The gateway URL has two values you configure in the dashboard — they are not PipeShift model IDs:| URL segment | Dashboard field | Example in this guide |
|---|---|---|
{providerAccountName} | Account Name (Configure Account → Name) | pipeshift |
{endpointName} | Custom endpoint Display Name (Endpoints step) | model |
| Segment | Example value | Meaning |
|---|---|---|
{GATEWAY_BASE_URL} | https://internal.devtest.truefoundry.tech/api/llm | Your AI Gateway base URL |
pipeshift | Account Name you set in Configure Account | {providerAccountName} |
model | Display Name you set for the custom endpoint | {endpointName} |
v0/chat/completions | Upstream path | Appended to the integration Base URL |
Choosing a PipeShift model
PipeShift hosts many models available in your workspace. You do not need a separate custom endpoint per model — set themodel field in the JSON request body to whichever PipeShift model ID you want to run (for example, zai-org/GLM-5).
If you add multiple custom endpoints under the same account (different Display Name values), use the matching {endpointName} in the URL; each endpoint can still call any PipeShift model via the request body.
Replace
pipeshift and model in the URL with your own Account Name and Display Name if you used different values during setup.Supported APIs
| API | Endpoint | Tracing | Cost Tracking |
|---|---|---|---|
| Chat Completions | /proxy-api/{providerAccountName}/{endpointName}/v0/chat/completions | ✅ |
Chat Completions
Chat Completions
Before you start: Replace
Python (
{GATEWAY_BASE_URL} with your gateway base URL (how to find it) and set TFY_API_KEY to your TrueFoundry API key.Request headers (client → gateway)
| Header | Value |
|---|---|
Authorization | Bearer <TFY_API_KEY> |
Content-Type | application/json |
Accept-Encoding | identity |
Python (requests)
cURL
OpenAI Python SDK
Because PipeShift is OpenAI-compatible, you can point the OpenAI SDK at the gateway proxy path instead of PipeShift directly:Support scope: Custom Endpoints proxy requests transparently to PipeShift. For gateway limitations on Custom Endpoints (HTTPS, streaming, and so on), see Custom Endpoints.