Model Hub API

POST /login

Return temporary credential for logging into Pinecone Model Hub.

Request Headers
  • Api-Key – for user authentication

Status Codes

http

POST /login HTTP/1.1
Host: hub-api.beta.pinecone.io
Api-Key: XXXX-XXXX-XXXX-XXXX

curl

curl -i -X POST https://hub-api.beta.pinecone.io/login -H 'Api-Key: XXXX-XXXX-XXXX-XXXX'

wget

wget -S -O- https://hub-api.beta.pinecone.io/login --header='Api-Key: XXXX-XXXX-XXXX-XXXX'

python-requests

requests.post('https://hub-api.beta.pinecone.io/login', headers={'Api-Key': 'XXXX-XXXX-XXXX-XXXX'})

response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "username": "HUB_USERNAME",
    "password": "HUB_PASSWORD",
    "server": "SERVER_URL"
}
GET /repositories

List a user’s unarchived repositories.

Request Headers
  • Api-Key – for user authentication

Status Codes

http

GET /repositories HTTP/1.1
Host: hub-api.beta.pinecone.io
Api-Key: XXXX-XXXX-XXXX-XXXX

curl

curl -i https://hub-api.beta.pinecone.io/repositories -H 'Api-Key: XXXX-XXXX-XXXX-XXXX'

wget

wget -S -O- https://hub-api.beta.pinecone.io/repositories --header='Api-Key: XXXX-XXXX-XXXX-XXXX'

python-requests

requests.get('https://hub-api.beta.pinecone.io/repositories', headers={'Api-Key': 'XXXX-XXXX-XXXX-XXXX'})

response

HTTP/1.1 200 OK
Content-Type: application/json

[
    "movie-embedding-model",
    "user-embedding-model"
]
POST /repositories

Create or unarchive a repository. Update the repository if it already exists.

Request Headers
  • Api-Key – for user authentication

Status Codes

http

POST /repositories HTTP/1.1
Host: hub-api.beta.pinecone.io
Accept: application/json
Content-Type: application/json
Api-Key: XXXX-XXXX-XXXX-XXXX

{
    "repository_name": "REPOSITORY_NAME"
}

curl

curl -i -X POST https://hub-api.beta.pinecone.io/repositories -H 'Accept: application/json' -H 'Api-Key: XXXX-XXXX-XXXX-XXXX' -H 'Content-Type: application/json' --data-raw '{"repository_name": "REPOSITORY_NAME"}'

wget

wget -S -O- https://hub-api.beta.pinecone.io/repositories --header='Accept: application/json' --header='Api-Key: XXXX-XXXX-XXXX-XXXX' --header='Content-Type: application/json' --post-data='{"repository_name": "REPOSITORY_NAME"}'

python-requests

requests.post('https://hub-api.beta.pinecone.io/repositories', headers={'Accept': 'application/json', 'Api-Key': 'XXXX-XXXX-XXXX-XXXX', 'Content-Type': 'application/json'}, json={'repository_name': 'REPOSITORY_NAME'})

response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "success": true
}
DELETE /repositories/(repository_name)

Archive a repository.

Request Headers
  • Api-Key – for user authentication

Status Codes

http

DELETE /repositories/(repository_name) HTTP/1.1
Host: hub-api.beta.pinecone.io
Api-Key: XXXX-XXXX-XXXX-XXXX

curl

curl -i -X DELETE 'https://hub-api.beta.pinecone.io/repositories/(repository_name)' -H 'Api-Key: XXXX-XXXX-XXXX-XXXX'

wget

wget -S -O- --method=DELETE 'https://hub-api.beta.pinecone.io/repositories/(repository_name)' --header='Api-Key: XXXX-XXXX-XXXX-XXXX'

python-requests

requests.delete('https://hub-api.beta.pinecone.io/repositories/(repository_name)', headers={'Api-Key': 'XXXX-XXXX-XXXX-XXXX'})

response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "success": true
}
PUT /repositories/(repository_name)/share

Make a repository public.

Request Headers
  • Api-Key – for user authentication

Status Codes

http

PUT /repositories/(repository_name)/share HTTP/1.1
Host: hub-api.beta.pinecone.io
Api-Key: XXXX-XXXX-XXXX-XXXX

curl

curl -i -X PUT 'https://hub-api.beta.pinecone.io/repositories/(repository_name)/share' -H 'Api-Key: XXXX-XXXX-XXXX-XXXX'

wget

wget -S -O- --method=PUT 'https://hub-api.beta.pinecone.io/repositories/(repository_name)/share' --header='Api-Key: XXXX-XXXX-XXXX-XXXX'

python-requests

requests.put('https://hub-api.beta.pinecone.io/repositories/(repository_name)/share', headers={'Api-Key': 'XXXX-XXXX-XXXX-XXXX'})

response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "success": true
}
DELETE /repositories/(repository_name)/share

Make a repository private.

Request Headers
  • Api-Key – for user authentication

Status Codes

http

DELETE /repositories/(repository_name)/share HTTP/1.1
Host: hub-api.beta.pinecone.io
Api-Key: XXXX-XXXX-XXXX-XXXX

curl

curl -i -X DELETE 'https://hub-api.beta.pinecone.io/repositories/(repository_name)/share' -H 'Api-Key: XXXX-XXXX-XXXX-XXXX'

wget

wget -S -O- --method=DELETE 'https://hub-api.beta.pinecone.io/repositories/(repository_name)/share' --header='Api-Key: XXXX-XXXX-XXXX-XXXX'

python-requests

requests.delete('https://hub-api.beta.pinecone.io/repositories/(repository_name)/share', headers={'Api-Key': 'XXXX-XXXX-XXXX-XXXX'})

response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "success": true
}
GET /repositories/(repository_name)/tags

List tags of a repository.

Request Headers
  • Api-Key – for user authentication

Status Codes

http

GET /repositories/(repository_name)/tags HTTP/1.1
Host: hub-api.beta.pinecone.io
Api-Key: XXXX-XXXX-XXXX-XXXX

curl

curl -i 'https://hub-api.beta.pinecone.io/repositories/(repository_name)/tags' -H 'Api-Key: XXXX-XXXX-XXXX-XXXX'

wget

wget -S -O- 'https://hub-api.beta.pinecone.io/repositories/(repository_name)/tags' --header='Api-Key: XXXX-XXXX-XXXX-XXXX'

python-requests

requests.get('https://hub-api.beta.pinecone.io/repositories/(repository_name)/tags', headers={'Api-Key': 'XXXX-XXXX-XXXX-XXXX'})

response

HTTP/1.1 200 OK
Content-Type: application/json

["V1", "V2"]