---
title: "Ai Prompt Engineer Api"
method: POST
path: "/voice_agent_assistants/ai-prompt-engineer"
tags: ["voice_agent_assistants"]
---

# Ai Prompt Engineer Api

`POST /voice_agent_assistants/ai-prompt-engineer`

## Request body

- AIPromptEngineerAPIRequest
  - `assistant_prompt` string, required
  - `desired_changes` string, required

## Response `200`

Successful Response

- SystemPromptStructureInput — API CONTRACT: External format for frontend/OpenAPI. USE THIS FOR: - API request/response models (FastAPI route data classes) - OpenAPI schema generation (creates proper TypeScript types) - Frontend communication DO NOT USE FOR: - Internal storage or processing - System prompt generation/parsing - Database operations CONVERSION: - Frontend sends this format → convert to SystemPromptStructure for processing - Backend responses convert SystemPromptStructure → this format via to_api_format()
  - `base_prompt` BasePromptSection, required — The base prompt that always appears first.
    - `content` string, required

## Other responses

- `422` — Validation Error

## Changes

> 17 revisions in range; 1 not diffed.

- **2026-09-03** `d65b8fefae34` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/getanana/apis/cleon-api/changes/voice_agent_assistants/ai-prompt-engineer/post.md)

---

[API](https://skmtc.dev/getanana/apis/cleon-api.md) · [All operations](https://skmtc.dev/getanana/apis/cleon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getanana/apis/cleon-api/revisions/94579f820778?raw)
