v47

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2024-06-17465244.2 KB
AI Services

AiCon V2 (Stable)

Content Generation AI focused only on Business Content Generation Purpose. Trained on top of actual business and financial data with added data security and privacy.

post/api/ai/content/v2

Request body

questionstring

The Text or Command to be processed.

preserve_historyboolean

Whether to preserve the conversation history of the user. If set to true, the conversation history will be preserved and the conversation history will be accepted as conversation_history in the request body.

randomnessinteger

The randomness factor to be used while generating the content. The higher the randomness, the more creative the content will be. The value should be between 0 and 1. 0 means it will be absolutely to the point and stops hallucinations. 1 means it will be completely creative and creates a content surrounding your questions a lot.

training_datastring

The training data to be used while generating the content. This can be used to pass in smaller content based on how you want the model to behave, and specific behavioural or restrictive traits you want to add. This is optional.

stream_databoolean

Whether to stream the data as it is being generated. If set to true, the response will be streamed as the data is being generated. This is useful when you want to generate a lot of content and want to save the data as it is being generated. You need to handle Server Sent Events for this use case.

response_type'json' | 'text'

The type of output to be generated. You can choose between json and text. json will return the text detection results as a JSON object that is parseable. text will return the text results as a plain text string.

Response

Text Content Generated Successfully

statusstring

Status indicating the success of the text moderation.

contentstring

The text content generated.

processing_timeinteger

The time taken to process the request, in milliseconds.

processing_idstring

A universally unique identifier for the request. This can be used to track the request in the logs.

processing_countinteger

The number of times the request has been processed. This is what is considered in the Billing Process. This is either the number of times the image is processed or the number of words that the server processes.

Example response

{
  "status": "success",
  "processing_time": 888,
  "content": "\"Hello! My name is Alex, and I am your tour guide. I am here to assist you and provide you with information about the places we will be visiting. If you have any questions or need any help during our tour, feel free to ask. I'm here to make your experience enjoyable and memorable. Let's have a great time exploring together\"\n",
  "processing_id": "4b139bfe-1f71-4345-b539-fa6c1700f166",
  "processing_count": 6554
}