{"uid":"cap_wjT7grv14PWI3-Rze6kxQ","slug":"api-strale-io-0b339d61","name":"Strale Prompt Optimizer","description":"Analyze and improve a prompt. Returns improved version with changes and reasoning, clarity score comparison, and techniques applied.","url":"https://api.strale.io/x402/prompt-optimize","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"bad_examples":{"type":"array"},"good_examples":{"type":"array"},"current_prompt":{"type":"string"},"task_description":{"type":"string"}}},"responseSchema":null,"example":{"request":{"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"},"response":{"_meta":{"payment":{"method":"x402","price_usd":0.162,"settlement_id":"0xc1909d64da07af8087021f592d359b6395dc962cc2a4e6d4dd4878e5bfeb18ed"},"capability":"prompt-optimize","latency_ms":6621,"provenance":{"source":"claude-haiku","fetched_at":"2026-06-18T04:26:27.545Z"}},"changes_made":[{"change":"Added 'provided' to specify feedback will be given","reasoning":"Clarifies that input will be supplied, reducing ambiguity about where feedback comes from"},{"change":"Replaced 'provide insights' with 'deliver structured insights by identifying'","reasoning":"More specific about the expected output format and concrete deliverables"},{"change":"Numbered and expanded the three analysis categories with descriptors","reasoning":"Makes expectations explicit and prevents interpretation drift; descriptors like 'frustrations' and 'explicit' add precision"},{"change":"Added requirement for specific quotes and significance explanation","reasoning":"Ensures output is evidence-based and traceable, improving credibility and usefulness"},{"change":"Specified output format (labeled sections with bullet points)","reasoning":"Removes guesswork about desired structure; prevents vague or unorganized responses"},{"change":"Added guidance for multi-topic feedback organization","reasoning":"Handles edge cases and prevents scattered outputs when feedback is complex"}],"issues_found":["Vague verb 'analyze' without specifying analysis dimensions","No specified output format or structure","Ambiguous about what 'insights' means","Missing context about where feedback comes from","No guidance on handling edge cases or complex feedback","Unclear if analysis should be qualitative or quantitative"],"clarity_score":{"improved":9,"original":2},"improved_prompt":"Analyze the provided customer feedback and deliver structured insights by identifying: (1) main pain points and frustrations, (2) explicit feature requests or suggestions, (3) overall sentiment (positive, negative, neutral). For each category, provide specific quotes from the feedback and explain their significance. Format your response as a clearly labeled section for each category with bullet points. If feedback spans multiple topics, organize by theme.","techniques_applied":["Specificity and concreteness","Explicit output formatting instructions","Enumerated requirements","Evidence-based reasoning demand","Edge case guidance","Descriptive modifiers for clarity"],"improved_token_estimate":85,"original_token_estimate":8}},"exampleRequest":{"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"},"tags":["x402"],"displayCostAmount":"0.162","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.162/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.162","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.162","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_F0mRdt4w4eu-Soqj86Ckl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.162","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes a prompt and returns an improved version with clarity score comparison, applied techniques, and reasoning for the changes.","exampleAgentPrompt":"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.","exampleUseCases":null,"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:59:25.553Z","isFirstParty":false}