- Add a Connect popup that opens from your own button or link.
- Embed the Connect widget, a drop-in component with the same functionality.
Only organization owners can add or manage integrations.
Create an integration ID
Create a uniqueintegrationId to use with the Connect to Pinecone popup and widget:
1
Open the Integrations tab
On the Integrations tab in the Pinecone console, click Create Integration.
The Integrations tab doesn’t appear until your organization has an integration. To create your first one, go to the Create integration form directly.
2
Fill out the form
In the Create integration form, fill out these fields:
- Integration name: A name for your integration.
- URL Slug: Your
integrationId. Enter a human-readable string that uniquely identifies your integration and that may appear in URLs. The URL slug is public and can’t be changed. - Logo: A logo for your integration.
- Return mechanism: How the generated API key is returned:
- Web Message: Your application receives the API key through a web message, and only the allowed origins you list below receive it. Select this option if you use the
@pinecone-database/connectlibrary. - Copy/Paste: The API key appears in the success message, and users copy and paste it into your application.
- Web Message: Your application receives the API key through a web message, and only the allowed origins you list below receive it. Select this option if you use the
- Allowed origin: If you selected Web Message, list the URL origins where your integration is hosted. An origin is the part of a URL that specifies the protocol, hostname, and port.
3
Create the integration
Click Create.
Anyone can create an integration. To apply to become an official Pinecone partner, see Integration ecosystem.
Add a Connect popup
After you create yourintegrationId, you can open the Connect to Pinecone popup from your own button or link. You can use the JavaScript library or the script. The library is the most common method. Use the script when you can’t build with a custom library, such as in a content management system (CMS).
1
Load the library or script
Install the
@pinecone-database/connect library, or load the script in your page’s <head>:2
Create the popup
Call the
ConnectPopup function. It takes one required configuration option:integrationId: The URL slug of your integration. If you don’t passintegrationId, the popup doesn’t render.
onConnect callback receives the API key. The function returns an object with an open function that opens the popup.3
Open the popup from your button or link
Call
open when the user clicks your button or link:Embed the Connect widget
The Connect widget is a drop-in component with the same functionality as the popup. After you create yourintegrationId, you can embed it in two ways:
- Use the JavaScript library (
@pinecone-database/connect) or script to render the widget in apps and websites. - Use the Colab library (
pinecone-notebooks) to render the widget in Colab notebooks with Python.
JavaScript
To embed the widget in your app or website, use the@pinecone-database/connect library or, if you can’t use the library, the script.
1
Load the library or script
Install the library, or load the script in your page’s
<head>:2
Add a container for the widget
Add the HTML element where the widget renders:
HTML
3
Render the widget
Call the
connectToPinecone function. It takes two required configuration options:integrationId: The URL slug of your integration. If you don’t passintegrationId, the widget doesn’t render.container: The HTML element where the widget renders.
<script> in the page body after the container element, so the container exists when connectToPinecone runs.Colab
To embed the widget in a Colab notebook, use thepinecone-notebooks Python library.
1
Install the libraries
2
Render the widget
Call
Authenticate to render the widget, so the user can log in and generate an API key:3
Use the API key
After the user completes the flow, the API key is available in the
PINECONE_API_KEY environment variable. Use it to initialize the Pinecone client: