{"uid":"cap_KTLEzw80Qt79wHClvltk4","slug":"coco-language-detection-api-fd08d9d0","name":"CoCo Language Detection API","description":"Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.","url":"https://cocoeatsai.com/area4/agent/tools/language?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"enum":["GET"]},"queryParams":{"type":"object","properties":{"text":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"const":"json"},"example":{"type":"object","required":["language"],"properties":{"language":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"language":"en","candidates":[{"p":1,"lang":"en"}],"confidence":1},"exampleNote":"Computed offline with demonstration inputs; time/random values are illustrative."},"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_CCXK-NIb1lXavdEjKH6OT","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":"Detects the natural language of a given text string and returns the identified language code with confidence score","exampleAgentPrompt":"Can you detect what language this text is written in: 'Bonjour, comment ça va?'","exampleUseCases":[{"title":"Auto-route multilingual support tickets","prompt":"Before we respond to this support message, can you figure out what language it's written in so we can route it to the right team? The message is: 'Por favor, necesito ayuda con mi cuenta.'"},{"title":"Validate user input language","prompt":"A user just submitted this form response — can you check what language it's in and tell me the confidence level? The text is: 'Diese Funktion funktioniert überhaupt nicht.'"},{"title":"Language-gate content pipeline","prompt":"I need to know if this article excerpt is written in English before we process it further — can you detect the language? The text is: '今日は素晴らしい天気ですね。'"}],"resultDescription":"Returns a JSON object containing the detected language code (e.g. 'en' for English), a confidence score between 0 and 1, and an array of candidate languages each with a probability score. Example: {\"language\":\"en\",\"candidates\":[{\"p\":1,\"lang\":\"en\"}],\"confidence\":1}","failureModes":["Empty or missing text query parameter returns an error or undefined behavior","Very short text (single character or word) may yield low confidence or incorrect detection","Highly mixed-language text may produce ambiguous results with split confidence across candidates","Extremely rare or constructed languages may not be recognized","Request timeout if upstream service is unavailable"],"whenToPreferThis":"Use this endpoint when you need lightweight, fast language detection on a text snippet and want a simple JSON response with a language code and confidence score. It is ideal for pre-processing pipelines, routing decisions, or validating user input language before forwarding to a translation or localization service. Prefer it for single-text, low-latency detection calls where the $0.001 per-call pricing is acceptable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:44:31.289Z","isFirstParty":false,"canonicalSlug":"coco-language-detection-api-fd08d9d0"}