API Documentation

The BuzzAI.LIVE API allows developers to integrate the powerful capabilities of BuzzAI.LIVE into their applications, enabling seamless interaction with the sophisticated AI model via HTTP requests. By leveraging this API, developers can access various features of BuzzAI.LIVE programmatically, including text-based queries, audio inputs, and file uploads, and receive intelligent responses in return.

chat

                        
                          {
    "endpoint": "chat",
    "system_message": "Role/ Funtionality of the AI assisstant",
    "conversation": [
                        {"role":"user","content":"YOUR MESSAGE"}
                    ]
}                        
                      
For this API , make a POST request to the following URL:
https://www.buzzai.live/api.php
This API endpoint is a POST request to https://www.buzzai.live/api.php. It is used to send a payload with a raw request body type. The payload should include an "endpoint" and a "conversation" array, where each element in the array includes a "role" and a "content". Request Body endpoint (string): Represents the endpoint for the request. conversation (array): Contains elements with the following parameters: role (string): Represents the role of the participant in the conversation. content (string): Represents the content of the conversation. Response Upon a successful request, the response will include the following fields: Code (integer): Represents the status code of the response. Success (boolean): Indicates the success status of the request. Msg (string): Provides any additional message related to the request. Messages (object): Contains information about the chat title and buzzai. Token_Usage (integer): Represents the token usage associated with the request.

Example Request
curl --location 'https://www.buzzai.live/api.php' \
--data '{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}'
 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Example Response
{"Code":200,"Success":true,"Msg":"Recieved successfully","Messages":{"Chat_Title":"","buzzai":"Hello! How can I assist you today?"},"Token_Usage":674}

Parameters

Attribute Type Description
endpoint string Represents the endpoint for the request.
conversation array Contains elements with the following parameters:
role string Represents the role of the participant in the conversation.
content string Represents the content of the conversation.

chat- with old messages

                        
                          {
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"MESSAGE 1"},
                        {"role":"buzzai","content":"REPLY 1"},
                        {"role":"user","content":"MESSAGE 2"}
                    ]
}                        
                      
For this API , make a POST request to the following URL:
https://www.buzzai.live/api.php
This HTTP POST request is used to send data to the specified endpoint "https://www.buzzai.live/api.php". The request body should be in raw format and include the "endpoint" and "conversation" parameters. The "endpoint" parameter specifies the endpoint to be called, and the "conversation" parameter is an array containing objects with "role" and "content" keys. Request Body endpoint (string, required): Specifies the endpoint to be called. conversation (array of objects, required): Contains objects with the following keys: role (string, required): Role of the participant in the conversation. content (string, required): Content of the conversation. Response Code (integer): Indicates the status code of the response. Success (boolean): Indicates whether the request was successful. Msg (string): Provides additional information about the response. Messages (object): Contains additional message data with keys "Chat_Title" and "buzzai". Token_Usage (integer): Indicates the usage of token.

Example Request
curl --location 'https://www.buzzai.live/api.php' \
--data '{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"},
                        {"role":"buzzai","content":"Hello! How can I assist you today?"},
                        {"role":"user","content":"Explain AI to a 5 year old."}
                    ]
}'
 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"},
                        {"role":"buzzai","content":"Hello! How can I assist you today?"},
                        {"role":"user","content":"Explain AI to a 5 year old."}
                    ]
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Example Response
{"Code":200,"Success":true,"Msg":"Recieved successfully","Messages":{"Chat_Title":"","buzzai":"Sure! AI, which stands for Artificial Intelligence, is like having a super smart computer that can think and learn just like humans. It can do things like recognize pictures, understand what people are saying, and even play games. It's really amazing because it can keep getting smarter and better at doing tasks all on its own. Just like how you learn new things every day, AI can also learn and help us with lots of different things."},"Token_Usage":780}

Parameters

Attribute Type Description
endpoint string Specifies the endpoint to be called.
conversation array Contains objects with the following keys:
role string Role of the participant in the conversation.
content string Content of the conversation

chat- stream

                        
                          {
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"MESSAGE 1"},
                        {"role":"buzzai","content":"REPLY 1"},
                        {"role":"user","content":"MESSAGE 2"}
                    ],
    "stream": true
}                        
                      
For this API , make a POST request to the following URL:
https://www.buzzai.live/api.php
This HTTP POST request is used to send data to the specified endpoint "https://www.buzzai.live/api.php". The request body should be in raw format and include the "endpoint" and "conversation" parameters. The "endpoint" parameter specifies the endpoint to be called,"stream" parameter specifies if the output needes to streamed or not, and the "conversation" parameter is an array containing objects with "role" and "content" keys. Request Body endpoint (string, required): Specifies the endpoint to be called. stream (bool,optional): Specifies if the output needes to streamed or not. conversation (array of objects, required): Contains objects with the following keys: role (string, required): Role of the participant in the conversation. content (string, required): Content of the conversation. Response Event Type: buzzai_talking Data: {"part": "TEXT"} (string) Event Type: response Data: {"Code": 200, "Success": true, "Msg": "Recieved successfully", "Messages": {"Chat_Title": "", "buzzai": "TEXT"}, "Token_Usage": INT} Event Type: close Data: Connection closed Note: SSE responses are streamed continuously until the connection is closed.

Example Request
curl --location 'https://www.buzzai.live/api.php' \
--data '{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"},
                        {"role":"buzzai","content":"Hello! How can I assist you today?"},
                        {"role":"user","content":"Explain AI to a 5 year old."}
                    ],
    "stream": true
}'
 array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
"> 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Hi"},
                        {"role":"buzzai","content":"Hello! How can I assist you today?"},
                        {"role":"user","content":"Explain AI to a 5 year old."}
                    ],
    "stream": true
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Example Response
event: buzzai_talking
data: {"part":""}

event: buzzai_talking
data: {"part":"Sure"}

...

event: buzzai_talking
data: {"part":"!"}

event: response
data: {"Code":200,"Success":true,"Msg":"Recieved successfully","Messages":{"Chat_Title":"","buzzai":"Sure! AI stands for Artificial Intelligence. It's like having a super smart computer that can learn and think just like humans. It can do things like talk, listen, see, and even make decisions. AI helps us solve problems, play games, and even help with everyday tasks. It's like having a really clever friend who can help us with lots of things!"},"Token_Usage":76}

event: close
data: Connection closed

Parameters

Attribute Type Description
endpoint string Specifies the endpoint to be called.
stream array Specifies if the output needes to streamed or not.
conversation string Contains objects with the following keys:
role string Role of the participant in the conversation.
content string Content of the conversation.

chat- image reading

                        
                          {
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"PROMPT FOR IMAGE"}
                    ],
    "file" : {
        "message_file_type": "image",
        "file_mime": "IMAGE MIME TYPE", //Accepted : PNG - image/png, JPEG - image/jpeg, WEBP - image/webp, HEIC - image/heic, HEIF - image/heif
        "source_type": "SOURCE TYPE", //URL, base64encoded
        "source":"URL TO THE IMAGE OR BASE64ENCODED DATA"
    }
}                        
                      
For this API , make a POST request to the following URL:
https://www.buzzai.live/api.php
This HTTP POST request is used to send data to the specified endpoint "https://www.buzzai.live/api.php". The request body should be in raw format and include the "endpoint" and "conversation" parameters. The "endpoint" parameter specifies the endpoint to be called, and the "conversation" parameter is an array containing objects with "role" and "content" keys. Request Body endpoint (string, required): Specifies the endpoint to be called. conversation (array of objects, required): Contains objects with the following keys: role (string, required): Role of the participant in the conversation. content (string, required): Content of the conversation. file (object, required): Contains information about the file being sent. message_file_type(string, required): Specifies the type of file being sent (Accepted values: "PNG", "JPEG", "WEBP", "HEIC", "HEIF"). file_mime(string, required): MIME type of the file (Accepted values: "image/png", "image/jpeg", "image/webp", "image/heic", "image/heif"). source_type(string, required): Specifies the type of source for the file data ("URL" or "base64encoded"). source(string, required): URL to the image or base64encoded data. Response Code (integer): Indicates the status code of the response. Success (boolean): Indicates whether the request was successful. Msg (string): Provides additional information about the response. Messages (object): Contains additional message data with keys "Chat_Title" and "buzzai". Token_Usage (integer): Indicates the usage of token.

Example Request
curl --location 'https://www.buzzai.live/api.php' \
--data '{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Can you please identify the animal in the image?"}
                    ],
    "file" : {
        "message_file_type": "image", 
        "file_mime": "image/png",
        "source_type": "URL", 
        "source":"https://www.wwf.org.uk/sites/default/files/styles/max_650x650/public/2022-05/_WW236934.jpg?itok=JlG-1l9V"
    }
}'
 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Can you please identify the animal in the image?"}
                    ],
    "file" : {
        "message_file_type": "image", 
        "file_mime": "image/png",
        "source_type": "URL", 
        "source":"https://www.wwf.org.uk/sites/default/files/styles/max_650x650/public/2022-05/_WW236934.jpg?itok=JlG-1l9V"
    }
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Example Request
curl --location 'https://www.buzzai.live/api.php' \
--data '{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Can you please identify the animal in the image?"}
                    ],
    "file" : {
        "message_file_type": "image",
        "file_mime": "image/png", 
        "source_type": "URL", 
        "source":"https://www.wwf.org.uk/sites/default/files/styles/max_650x650/public/2022-05/_WW236934.jpg?itok=JlG-1l9V"
    },
    "stream":true

}'
 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"Can you please identify the animal in the image?"}
                    ],
    "file" : {
        "message_file_type": "image",
        "file_mime": "image/png", 
        "source_type": "URL", 
        "source":"https://www.wwf.org.uk/sites/default/files/styles/max_650x650/public/2022-05/_WW236934.jpg?itok=JlG-1l9V"
    },
    "stream":true

}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Example Response
{"Code":200,"Success":true,"Msg":"Recieved successfully","Messages":{"Chat_Title":"","buzzai":" The animal in the image is a koala. Koalas are arboreal marsupials native to Australia. They are known for their soft, gray fur, and their eucalyptus-eating habits. Koalas are a popular tourist attraction in Australia, and they are also a symbol of the country."},"Token_Usage":1200}
event: buzzai_special
data: {"feature":"img","Message":"Reading image."}

...

event: buzzai_special
data: {"feature":"img","Message":"Reading image."}

event: response
data: {"Code":200,"Success":true,"Msg":"Recieved successfully","Messages":{"Chat_Title":"","buzzai":" The animal in the image is a koala."},"Token_Usage":1200}

event: close
data: Connection closed

Parameters

Attribute Type Description
endpoint string Specifies the endpoint to be called.
conversation array Contains objects with the following keys:
role string Role of the participant in the conversation.
content string Content of the conversation.
file array Contains information about the file being sent.
message_file_type string Specifies the type of file being sent (Accepted values: "PNG", "JPEG", "WEBP", "HEIC", "HEIF").
file_mime string MIME type of the file (Accepted values: "image/png", "image/jpeg", "image/webp", "image/heic", "image/heif").
source_type string Specifies the type of source for the file data ("URL" or "base64encoded").
source string URL to the image or base64encoded data.

chat- document reading

                        
                          {
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"PROMPT FOR DOCUMENT"}
                    ],
    "file" : {
        "message_file_type": "document",
        "file_mime": "FILE MIME TYPE",
        "source_type": "SOURCE TYPE", //URL, base64encoded
        "source":"URL TO THE DOCUMENT OR BASE64ENCODED DATA"
    }
}                        
                      
For this API , make a POST request to the following URL:
https://www.buzzai.live/api.php
This API endpoint is a POST request to the https://www.buzzai.live/api.php URL. It is used to send a chat conversation along with a document file. The request body should include the endpoint key with the value "chat", and a conversation array containing objects with "role" and "content" keys. Additionally, there should be a file object with keys for the document file type, MIME type, source type, and the source of the document. Request Body endpoint (string, required): Specifies the endpoint to be called. conversation (array of objects, required): Contains objects with the following keys: role (string, required): Role of the participant in the conversation. content (string, required): Content of the conversation. file (object, required): Contains information about the file being sent. message_file_type(string, required): Specifies the type of file being sent. file_mime(string, required): MIME type of the file . source_type(string, required): Specifies the type of source for the file data ("URL" or "base64encoded"). source(string, required): URL to the document or base64encoded data. Response Code (integer): Indicates the status code of the response. Success (boolean): Indicates whether the request was successful. Msg (string): Provides additional information about the response. Messages (object): Contains additional message data with keys "Chat_Title" and "buzzai". Token_Usage (integer): Indicates the usage of token.

Example Request
curl --location 'https://www.buzzai.live/api.php' \
--data '{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"What is in this PDF?"}
                    ],
    "file" : {
        "message_file_type": "document",
        "file_mime": "appliaction/pdf",
        "source_type": "URL", 
        "source":"https://pdfobject.com/pdf/sample.pdf"
    }
}'
 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"What is in this PDF?"}
                    ],
    "file" : {
        "message_file_type": "document",
        "file_mime": "appliaction/pdf",
        "source_type": "URL", 
        "source":"https://pdfobject.com/pdf/sample.pdf"
    }
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Example Request
curl --location 'https://www.buzzai.live/api.php' \
--data '{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"What is in this PDF?"}
                    ],
    "file" : {
        "message_file_type": "document",
        "file_mime": "appliaction/pdf",
        "source_type": "URL", 
        "source":"https://pdfobject.com/pdf/sample.pdf"
    },
    "stream": true
}'
 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"What is in this PDF?"}
                    ],
    "file" : {
        "message_file_type": "document",
        "file_mime": "appliaction/pdf",
        "source_type": "URL", 
        "source":"https://pdfobject.com/pdf/sample.pdf"
    },
    "stream": true
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Example Response
{"Code":200,"Success":true,"Msg":"Recieved successfully","Messages":{"Chat_Title":"","buzzai":"The PDF is a simple document titled \"Sample PDF\". It contains some sample text, including a part of \"Lorem Ipsum\", which is a placeholder text used in the publishing industry. The text seems to be intended for general purposes and does not carry any specific message."},"Token_Usage":1200}
event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: buzzai_special
data: {"feature":"doc","Message":"Reading document."}

event: response
data: {"Code":200,"Success":true,"Msg":"Recieved successfully","Messages":{"Chat_Title":"","buzzai":"The PDF is a sample document. It includes some placeholder text generally known as \"Lorem Ipsum\", which is derived from sections of a Latin text by Cicero in 45 BC, altered over centuries into its current form. The document also mentions \"This is a simple PDF file. Fun fun fun.\" It does not seem to contain specific or valuable information."},"Token_Usage":1200}

event: close
data: Connection closed

Parameters

Attribute Type Description
endpoint string Specifies the endpoint to be called.
conversation array Contains objects with the following keys:
role string Role of the participant in the conversation.
content string Content of the conversation.
file array Contains information about the file being sent.
message_file_type string Specifies the type of file being sent (Accepted values: "PNG", "JPEG", "WEBP", "HEIC", "HEIF").
file_mime string MIME type of the file (Accepted values: "image/png", "image/jpeg", "image/webp", "image/heic", "image/heif").
source_type string Specifies the type of source for the file data ("URL" or "base64encoded").
source string URL to the image or base64encoded data.

chat - special features

                        
                          {
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"YOUR MESSAGE"}
                    ],
    "features": {
        "image_generation": false, //bool, defaults to false
        "web_search":false, //bool, defaults to false
        "mail":false //bool, defaults to false
    }
}                        
                      
For this API , make a POST request to the following URL:
https://www.buzzai.live/api.php
This API endpoint is a POST request to https://www.buzzai.live/api.php. It is used to send a payload with a raw request body type. The payload should include an "endpoint" and a "conversation" array, where each element in the array includes a "role" and a "content". Request Body endpoint (string): Represents the endpoint for the request. conversation (array): Contains elements with the following parameters: role (string): Represents the role of the participant in the conversation. content (string): Represents the content of the conversation. Response Upon a successful request, the response will include the following fields: Code (integer): Represents the status code of the response. Success (boolean): Indicates the success status of the request. Msg (string): Provides any additional message related to the request. Messages (object): Contains information about the chat title and buzzai. Token_Usage (integer): Represents the token usage associated with the request.

Example Request
curl --location 'https://www.buzzai.live/api.php' \
--data '{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"What'\''s the current temperature in Delhi, India"}
                    ],
    "features": {
        "image_generation": false, 
        "web_search":true, 
        "mail":false
    }
}'
 'https://www.buzzai.live/api.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "endpoint": "chat",
    "conversation": [
                        {"role":"user","content":"What\'s the current temperature in Delhi, India"}
                    ],
    "features": {
        "image_generation": false, 
        "web_search":true, 
        "mail":false
    }
}',
  CURLOPT_HTTPHEADER => array(

  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Example Response
{"Code":200,"Success":true,"Msg":"Recieved successfully","Messages":{"Chat_Title":"","buzzai":"Right now, it is hazy and the temperature in Delhi, India is 32 degrees Celsius. The forecast shows sun with a high of 34 degrees Celsius and a low of 20 degrees Celsius."},"Token_Usage":1181}

Parameters

Attribute Type Description
endpoint string Specifies the endpoint to be called.
conversation array Contains objects with the following keys:
role string Role of the participant in the conversation.
content string Content of the conversation.
features array Contains information about features to be used.
image_generation bool If Image generation feature should be used
web_search bool If Web search feature should be used
mail bool If Email feature should be used