Getting Available Models
Sometimes you just want to GET our available models and brag to everyone you can have them for free. Or maybe you don't :/
Anyway, to do so, simply send a GET request to https://ai.purlabs.xyz/<company>/models.
Note: When a word is surrounded by "< " and ">", it should be substituted by a different value. (<company>, for example, could be openai)
Example Request
More info on our NPM package,
purai.js, is coming soon!index.js
const PurAI = require('purai.js');
const ai = new PurAI('YOUR API KEY');
let response = await ai.openAI.models();
console.log(response);Example Response
TS Interface
type Response = {
id: string; // ID of the model
owner: string; // Who wons the model?
endpoints: string[]; // Available endpoints for the model
maxTokens: number | null; // Maximum token count that the model can generate for each response
freeLimitPerDay: number; // Free usage count of the model for each day. If null, the model has not specific usage limits and you can use it anytime within your daily total limit.
donatorLimitsPerDay: { // Donator usage count of the model for each day. Similar to freeLimitPerDay.
tier1: number; // Limit for Tier 1
tier2: number; // Limit for Tier 2
tier3: number; // Limit for Tier 3
tier4: number; // Limit for Tier 4
};
available: boolean; // The availability of the model
}[];JSON Response
[
{
"id": "gpt-3.5-turbo",
"owner": "openai",
"endpoints": [
"/openai/chat/completions",
"/openai/completions"
],
"maxTokens": 4000,
"freeLimitPerDay": 2000,
"donatorLimitsPerDay": {
"tier1": 4000,
"tier2": 9000,
"tier3": 13000,
"tier4": 20000
},
"available": true
},
{
"id": "gpt-3.5-turbo-16k",
"owner": "openai",
"endpoints": [
"/openai/chat/completions",
"/openai/completions"
],
"maxTokens": 16000,
"freeLimitPerDay": 2000,
"donatorLimitsPerDay": {
"tier1": 4000,
"tier2": 9000,
"tier3": 13000,
"tier4": 20000
},
"available": true
}
]