Skip to content

Add bytez as a provider. #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/supported-llm/bytez.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions integrations/llms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ description: "Portkey connects with all major LLM providers and orchestration fr

<Card title="Byollm" href="/integrations/llms/byollm" />

<Card title="Bytez" href="/integrations/llms/bytez">
<Frame><img src="/images/supported-llm/bytez.jpeg" alt="Bytez" /></Frame>
</Card>

<Card title="Dashscope" href="/integrations/llms/dashscope">
<Frame><img src="/images/supported-llm/dashscope.jpeg" alt="Dashscope" /></Frame>
</Card>
Expand Down
93 changes: 93 additions & 0 deletions integrations/llms/bytez.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "Bytez"
---

Portkey provides a robust and secure gateway to facilitate the integration of various models into your apps.

With Portkey, you can take advantage of features like fast AI gateway access, observability, prompt management, and more, all while ensuring the secure management of your LLM API keys through a [virtual key](/product/ai-gateway/virtual-keys) system.

<Note>Provider Slug. `bytez`</Note>

Portkey supports all chat models on [Bytez](https://www.bytez.com)!

That also means multi-modal models are supported 🔥

Tasks supported: `chat`, `image-text-to-text`, `audio-text-to-text`, `video-text-to-text`

## Portkey SDK Integration with Bytez Models

Portkey provides a consistent API to interact with models from various providers. To integrate Bytez with Portkey:

### 1\. Install the Portkey SDK

<Tabs>
<Tab title="NodeJS">
```sh
npm install --save portkey-ai
```

</Tab>
<Tab title="Python">
```sh
pip install portkey-ai
```

</Tab>

</Tabs>

### 2\. Initialize Portkey with the Virtual Key

To use Bytez with Portkey, [get your API key from here](https://bytez.com/api), then add it to Portkey to create the virtual key.

<Tabs>
<Tab title="NodeJS SDK">
```js
import Portkey from 'portkey-ai'

const portkey = new Portkey({
apiKey: "PORTKEY_API_KEY", // Defaults to process.env["PORTKEY_API_KEY"]
provider:"@BYTEZ_PROVIDER" // Your Virtual Key
})
```
</Tab>
<Tab title="Python SDK">
```python
from portkey_ai import Portkey

portkey = Portkey(
api_key="PORTKEY_API_KEY", # Defaults to os.env("PORTKEY_API_KEY")
provider="@BYTEZ_PROVIDER" # Your Virtual Key
)
```
</Tab>

</Tabs>

### **3\. Invoke Chat Completions with** Bytez

You can use the Portkey instance now to send requests to Bytez API.

<Tabs>
<Tab title="NodeJS SDK">
```js
const chatCompletion = await portkey.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'google/gemma-3-4b-it',
});

console.log(chatCompletion.choices);
```
</Tab>
<Tab title="Python SDK">
```python
completion = portkey.chat.completions.create(
messages= [{ "role": 'user', "content": 'Say this is a test' }],
model= 'google/gemma-3-4b-it'
)

print(completion)
```
</Tab>

</Tabs>