This endpoint retrieves a list of personas, which includes employees and generators.
None
The response is a JSON array of personas, where each persona has the following properties:
id
(string): The unique identifier of the persona.name
(string): The name of the persona.category
(string): The category of the persona.type
(string): The type of the persona, which can be either "expert" or "generator".GET /personas
[
{
"id": "1",
"name": "John Doe",
"category": "Marketing",
"type": "expert"
},
{
"id": "2",
"name": "Jane Smith",
"category": "Sales",
"type": "expert"
},
{
"id": "3",
"name": "Acme Generator",
"category": "Marketing",
"type": "generator"
}
]
/generate
This endpoint generates a response based on the provided message, persona, and model.
Content-Type: application/json
The request body should be a JSON object containing the following properties:
api-key
(string, required): The API key for authentication. You can get an API key at https://gptboss.com/dashboard if you have an Enterprise account.message
(string, required): The message to send to the AI.id
(string, required): The persona ID to use. You can review a list of personas by calling the /personas
endpoint.model
(string, required): The model to use. You can review a list of models by calling the /models
endpoint.{
"api-key": "your-api-key",
"message": "What is the capital of France?",
"id": "persona-1",
"model": "model-1"
}
The response will be a JSON object containing the following properties:
success
(boolean): Indicates whether the request was successful or not.message
(string): The generated message from the AI.message_id
(string): The unique identifier for the generated message.persona
(string): The persona used for generating the message.{
"success": true,
"message": "The capital of France is Paris.",
"message_id": "msg-12345",
"persona": "persona-1"
}
If there is an error, the response will have a status code of 500
and a JSON object containing the following property:
generatorError
(string): A description of the error that occurred.{
"generatorError": "No message provided - please provide a message to send to the AI."
}
This endpoint creates a message with experts and returns the generated message, message ID, and persona.
Headers:
Content-Type: application/json
Body:
api-key
(string): The API key for authentication.messages
(array): An array of message objects containing the following properties:
role
(string): The role of the message sender (e.g., "system", "user", "assistant").content
(string): The content of the message.id
(any): A unique identifier for the conversation.model
(string): The AI model to use for generating the message. Possible values are "gpt-4" and "gpt-3.5-turbo".200 OK
: The request was successful.
success
(boolean): Indicates whether the operation was successful.message
(string): The generated message.message_id
(string): The unique identifier of the generated message.persona
(string): The persona of the expert.500 Internal Server Error
: An error occurred while processing the request.
error
(string): A description of the error.Request:
{
"api-key": "your-api-key",
"messages": [
{
"role": "user",
"content": "Can you generate a SWOT analysis for a McDonald's Franchise?"
}
], // notice this is an array
"id": "42",
"model": "gpt-3.5-turbo"
}
Response:
{
"success": true,
"message": "Sure, here is a SWOT Analysis for a new McDonald's Franchise:
Strengths:
1. Strong brand recognition and reputation
2. Wide range of menu options to cater to different customer preferences
3. Well-established supply chain and distribution system
4. Franchisee support system including training and marketing assistance...",
"message_id": "generated-message-id",
"persona": "Addison Brant"
}
Client-side, you should store the value of "message" into an array of messages inside of an object like:
{
"role": "assistant",
"content": "Sure, here is a SWOT Analysis for a new McDonald's Franchise..."
}
Request:
{
"api-key": "your-api-key",
"messages": [
{
"role": "user",
"content": "Can you generate a SWOT analysis for a McDonald's Franchise?"
},
{
"role": "assistant",
"content": "Sure, here is a SWOT Analysis for a new McDonald's Franchise..."
},
{
"role": "user",
"content": "Thanks! Can you also generate a SWOT analysis for a Burger King Franchise?"
}
]
"id": "42",
"model": "gpt-3.5-turbo"
}
Response:
{
"success": true,
"message": "Sure, here is a SWOT Analysis for a new Burger King Franchise:
Strengths:
1. Strong brand recognition and reputation
2. Wide range of menu options to cater to different customer preferences
3. Well-established supply chain and distribution system
4. Franchisee support system including training and marketing assistance...",
"message_id": "generated-message-id",
"persona": "Addison Brant"
}
Client-side, you should store the value of "message" into an array of messages inside of an object like:
{
"role": "assistant",
"content": "Sure, here is a SWOT Analysis for a new McDonald's Franchise..."
}