{"uid":"cap_6dTHurnhd7LQVyF5dHSV-","slug":"signaldesk-ai-text-character-count-99581893","name":"SignalDesk AI – Text Character Count","description":"Evidence-backed autonomous AI jobs and paid data tools. Queue/D1/cron run outside the chat; free quotas and bounded execution apply.","url":"https://x402-agent.kariguetoazul.workers.dev/api/text/character-count?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","maxLength":4096,"description":"Text to process."}}},"responseSchema":{"type":"json","example":{"utf8_bytes":9,"code_points":5,"utf16_units":6}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pC58e6IEddOxaJ8_mlWYw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Counts UTF-8 bytes, Unicode code points, and UTF-16 units for a given text string","exampleAgentPrompt":"How many UTF-8 bytes, Unicode code points, and UTF-16 units are in this text: 'Hello, 世界!'?","exampleUseCases":[{"title":"Validate API payload size before sending","prompt":"Can you count the UTF-8 bytes in this JSON string so I know if it's under my 512-byte limit? Here's the text: '{\"name\":\"João Silva\",\"message\":\"Olá, tudo bem?\"}'"},{"title":"Check emoji and multilingual character counts","prompt":"I have this string with emojis and Arabic characters — '😀مرحبا بكم' — can you tell me how many UTF-8 bytes, code points, and UTF-16 units it uses?"},{"title":"Measure SMS or tweet character budget","prompt":"I'm drafting a tweet: 'Exciting news — our new product launches tomorrow at 9am ET! Stay tuned for details. #launch #startup' — tell me the code point count so I know if it fits in 280 characters."}],"resultDescription":"Returns a JSON object with three integer fields: utf8_bytes (total bytes when the string is encoded as UTF-8), code_points (total Unicode scalar values / characters), and utf16_units (total 16-bit units in UTF-16 encoding). Useful for validating byte budgets across different encoding schemes.","failureModes":["Text exceeds 4096-character maxLength — request rejected","Non-string or missing 'text' field — validation error","Payment not provided or insufficient — x402 payment required response","Cloudflare Worker cold-start or quota exhaustion — 503 or timeout"],"whenToPreferThis":"Choose this endpoint when you need precise multi-encoding character metrics (UTF-8 bytes, code points, and UTF-16 units simultaneously) for a single text snippet up to 4096 characters, especially when dealing with multilingual text, emoji, or surrogate pairs where simple length counts are misleading. It is not suitable for bulk batch processing or text longer than 4096 characters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:42:13.145Z","isFirstParty":false,"canonicalSlug":"signaldesk-ai-text-character-count-99581893"}