{"uid":"cap_rn4RnKacv1KerzJ5TS-x-","slug":"tanship-payai-console-ai-text-compression-b171cdf3","name":"Tanship PayAI Console — AI Text Compression","description":"Payment-gated AI and browser automation API using the x402 protocol. All /v1/* endpoints require USDC payment on Base (eip155:8453) via x402 v2 exact scheme.","url":"https://x402.tanship.dev/v1/ai/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":{"properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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":"$1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1yw9xK-DCTE9oG1G7Jz56","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compresses input text using AI via a payment-gated x402 endpoint on Base (USDC), reducing token/character count while preserving meaning.","exampleAgentPrompt":"Can you compress this article text for me so it's shorter and uses fewer tokens? Send it as JSON to the AI compress endpoint — here's the full text: 'Artificial intelligence has transformed modern industry in numerous ways, from automating repetitive tasks to enabling complex decision-making at scale...'","exampleUseCases":[{"title":"Reduce LLM prompt token costs","prompt":"I have a very long system prompt I keep sending to GPT-4 and it's eating up my token budget. Can you compress it with AI so it says the same thing in fewer words? Here's the text: 'You are a helpful assistant specialized in customer support for SaaS products. Always be polite, concise, and refer users to documentation when appropriate...'"},{"title":"Condense research article for embedding","prompt":"Before I embed this research abstract into my vector database, can you compress it down so it's more concise and token-efficient? The text is: 'This study examines the long-term effects of remote work on employee productivity, mental health, and organizational culture across five industry sectors...'"},{"title":"Shorten chatbot knowledge base entries","prompt":"I have a bunch of FAQ entries that are way too verbose for my chatbot's context window. Can you compress this one using the Tanship AI compress API: 'To reset your password, navigate to the login page and click the Forgot Password link. You will receive an email with a secure link valid for 24 hours...'"}],"resultDescription":"Returns a compressed version of the submitted text, reduced in length while preserving semantic meaning, suitable for downstream AI processing, storage, or display.","failureModes":["Payment not provided or insufficient USDC — returns HTTP 402 with x402 payment required details","Invalid body format or missing required fields — returns 400 with schema validation error","Body type mismatch between declared bodyType and actual content — processing error","Empty or null input body — likely returns 400 or empty compression result","Network timeout for very large text payloads","x402 facilitator unavailability causing payment verification failure"],"whenToPreferThis":"Choose this endpoint when you need lightweight, low-cost AI-powered text compression ($0.005/call) paid via USDC on Base with no API key required — ideal for AI agents operating in autonomous, crypto-native payment flows using the x402 protocol. Prefer it over manual summarization prompts when you want a dedicated compression primitive with predictable cost per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:40:19.455Z","isFirstParty":false}