Models

Models endpoint

There are about 150 models available on webraftai api, but well shouldn't there be a list for you to actually get to know which all models are available? Yeah there is a list which will tell you model names and even their designated endpoints.

The two models endpoint are:

Opening models endpoint on browser

As the endpoint supports get requests you can also use your browser to access it. Just head over to the models endpoint in your browser and you'll see a json list containing model names and some information.

The id and name fields are just duplicates for supporting programmed model chooser. The information tells about the endpoint through which the model can be used, if the model is premium or not and the available free credits for it.

Using Models endpoint in code

You can also use the models endpoint in code, a sample code structure is mentioned below:

Python

import requests

url = 'https://api.webraft.in/v2/models'
headers = {
    'Content-Type': 'application/json',
}
response = requests.get(url, headers=headers)
print(response.content)

Curl

curl -X GET "https://api.webraft.in/v2/models" -H "Content-Type: application/json"

Node.js

const axios = require('axios');

const url = 'https://api.webraft.in/v2/models';
const headers = {
    'Content-Type': 'application/json',
};

axios.get(url, { headers: headers })
    .then(response => {
        console.log(response.data);
    })
    .catch(error => {
        console.error('Error making the request:', error);
    });

Now lets move onto using chat completion api endpoint in the next section.

Last updated