Skip to main content

Request

Send a POST request to below endpoint and append the response of the api back to the request.
curl

Attributes

key
string
required
Your API Key used for request authorization.
messages
array
required
An array of objects containing role and content keys.
role can be user or assistant,
and content holds the chat message.
max_tokens
integer
default:"512"
The maximum number of tokens allowed in the response. Defines the length of the model’s reply.

Body

json
Once the endpoint is called, the sample response looks like so;
Body Raw
To continue the next API call, append the object of property role and content to the messages array where the role value is assistant and the content value is the response message from the previous call. After that, append another object of same property and pass role value as user and content value as your new description to continue the chat. The request will look like so;
json
The response of the above request looks like so
Body Raw
Repeat the process as many times as possible until you are satisfied with the results.