Skip to content

Refresh token

Access Token is a way to authenticate an application or notebook to modelserve AI services. You can refresh and generate a new Access Token using Refresh Token. To generate new Access Token, use the endpoint below:

https://api.modelserve.ai/api/v1/accounts/token/refresh/
curl -s -X POST \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '{"refresh": "string"}' \
     'https://api.modelserve.ai/api/v1/accounts/token/refresh/'
import requests

r = requests.post(
    "https://api.modelserve.ai/api/v1/accounts/token/refresh/",
    headers={"Accept": "application/json", "Content-Type": "application/json"},
    data={"refresh": "string"},
)
fetch('https://api.modelserve.ai/api/v1/accounts/token/refresh/', {
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({"refresh": "string"})
});

Where to get the Refresh token? To view the Refresh token, log in to modelserve AI. To log in, use the endpoint below:

https://api.modelserve.ai/api/v1/accounts/login
curl -s -X POST \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d '{"email": "user@example.com", "password": "string"}' \
     'https://api.modelserve.ai/api/v1/accounts/login/'
import requests

r = requests.post(
    "https://api.modelserve.ai/api/v1/accounts/login/",
    headers={"Accept": "application/json", "Content-Type": "application/json"},
    data={"email": "user@example.com", "password": "string"},
)
fetch('https://api.modelserve.ai/api/v1/accounts/login/', {
  "method": "POST",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/json"
  },
  "body": JSON.stringify({"email": "user@example.com", "password": "string"})
});

Refresh token will be returned in the response under the key: refresh.