---
title: "AiCon V2 (Stable)"
method: POST
path: "/api/ai/content/v2"
tags: ["AI Services"]
---

# AiCon V2 (Stable)

`POST /api/ai/content/v2`

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.

## Request body

- object
  - `question` string — The Text or Command to be processed.
  - `preserve_history` boolean — 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.
  - `conversation_history` object[] — The conversation history of the user as an array of objects. Each object should have a `question` and `answer` property as the key and value respectively.
    - `conversation` string — The conversation between the user and the AI as a key value pair.
  - `randomness` integer — 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_data` string — 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_data` boolean — 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 `200`

Text Content Generated Successfully

- object
  - `status` string — Status indicating the success of the text moderation.
  - `content` string — The text content generated.
  - `processing_time` integer — The time taken to process the request, in milliseconds.
  - `processing_id` string — A universally unique identifier for the request. This can be used to track the request in the logs.
  - `processing_count` integer — 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.

## Other responses

- `400` — Bad Request.
- `401` — Unauthorized
- `404` — Not Found
- `406` — Not Acceptable
- `500` — Internal Server Error

---

[API](https://skmtc.net/worqhat/apis/worqhat-ai-api-endpoints-2.md) · [All operations](https://skmtc.net/worqhat/apis/worqhat-ai-api-endpoints-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/worqhat/worqhat-ai-api-endpoints-2/versions/fc369f69a3e6/schema)
