cURL
curl --request GET \
--url http://studio.premai.io/api/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "http://studio.premai.io/api/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://studio.premai.io/api/v1/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"data": [
{
"id": "<string>",
"created": 123,
"object": "model",
"owned_by": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Models API
Get Models
Use this endpoint to get a list of models available to you.
The models available will depend on your subscription tier.
GET
/
api
/
v1
/
models
cURL
curl --request GET \
--url http://studio.premai.io/api/v1/models \
--header 'Authorization: Bearer <token>'import requests
url = "http://studio.premai.io/api/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://studio.premai.io/api/v1/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"data": [
{
"id": "<string>",
"created": 123,
"object": "model",
"owned_by": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
success response
The type of object returned, always "list" for model listing responses. Helps identify this as a collection of models.
Available options:
list An array containing the available models. Each element is a complete model object with all its properties.
Show child attributes
Show child attributes
Was this page helpful?