Skip to content

Commit 67d6e1a

Browse files
Merge pull request #398 from Portkey-AI/model-catalog-v4
push for model catalog
2 parents d3f6a32 + e8398db commit 67d6e1a

File tree

437 files changed

+65048
-1649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+65048
-1649
lines changed

api-reference/inference-api/authentication.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ from portkey_ai import Portkey
4646

4747
client = Portkey(
4848
api_key="PORTKEY_API_KEY", # Replace with your actual API key
49-
virtual_key="VIRTUAL_KEY" # Optional: Use if virtual keys are set up
49+
provider="@VIRTUAL_KEY" # Optional: Use if virtual keys are set up
5050
)
5151

5252
chat_completion = client.chat.completions.create(

api-reference/inference-api/gateway-for-other-apis.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ Portkey integrates with 40+ LLM providers. Add your provider credentials (such a
4848
curl https://api.portkey.ai/v1/rerank \
4949
-H "Content-Type: application/json" \
5050
-H "x-portkey-api-key: $PORTKEY_API_KEY" \
51-
-H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
51+
-H "x-portkey-virtual-key: $PORTKEY_PROVIDER" \
5252
```
5353

5454
```py Python
5555
from portkey_ai import Portkey
5656

5757
portkey = Portkey(
5858
api_key = "PORTKEY_API_KEY",
59-
virtual_key = "PROVIDER_VIRTUAL_KEY"
59+
virtual_key = "PROVIDER"
6060
)
6161
```
6262

@@ -65,7 +65,7 @@ import Portkey from 'portkey-ai';
6565

6666
const portkey = new Portkey({
6767
apiKey: 'PORTKEY_API_KEY',
68-
virtualKey: 'PROVIDER_VIRTUAL_KEY'
68+
virtualKey: 'PROVIDER'
6969
});
7070
```
7171
</CodeGroup>
@@ -181,15 +181,15 @@ curl --request GET \
181181
--url https://api.portkey.ai/v1/collections \
182182
--header 'Content-Type: application/json' \
183183
--header 'x-portkey-api-key: $PORTKEY_API_KEY' \
184-
--header 'x-portkey-virtual-key: $PROVIDER_VIRTUAL_KEY'
184+
--header 'x-portkey-virtual-key: $PROVIDER'
185185
```
186186

187187
```bash PUT
188188
curl --request PUT \
189189
--url https://api.portkey.ai/v1/collections/my-collection \
190190
--header 'Content-Type: application/json' \
191191
--header 'x-portkey-api-key: $PORTKEY_API_KEY' \
192-
--header 'x-portkey-virtual-key: $PROVIDER_VIRTUAL_KEY' \
192+
--header 'x-portkey-virtual-key: $PROVIDER' \
193193
--data '{
194194
"metadata": {
195195
"description": "Updated collection description"
@@ -202,7 +202,7 @@ curl --request DELETE \
202202
--url https://api.portkey.ai/v1/collections/my-collection \
203203
--header 'Content-Type: application/json' \
204204
--header 'x-portkey-api-key: $PORTKEY_API_KEY' \
205-
--header 'x-portkey-virtual-key: $PROVIDER_VIRTUAL_KEY'
205+
--header 'x-portkey-virtual-key: $PROVIDER'
206206
```
207207
</CodeGroup>
208208
</Tab>
@@ -216,7 +216,7 @@ from portkey_ai import Portkey
216216

217217
portkey = Portkey(
218218
api_key="PORTKEY_API_KEY",
219-
virtual_key="PROVIDER_VIRTUAL_KEY"
219+
provider="@PROVIDER"
220220
)
221221

222222
response = portkey.post(
@@ -235,7 +235,7 @@ from portkey_ai import Portkey
235235

236236
portkey = Portkey(
237237
api_key="PORTKEY_API_KEY",
238-
virtual_key="PROVIDER_VIRTUAL_KEY"
238+
provider="@PROVIDER"
239239
)
240240

241241
response = portkey.get('/collections')
@@ -246,7 +246,7 @@ from portkey_ai import Portkey
246246

247247
portkey = Portkey(
248248
api_key="PORTKEY_API_KEY",
249-
virtual_key="PROVIDER_VIRTUAL_KEY"
249+
provider="@PROVIDER"
250250
)
251251

252252
response = portkey.put(
@@ -262,7 +262,7 @@ from portkey_ai import Portkey
262262

263263
portkey = Portkey(
264264
api_key="PORTKEY_API_KEY",
265-
virtual_key="PROVIDER_VIRTUAL_KEY"
265+
provider="@PROVIDER"
266266
)
267267

268268
response = portkey.delete('/collections/my-collection')
@@ -279,7 +279,7 @@ import Portkey from 'portkey-ai';
279279

280280
const portkey = new Portkey({
281281
apiKey: "PORTKEY_API_KEY",
282-
virtualKey: "PROVIDER_VIRTUAL_KEY"
282+
virtualKey: "PROVIDER"
283283
});
284284

285285
const response = await portkey.post('/rerank', {
@@ -297,7 +297,7 @@ import Portkey from 'portkey-ai';
297297

298298
const portkey = new Portkey({
299299
apiKey: "PORTKEY_API_KEY",
300-
virtualKey: "PROVIDER_VIRTUAL_KEY"
300+
virtualKey: "PROVIDER"
301301
});
302302

303303
const response = await portkey.get('/collections');
@@ -308,7 +308,7 @@ import Portkey from 'portkey-ai';
308308

309309
const portkey = new Portkey({
310310
apiKey: "PORTKEY_API_KEY",
311-
virtualKey: "PROVIDER_VIRTUAL_KEY"
311+
virtualKey: "PROVIDER"
312312
});
313313

314314
const response = await portkey.put('/collections/my-collection', {
@@ -323,7 +323,7 @@ import Portkey from 'portkey-ai';
323323

324324
const portkey = new Portkey({
325325
apiKey: "PORTKEY_API_KEY",
326-
virtualKey: "PROVIDER_VIRTUAL_KEY"
326+
virtualKey: "PROVIDER"
327327
});
328328

329329
const response = await portkey.delete('/collections/my-collection');
@@ -343,7 +343,7 @@ from portkey_ai import Portkey
343343

344344
portkey = Portkey(
345345
api_key="PORTKEY_API_KEY",
346-
virtual_key="COHERE_VIRTUAL_KEY"
346+
provider="@COHERE_VIRTUAL_KEY"
347347
)
348348

349349
response = portkey.post(

api-reference/inference-api/headers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ from portkey_ai import Portkey
569569

570570
portkey = Portkey(
571571
api_key="PORTKEY_API_KEY",
572-
virtual_key="VIRTUAL_KEY",
572+
provider="@VIRTUAL_KEY",
573573
config="CONFIG_ID"
574574
)
575575

api-reference/sdk/python.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ from portkey_ai import Portkey
4545

4646
client = Portkey(
4747
api_key="your_api_key_here", # Or use the env var PORTKEY_API_KEY
48-
virtual_key="your_virtual_key_here" # Or use config="cf-***"
48+
provider="@your_virtual_key_here" # Or use config="cf-***"
4949
)
5050

5151
response = client.chat.completions.create(
@@ -67,7 +67,7 @@ The SDK requires:
6767

6868
```python
6969
# With Virtual Key
70-
portkey = Portkey(api_key="...", virtual_key="...")
70+
portkey = Portkey(api_key="...", provider="@...")
7171

7272
# With Config
7373
portkey = Portkey(api_key="...", config="cf-***")
@@ -87,7 +87,7 @@ from portkey_ai import AsyncPortkey
8787

8888
portkey = AsyncPortkey(
8989
api_key="PORTKEY_API_KEY",
90-
virtual_key="VIRTUAL_KEY"
90+
provider="@VIRTUAL_KEY"
9191
)
9292

9393
async def main():
@@ -117,7 +117,7 @@ custom_client = httpx.Client(verify=False)
117117

118118
portkey = Portkey(
119119
api_key="your_api_key_here",
120-
virtual_key="your_virtual_key_here",
120+
provider="@your_virtual_key_here",
121121
http_client=custom_client
122122
)
123123

@@ -157,7 +157,7 @@ Here's how you can use these headers with the Python SDK:
157157
```python
158158
portkey = Portkey(
159159
api_key="PORTKEY_API_KEY",
160-
virtual_key="VIRTUAL_KEY",
160+
provider="@VIRTUAL_KEY",
161161
# Add any other headers from the reference
162162
)
163163

0 commit comments

Comments
 (0)