# Enhance prompt (/docs/api-reference/simulation/enhancePrompt)

> Generate prompt-improvement suggestions for a completed simulation.



**POST** `/simulations/{simulation_id}/enhance-prompt`

Generate prompt-improvement suggestions for a completed simulation.

```yaml
operationId: enhancePrompt
parameters:
  - name: simulation_id
    in: path
    required: true
    schema:
      type: integer
responses:
  '200':
    description: |
      Enhanced prompt suggestions. The simulation must be in
      `Completed` status — otherwise the API returns 400.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            previous_context:
              type: array
              description: The agent's existing context-breakdown sections.
              items:
                type: object
                properties:
                  title:
                    type: string
                  prompt:
                    type: string
            prompt_breakdown:
              type: array
              description: Suggested replacement sections, structured the same way.
              items:
                type: object
                properties:
                  title:
                    type: string
                  prompt:
                    type: string
        example:
          success: true
          previous_context:
            - title: Purpose
              prompt: This agent helps customers with product inquiries and support issues.
          prompt_breakdown:
            - title: Purpose
              prompt: >-
                This agent helps customers with product inquiries, support issues, and frequently
                asked product questions.
  '400':
    description: >
      Simulation is not in `Completed` status. Body:

      `{"error": "invalid_state", "error_description": "Enhanced prompt suggestions are only
      available for completed simulations"}`.
```

**Python SDK**

```python
from omnidimension import Client
client = Client(api_key)

# Get enhanced prompt suggestions
simulation_id = 456
response = client.simulation.enhance_prompt(simulation_id)
print(response)
```

**curl**

```bash
curl -X POST "https://backend.omnidim.io/api/v1/simulations/{simulation_id}/enhance-prompt" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```
