Skip to main content

AI Model List

The API for obtaining models from app.neoagent.co provides functionality for creating a new chatbot by sending a GET request to the endpoint /chat/Chatbot/ModelList.

Endpoint

Request URL: https://app.neoagent.co/chat/Chatbot/ModelList
Method: GET

Required Headers

The API request must include the following headers:

  • Authorization: <Your-Secret-Key> - string, required - The secret key to authenticate the API request
  • Content-Type: application/json - string, required - The content type of the request payload (must be application/json)

Request Examples

const res = await fetch('https://app.neoagent.co/chat/Chatbot/ModelList', {
method: 'GET',
headers: {
"Authorization": "<Your-Secret-Key>",
"Content-Type": "application/json"
},
body: JSON.stringify({})
});

const data = await res.json();
console.log(data);

Response

The API response will be a JSON object with the following structure:

{
// array - List of knowledge items
"Data": [
{
"Key": "2",
"Value": "gpt-4o",
"Status": true
},
{
"Key": "3",
"Value": "gpt-4o-mini",
"Status": true
},
{
"Key": "22",
"Value": "claude-3.5-sonnet",
"Status": false
},
{
"Key": "23",
"Value": "claude-3.5-haiku",
"Status": false
}
],
// string - API version
"Version": "1.0.0",
// boolean - Operation success status
"Success": true,
// integer - HTTP status code
"Code": 200,
// string - Error message if any
"Message": ""
}

Error Handling

If the request fails, you should:

  1. Check the HTTP status code for network-level errors
  2. Examine the Code and Message fields in the response for business-level errors
  3. The Message field will contain detailed information about the error