---
title: "Prompt Optimize (x402)"
method: POST
path: "/x402/v2/prompt-optimize"
tags: ["x402"]
---

# Prompt Optimize (x402)

`POST /x402/v2/prompt-optimize`

## Request

- Base URL: `https://api.strale.io`
- URL: `https://api.strale.io/x402/v2/prompt-optimize`
- Auth: none required

Analyze and improve a prompt. Returns improved version with changes and reasoning, clarity score comparison, and techniques applied.

## Request body

- object
  - `bad_examples` unknown[]
    - unknown
  - `good_examples` unknown[]
    - unknown
  - `current_prompt` string, required
  - `task_description` string

## Response `200`

Success

- object
  - `changes_made` unknown[]
    - unknown
  - `clarity_score` object
  - `improved_prompt` string
  - `techniques_applied` unknown[]
    - unknown

## Other responses

- `402`: Payment required (x402 — pay with USDC on Base)

---

[API](https://skmtc.dev/strale/apis/strale-api-2.md) · [All operations](https://skmtc.dev/strale/apis/strale-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/strale/apis/strale-api-2/revisions/a5293878cfc6?raw)
