{"uid":"cap_vWYotDPTONdYFK1UMyFOy","slug":"api-strale-io-8d65591e","name":"Strale Language Detection","description":"Detect the language of input text. Returns top language with confidence score, plus alternative possibilities. Supports 170+ languages via trigram analysis.","url":"https://api.strale.io/x402/language-detect?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Text to detect language of"},"min_length":{"type":"integer","description":"Minimum text length for reliable detection (default 10)"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"text":"Hello, this is a test message to detect the language. This text is written in English."},"response":{"_meta":{"payment":{"method":"x402","price_usd":0.0216,"settlement_id":"0x442d2062d92cc9bb93e5f23fb87c3aa6d30fe6ce260b607d68a0f105d79a5f65"},"capability":"language-detect","latency_ms":2,"provenance":{"source":"franc","fetched_at":"2026-06-13T04:25:42.580Z"}},"confidence":0.53,"text_length":86,"alternatives":[{"confidence":0.97,"language_code":"sco","language_name":"sco"},{"confidence":0.9,"language_code":"glg","language_name":"Galician"},{"confidence":0.87,"language_code":"cat","language_name":"Catalan"},{"confidence":0.85,"language_code":"spa","language_name":"Spanish"}],"language_code":"eng","language_name":"English","script_detected":"Latin"}},"exampleRequest":{"text":"Hello, this is a test message to detect the language. This text is written in English."},"tags":["x402"],"displayCostAmount":"0.0216","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.0216/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0216","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0216","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_385Kq7Tg4X1BKDWWenZsR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0216","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects the language of a given text string, returning the top detected language with a confidence score and alternative language possibilities, supporting 170+ languages via trigram analysis.","exampleAgentPrompt":"What language is this text written in, and how confident are you? — 'Bonjour, je m'appelle Marie et j'habite à Paris.' Give me the top language and any close alternatives.","exampleUseCases":null,"resultDescription":"Returns the top detected language (e.g. 'French') with a confidence score between 0 and 1, along with a ranked list of alternative language possibilities. Coverage spans 170+ languages detected via trigram analysis.","failureModes":["Text too short — if input is below min_length (default 10 chars), detection may be unreliable or return low confidence","Ambiguous/mixed language text — multilingual input may produce low confidence scores or incorrect primary language","Empty or missing 'text' query parameter — returns 400 or validation error","Very short common words may match multiple languages with near-equal scores","Rare or unsupported languages may fall back to a close linguistic relative"],"whenToPreferThis":"Choose this endpoint when you need fast, lightweight language identification across a broad set of 170+ languages and only need the top result with confidence score plus alternatives — particularly useful for routing, filtering, or tagging multilingual user content before downstream processing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:43:22.382Z","isFirstParty":false,"canonicalSlug":"api-strale-io-8d65591e"}