{"uid":"cap_yiwCBXgNOwnFZejRkh--Q","slug":"api-strale-io-65f99f1e","name":"Strale Prompt Compressor","description":"Compress a prompt to be shorter while preserving semantic meaning. Specify target reduction percentage (10-70%).","url":"https://api.strale.io/x402/prompt-compress","method":"GET","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":{"request":{"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},"response":{"_meta":{"payment":{"method":"x402","price_usd":0.0324,"settlement_id":"0xdc6ca90104825acc67f56f94fa121f5faff49f67fc041d719f9936e83c544a0b"},"capability":"prompt-compress","latency_ms":1281,"provenance":{"source":"claude-haiku","fetched_at":"2026-06-13T04:24:41.662Z"}},"original_tokens":58,"removed_content":["detailed","that specializes in answering","including","multiple"],"compressed_prompt":"You are a helpful assistant specializing in software engineering questions: architecture, design patterns, debugging, code review, and best practices across languages and frameworks.","compressed_tokens":46,"preserved_instructions":["helpful assistant role","software engineering focus","architecture expertise","design patterns","debugging","code review","best practices","multiple languages and frameworks support"],"actual_reduction_percent":21}},"exampleRequest":{"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},"tags":["x402"],"displayCostAmount":"0.0324","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0324/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0324","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0324","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-GF6441HMofLDMCT6-Mls","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0324","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compresses a text prompt to be shorter while preserving its semantic meaning, with a configurable target reduction percentage.","exampleAgentPrompt":"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.'","exampleUseCases":null,"resultDescription":"Returns a compressed version of the input prompt that is semantically equivalent but shorter, achieving approximately the specified target reduction percentage in length.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:57:01.279Z","isFirstParty":false}