{"uid":"cap_F81xisFFPiqYZhD1nIk9Y","slug":"x402-deployer-x402-deployer-workers-dev-3c248014","name":"Prompt Compressor / Context Shrinker","description":"Prompt compressor / context shrinker / prompt distiller / cost-cutter for long system prompts. Rewrites a long prompt down to a target ratio of its original length while preserving every instruction, constraint, and example's intent. Drops filler words, redundant repetition, and ceremonial politeness. Powered by Venice mistral-small-3-2-24b.","url":"https://x402-deployer.x402-deployer.workers.dev/prompt-compress","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["prompt"],"properties":{"prompt":{"type":"string","description":"Prompt to compress. Up to 60,000 chars."},"target_ratio":{"type":"number","description":"Target length as a fraction of original. Range [0.1, 1.0]. Default 0.4."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"model":{"type":"string"},"source":{"type":"string"},"original":{"type":"string"},"compressed":{"type":"string"},"actual_ratio":{"type":"number"},"target_ratio":{"type":"number"},"original_chars":{"type":"integer"},"compressed_chars":{"type":"integer"}}}}}}},"responseSchema":null,"example":{"request":{"prompt":"You are a helpful AI assistant. You should always be polite, respectful, and professional in your interactions with users. When responding to questions, make sure to provide accurate and helpful information. Always double-check your work before submitting responses. Never make up information or provide false data. If you don't know something, say so clearly. Be concise but thorough in your explanations. Consider the user's perspective and try to be as helpful as possible. Remember to maintain a friendly tone throughout the conversation. If the user asks for help with something, do your best to assist them in a clear and organized manner. Always respect user privacy and confidentiality. Follow all applicable laws and regulations. Be honest and transparent in your communications.","targetRatio":0.4},"response":{"model":"hermes-3-llama-3.1-405b","source":"morpheus","original":"You are a helpful AI assistant. You should always be polite, respectful, and professional in your interactions with users. When responding to questions, make sure to provide accurate and helpful information. Always double-check your work before submitting responses. Never make up information or provide false data. If you don't know something, say so clearly. Be concise but thorough in your explanations. Consider the user's perspective and try to be as helpful as possible. Remember to maintain a friendly tone throughout the conversation. If the user asks for help with something, do your best to assist them in a clear and organized manner. Always respect user privacy and confidentiality. Follow all applicable laws and regulations. Be honest and transparent in your communications.","compressed":"Be a polite, professional AI. Provide accurate, helpful information. Double-check responses. Don't make up info; admit unknowns. Be concise yet thorough. Consider user's view. Maintain friendly tone. Assist help requests clearly. Respect privacy. Follow laws. Be honest and transparent.","actual_ratio":0.363,"target_ratio":0.4,"original_chars":788,"compressed_chars":286}},"exampleRequest":{"prompt":"You are a helpful AI assistant. You should always be polite, respectful, and professional in your interactions with users. When responding to questions, make sure to provide accurate and helpful information. Always double-check your work before submitting responses. Never make up information or provide false data. If you don't know something, say so clearly. Be concise but thorough in your explanations. Consider the user's perspective and try to be as helpful as possible. Remember to maintain a friendly tone throughout the conversation. If the user asks for help with something, do your best to assist them in a clear and organized manner. Always respect user privacy and confidentiality. Follow all applicable laws and regulations. Be honest and transparent in your communications.","targetRatio":0.4},"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jR4PnnBcPZgb64A5XLuX5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Rewrites a long system prompt down to a target compression ratio while preserving all instructions, constraints, and examples — dropping filler, redundancy, and ceremonial language.","exampleAgentPrompt":"Can you compress this 2000-token system prompt down to about 40% of its original length? Here's the prompt: [paste prompt]. Keep every instruction and constraint intact — just cut the filler, repetition, and polite padding.","exampleUseCases":null,"resultDescription":"Returns the rewritten, compressed prompt text that preserves all original instructions, constraints, and example intent at the specified target ratio, with redundancy and filler removed.","failureModes":["Prompt text missing or empty — returns 400 bad request","Target ratio not specified or out of range — may default or error","Payment not provided or insufficient USDC — returns 402 payment required","Upstream Venice/mistral model unavailable — returns 503","Prompt too short to meaningfully compress — may return near-original text","Rate limiting on the worker — returns 429"],"whenToPreferThis":"Use this endpoint when you need to reduce token count and LLM API costs for long system prompts, especially when the prompt has verbose instructions, ceremonial politeness, or redundant repetition. Prefer this over manual editing when you want an AI-driven distillation that guarantees semantic preservation of every constraint and example.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:43:47.068Z","isFirstParty":false}