# AiPrompt

## Sends a custom AI prompt and retrieves the response.

> Sends a custom AI prompt and retrieves the response.

OpenAPI:

```json
{"openapi":"3.0.4","info":{"title":"TrueTest - API Documentation","version":"v1"},"servers":[{"url":"/api"}],"paths":{"/Ai/Prompt":{"post":{"tags":["AiPrompt"],"summary":"Sends a custom AI prompt and retrieves the response.","description":"Sends a custom AI prompt and retrieves the response.","requestBody":{"description":"The AI prompt command containing the instruction and content.","content":{"application/json":{"schema":{"type":"object","properties":{"instruction":{"type":"string","nullable":true},"contents":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true}},"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true},"exception":{"type":"object","properties":{"details":{"type":"string","nullable":true},"headers":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"nullable":true},"path":{"type":"string","nullable":true},"endpoint":{"type":"string","nullable":true},"routeValues":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false}},"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"Bearer":{"type":"http","description":"🗝️ Admin Account\n\neyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SWQiOiIxMTExMTExMS0xMTExLTExMTEtMTExMS0xMTExMTExMTExMTEiLCJVc2VybmFtZSI6ImFkbWluIiwiRW1haWwiOiJhZG1pbkB0cnVldGVzdC50ZWNoIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjpbIkNhbmRpZGF0ZSIsIkFkbWluIl0sIlBlcm1pc3Npb24iOlsiQWNjZXNzT3duRXhhbXMiLCJTdWJtaXRBbnN3ZXJzIiwiUnVuQ29kZSIsIk1hbmFnZU93blByb2ZpbGUiLCJNYW5hZ2VBY2NvdW50cyIsIlZpZXdFeGFtcyIsIk1hbmFnZUV4YW1zIiwiTWFuYWdlUXVlc3Rpb25zIiwiVmlld1N1Ym1pc3Npb25zIiwiUmV2aWV3U3VibWlzc2lvbiJdLCJleHAiOjQ4OTkwMzMxOTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3QiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0In0.VBPngQIwsybHrwZPYMA5sNpWew3S9_W7cDdpAD4mDyM","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"Bearer":[]}]}
```

## Generates an exam description using AI based on the provided query.

> Generates an exam description using AI based on the provided query.

OpenAPI:

```json
{"openapi":"3.0.4","info":{"title":"TrueTest - API Documentation","version":"v1"},"servers":[{"url":"/api"}],"paths":{"/Ai/Generate/ExamDescription":{"post":{"tags":["AiPrompt"],"summary":"Generates an exam description using AI based on the provided query.","description":"Generates an exam description using AI based on the provided query.","requestBody":{"description":"The query containing parameters for generating the exam description.","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","nullable":true},"userPrompt":{"type":"string","nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","nullable":true}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true}},"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true},"exception":{"type":"object","properties":{"details":{"type":"string","nullable":true},"headers":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"nullable":true},"path":{"type":"string","nullable":true},"endpoint":{"type":"string","nullable":true},"routeValues":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false}},"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"Bearer":{"type":"http","description":"🗝️ Admin Account\n\neyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SWQiOiIxMTExMTExMS0xMTExLTExMTEtMTExMS0xMTExMTExMTExMTEiLCJVc2VybmFtZSI6ImFkbWluIiwiRW1haWwiOiJhZG1pbkB0cnVldGVzdC50ZWNoIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjpbIkNhbmRpZGF0ZSIsIkFkbWluIl0sIlBlcm1pc3Npb24iOlsiQWNjZXNzT3duRXhhbXMiLCJTdWJtaXRBbnN3ZXJzIiwiUnVuQ29kZSIsIk1hbmFnZU93blByb2ZpbGUiLCJNYW5hZ2VBY2NvdW50cyIsIlZpZXdFeGFtcyIsIk1hbmFnZUV4YW1zIiwiTWFuYWdlUXVlc3Rpb25zIiwiVmlld1N1Ym1pc3Npb25zIiwiUmV2aWV3U3VibWlzc2lvbiJdLCJleHAiOjQ4OTkwMzMxOTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3QiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0In0.VBPngQIwsybHrwZPYMA5sNpWew3S9_W7cDdpAD4mDyM","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"Bearer":[]}]}
```

## Generates a problem-solving question using AI based on the provided query.

> Generates a problem-solving question using AI based on the provided query.

OpenAPI:

```json
{"openapi":"3.0.4","info":{"title":"TrueTest - API Documentation","version":"v1"},"servers":[{"url":"/api"}],"paths":{"/Ai/Generate/ProblemSolvingQuestion":{"post":{"tags":["AiPrompt"],"summary":"Generates a problem-solving question using AI based on the provided query.","description":"Generates a problem-solving question using AI based on the provided query.","requestBody":{"description":"The query containing parameters for generating the problem-solving question.","content":{"application/json":{"schema":{"type":"object","properties":{"userPrompt":{"type":"string","nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"statementMarkdown":{"type":"string","nullable":true},"testCases":{"type":"array","items":{"type":"object","properties":{"input":{"type":"string","nullable":true},"output":{"type":"string","nullable":true}},"additionalProperties":false},"nullable":true}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true}},"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true},"exception":{"type":"object","properties":{"details":{"type":"string","nullable":true},"headers":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"nullable":true},"path":{"type":"string","nullable":true},"endpoint":{"type":"string","nullable":true},"routeValues":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false}},"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"Bearer":{"type":"http","description":"🗝️ Admin Account\n\neyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SWQiOiIxMTExMTExMS0xMTExLTExMTEtMTExMS0xMTExMTExMTExMTEiLCJVc2VybmFtZSI6ImFkbWluIiwiRW1haWwiOiJhZG1pbkB0cnVldGVzdC50ZWNoIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjpbIkNhbmRpZGF0ZSIsIkFkbWluIl0sIlBlcm1pc3Npb24iOlsiQWNjZXNzT3duRXhhbXMiLCJTdWJtaXRBbnN3ZXJzIiwiUnVuQ29kZSIsIk1hbmFnZU93blByb2ZpbGUiLCJNYW5hZ2VBY2NvdW50cyIsIlZpZXdFeGFtcyIsIk1hbmFnZUV4YW1zIiwiTWFuYWdlUXVlc3Rpb25zIiwiVmlld1N1Ym1pc3Npb25zIiwiUmV2aWV3U3VibWlzc2lvbiJdLCJleHAiOjQ4OTkwMzMxOTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3QiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0In0.VBPngQIwsybHrwZPYMA5sNpWew3S9_W7cDdpAD4mDyM","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"Bearer":[]}]}
```

## Generates a written question using AI based on the provided query.

> Generates a written question using AI based on the provided query.

OpenAPI:

```json
{"openapi":"3.0.4","info":{"title":"TrueTest - API Documentation","version":"v1"},"servers":[{"url":"/api"}],"paths":{"/Ai/Generate/WrittenQuestion":{"post":{"tags":["AiPrompt"],"summary":"Generates a written question using AI based on the provided query.","description":"Generates a written question using AI based on the provided query.","requestBody":{"description":"The query containing parameters for generating the written question.","content":{"application/json":{"schema":{"type":"object","properties":{"userPrompt":{"type":"string","nullable":true}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"questionStatement":{"type":"string","nullable":true}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true}},"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true},"exception":{"type":"object","properties":{"details":{"type":"string","nullable":true},"headers":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"nullable":true},"path":{"type":"string","nullable":true},"endpoint":{"type":"string","nullable":true},"routeValues":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false}},"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"Bearer":{"type":"http","description":"🗝️ Admin Account\n\neyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SWQiOiIxMTExMTExMS0xMTExLTExMTEtMTExMS0xMTExMTExMTExMTEiLCJVc2VybmFtZSI6ImFkbWluIiwiRW1haWwiOiJhZG1pbkB0cnVldGVzdC50ZWNoIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjpbIkNhbmRpZGF0ZSIsIkFkbWluIl0sIlBlcm1pc3Npb24iOlsiQWNjZXNzT3duRXhhbXMiLCJTdWJtaXRBbnN3ZXJzIiwiUnVuQ29kZSIsIk1hbmFnZU93blByb2ZpbGUiLCJNYW5hZ2VBY2NvdW50cyIsIlZpZXdFeGFtcyIsIk1hbmFnZUV4YW1zIiwiTWFuYWdlUXVlc3Rpb25zIiwiVmlld1N1Ym1pc3Npb25zIiwiUmV2aWV3U3VibWlzc2lvbiJdLCJleHAiOjQ4OTkwMzMxOTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3QiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0In0.VBPngQIwsybHrwZPYMA5sNpWew3S9_W7cDdpAD4mDyM","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"Bearer":[]}]}
```

## Reviews a problem submission using AI.

> Reviews a problem submission using AI.

OpenAPI:

```json
{"openapi":"3.0.4","info":{"title":"TrueTest - API Documentation","version":"v1"},"servers":[{"url":"/api"}],"paths":{"/Ai/Review/ProblemSubmission/{problemSubmissionId}":{"post":{"tags":["AiPrompt"],"summary":"Reviews a problem submission using AI.","description":"Reviews a problem submission using AI.","parameters":[{"name":"problemSubmissionId","in":"path","description":"The ID of the problem submission to review.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"string","nullable":true},"score":{"type":"number","format":"double"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true}},"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true}},"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true},"exception":{"type":"object","properties":{"details":{"type":"string","nullable":true},"headers":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"nullable":true},"path":{"type":"string","nullable":true},"endpoint":{"type":"string","nullable":true},"routeValues":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false}},"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"Bearer":{"type":"http","description":"🗝️ Admin Account\n\neyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SWQiOiIxMTExMTExMS0xMTExLTExMTEtMTExMS0xMTExMTExMTExMTEiLCJVc2VybmFtZSI6ImFkbWluIiwiRW1haWwiOiJhZG1pbkB0cnVldGVzdC50ZWNoIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjpbIkNhbmRpZGF0ZSIsIkFkbWluIl0sIlBlcm1pc3Npb24iOlsiQWNjZXNzT3duRXhhbXMiLCJTdWJtaXRBbnN3ZXJzIiwiUnVuQ29kZSIsIk1hbmFnZU93blByb2ZpbGUiLCJNYW5hZ2VBY2NvdW50cyIsIlZpZXdFeGFtcyIsIk1hbmFnZUV4YW1zIiwiTWFuYWdlUXVlc3Rpb25zIiwiVmlld1N1Ym1pc3Npb25zIiwiUmV2aWV3U3VibWlzc2lvbiJdLCJleHAiOjQ4OTkwMzMxOTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3QiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0In0.VBPngQIwsybHrwZPYMA5sNpWew3S9_W7cDdpAD4mDyM","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"Bearer":[]}]}
```

## Reviews a written submission using AI.

> Reviews a written submission using AI.

OpenAPI:

```json
{"openapi":"3.0.4","info":{"title":"TrueTest - API Documentation","version":"v1"},"servers":[{"url":"/api"}],"paths":{"/Ai/Review/WrittenSubmission/{submissionId}":{"post":{"tags":["AiPrompt"],"summary":"Reviews a written submission using AI.","description":"Reviews a written submission using AI.","parameters":[{"name":"submissionId","in":"path","description":"The ID of the written submission to review.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"review":{"type":"string","nullable":true},"score":{"type":"number","format":"double"}},"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true}},"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true}},"additionalProperties":false}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32"},"detail":{"type":"string","nullable":true},"traceId":{"type":"string","nullable":true},"exception":{"type":"object","properties":{"details":{"type":"string","nullable":true},"headers":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"nullable":true},"path":{"type":"string","nullable":true},"endpoint":{"type":"string","nullable":true},"routeValues":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false}},"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"Bearer":{"type":"http","description":"🗝️ Admin Account\n\neyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SWQiOiIxMTExMTExMS0xMTExLTExMTEtMTExMS0xMTExMTExMTExMTEiLCJVc2VybmFtZSI6ImFkbWluIiwiRW1haWwiOiJhZG1pbkB0cnVldGVzdC50ZWNoIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjpbIkNhbmRpZGF0ZSIsIkFkbWluIl0sIlBlcm1pc3Npb24iOlsiQWNjZXNzT3duRXhhbXMiLCJTdWJtaXRBbnN3ZXJzIiwiUnVuQ29kZSIsIk1hbmFnZU93blByb2ZpbGUiLCJNYW5hZ2VBY2NvdW50cyIsIlZpZXdFeGFtcyIsIk1hbmFnZUV4YW1zIiwiTWFuYWdlUXVlc3Rpb25zIiwiVmlld1N1Ym1pc3Npb25zIiwiUmV2aWV3U3VibWlzc2lvbiJdLCJleHAiOjQ4OTkwMzMxOTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3QiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0In0.VBPngQIwsybHrwZPYMA5sNpWew3S9_W7cDdpAD4mDyM","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"Bearer":[]}]}
```
