- Create a Nebius API key for authentication.
- Create a Portkey API key for authentication.
-
Save the keys to the environment variables:
-
Configure the integration:
- Node.js
- cURL
-
Install the Portkey SDK:
-
Create the following
portkey.jsscript:This script sends a multi-message request to the specified model in Nebius Token Factory. -
Run the script:
The output is the following:
Portkey
Integration of Nebius Token Factory with Portkey.
You can work with Nebius Token Factory by using Portkey. The integration is based on the AI Gateway by Portkey. The AI Gateway allows users to send requests to different AI providers and still use the same Portkey interface. The solution assumes that you send requests to the AI Gateway, and then it routes and sends them to Nebius Token Factory. As a result, you interact with Nebius Token Factory models via Portkey.
The integration is based on the OpenAI Node.js package and the Nebius Token Factory provider for Portkey.
To use the integration, do the following: