---
title: "Improve Prompt"
method: POST
path: "/api/v1/utils/improve-prompt"
tags: ["utils"]
---

# Improve Prompt

`POST /api/v1/utils/improve-prompt`

## Request

- Base URL: `https://api.komos.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.komos.ai/api/v1/utils/improve-prompt`
- Auth: none declared

Improve a node prompt for clarity while preserving all details.

Uses Gemini to rewrite the prompt with clearer instructions,
better organization, and more explicit action verbs.
Preserves all ${variable} references exactly as-is.

## Headers

- `Authorization` string, nullable
- `X-Org-Id` string, nullable

## Request body

- ImprovePromptRequest: Request to improve a node prompt.
  - `prompt` string, required: The prompt to improve
  - `node_type` 'AGENT_ACTION' | 'PROCESS_DATA' | 'SKILL', required: Type of node the prompt is for
  - `visual_references` VisualReferenceInput[], nullable: Optional visual reference images to provide context
    - `url` string, required: Storage path or HTTP URL of the image
    - `label` string: Human-readable label for the image
  - `user_guidance` string, nullable: Optional user guidance on what to improve

## Response `200`

Successful Response

- ImprovePromptResponse: Response with improved prompt.
  - `improved` string, required
  - `original` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/komos/apis/komos-backend.md) · [All operations](https://skmtc.dev/komos/apis/komos-backend/llms.txt) · [OpenAPI document](https://skmtc.dev/komos/apis/komos-backend/revisions/f10e153fab38?raw)
