---
title: "Get AI Content"
method: POST
path: "/api/ai/content/v2"
---

# Get AI Content

`POST /api/ai/content/v2`

## Request body

- object
  - `question` string — The question you want to ask the AI.
  - `preserve_history` boolean — Whether you want to preserve the history of the conversation or not.
  - `history_object` object — The history object that you want to pass to the model. This is only required if preserve_history is set to true. Pass the Questions and Answers as Key Value Pairs to help the model understand.
  - `training_data` string — The training data you want to pass to the AI.
  - `randomness` number — The randomness factor that you want to pass to the model. This is only required if you want to set the randomness factor. Default is 0.4. You can set it to 0.0 to disable randomness and set it to 1.0 to enable maximum randomness. We recommend setting it to anything between 0.0 and 0.5 for best results.

## Response `200`

Success

- AIContentV2Response
  - `id` string — The unique identifier associated with the response.
  - `status` string — The status of the response.
  - `timestamp` integer — The timestamp when the response was generated.
  - `content` string — The content of the response.
  - `processing_count` integer — The number of times the response has been processed.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized - Invalid API Key or Organization Key
- `404` — Not Found
- `406` — Not Acceptable - Invalid Content Type or Content not supported
- `500` — Internal Server Error

---

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