# Strale Prompt Optimizer

> Strale Prompt Optimizer is a paid API for AI agents from api.strale.io, paid per call via x402, $0.162/call, status unknown (last checked 2026-09-15).

Analyzes a prompt and returns an improved version with clarity score comparison, applied techniques, and reasoning for the changes.

## Facts

- Endpoint: POST https://api.strale.io/x402/prompt-optimize
- Price: $0.162/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-0b339d61
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wjT7grv14PWI3-Rze6kxQ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-strale-io-0b339d61 -d '<json body>'
```

Example prompt: Can you optimize this prompt for me? Task: 'Summarize customer support tickets into actionable insights for a team lead.' Current prompt: 'Read the ticket and tell me what to do.' I want to see the improved version, clarity score comparison, and the techniques you applied.

## When to prefer this

Use this endpoint when you need structured, scored prompt improvement with explicit technique attribution and reasoning — not just a rewrite. Ideal when you want to compare before/after clarity scores and understand why specific changes were made, or when you have good/bad prompt examples to guide the optimization.

## Known failure modes

- Missing current_prompt field returns a 400 validation error
- Empty or too-short prompt may result in minimal improvements
- Ambiguous task_description may lead to generic optimizations
- Payment failure via x402 returns 402 Payment Required
- Malformed JSON body returns 400 error

## How this service works

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

## Output

Returns an improved version of the submitted prompt, a clarity score for both the original and improved versions, a comparison between them, the prompt engineering techniques applied, and the reasoning behind each change.

## Example request

```json
{
 "bad_examples": [
  "Look at feedback and tell me what's important"
 ],
 "good_examples": [
  "Analyze the following customer feedback to identify: (1) main pain points, (2) feature requests, (3) sentiment. Format as a structured list."
 ],
 "current_prompt": "Analyze customer feedback and provide insights",
 "task_description": "Improve clarity and specificity of a customer feedback analysis prompt"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "bad_examples": {
   "type": "array"
  },
  "good_examples": {
   "type": "array"
  },
  "current_prompt": {
   "type": "string"
  },
  "task_description": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-0b339d61/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
