# Strale Prompt Compressor

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

Compresses a text prompt to be shorter while preserving its semantic meaning, with a configurable target reduction percentage.

## Facts

- Endpoint: GET https://api.strale.io/x402/prompt-compress
- Price: $0.0324/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-65f99f1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yiwCBXgNOwnFZejRkh--Q

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-65f99f1e
```

Example prompt: Compress this prompt for me, targeting a 40% reduction: 'You are a helpful assistant that specializes in answering detailed questions about software engineering, including architecture, design patterns, debugging, code review, and best practices across multiple languages and frameworks.'

## When to prefer this

Use this endpoint when you need to reduce token usage in LLM prompts without losing semantic meaning, especially when optimizing system prompts, few-shot examples, or lengthy instructions for cost savings or context window management.

## Known failure modes

- Missing required prompt_text parameter returns an error
- target_reduction_percent outside 10-70% range may return an error or be clamped
- Very short prompts may not compress well
- Semantic meaning may be slightly altered for very aggressive reduction targets
- Payment failure via x402 protocol blocks the request

## How this service works

Compress a prompt to be shorter while preserving semantic meaning. Specify target reduction percentage (10-70%).

## Output

Returns a compressed version of the input prompt that is semantically equivalent but shorter, achieving approximately the specified target reduction percentage in length.

## Example request

```json
{
 "prompt_text": "You are a helpful assistant that specializes in answering detailed questions about software engineering, including architecture, design patterns, debugging, code review, and best practices across multiple languages and frameworks.",
 "target_reduction_percent": 40
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "prompt_text"
     ],
     "properties": {
      "prompt_text": {
       "type": "string"
      },
      "target_reduction_percent": {
       "type": "integer",
       "description": "Default 30"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-65f99f1e/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)
