{"uid":"cap_c-42RdmT1ycs8ccAmJZ3K","slug":"fittings-language-detection-a834791b","name":"fittings Language Detection","description":"Detect the language of a text snippet: ISO 639-1 and 639-3 codes, the Unicode script, a confidence score and runner-up candidates. Latin and Cyrillic languages are separated by function-word profile, other scripts by script; answers 'und' rather than guessing when there is no evidence.","url":"https://fittings.sh/v1/lang/detect","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Text to classify, up to 20000 UTF-8 bytes"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0042","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.0042/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0042","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0042","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WvIa6V3jedFXbg-xpl7wQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0042","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 text snippet, returning ISO 639-1 and 639-3 codes, Unicode script, confidence score, and runner-up candidates.","exampleAgentPrompt":"What language is this text written in — can you give me the ISO 639-1 code and a confidence score? The text is: 'Bonjour, comment allez-vous aujourd'hui?'","exampleUseCases":[{"title":"Route multilingual support tickets","prompt":"I'm getting support messages in different languages and need to route them to the right team. What language is this ticket written in and how confident are you? Text: 'Necesito ayuda con mi cuenta, no puedo iniciar sesión.'"},{"title":"Filter non-English user content","prompt":"Before I run this user comment through my English-only sentiment model, can you check what language it's in and give me the ISO 639-1 code? Comment: 'Das Produkt ist wirklich ausgezeichnet, ich bin sehr zufrieden.'"},{"title":"Validate language of uploaded documents","prompt":"A user just uploaded a document claiming it's in French, but I want to verify that before processing it. Can you detect the language of this excerpt and tell me the confidence score and any runner-up candidates? Text: 'Le gouvernement a annoncé de nouvelles mesures économiques cette semaine.'"}],"resultDescription":"Returns the detected language as ISO 639-1 (e.g. 'fr') and ISO 639-3 (e.g. 'fra') codes, the Unicode script family (e.g. 'Latin'), a numeric confidence score, and an ordered list of runner-up language candidates. Returns 'und' when there is insufficient evidence to make a determination.","failureModes":["Text too short to confidently classify — returns 'und' instead of guessing","Highly mixed-language text may produce low confidence scores across all candidates","Text exceeding 20000 UTF-8 bytes will be rejected","Closely related languages in the same script (e.g. Malay vs Indonesian) may return low confidence","Empty or whitespace-only input returns 'und'"],"whenToPreferThis":"Choose this endpoint when you need language identification with explicit confidence scoring and ISO-standard codes (both 639-1 and 639-3), especially when handling Latin-script or Cyrillic-script languages that require function-word profiling to disambiguate (e.g. Spanish vs Portuguese, Russian vs Ukrainian). Prefer it over generic NLP pipelines when you want a lightweight, pay-per-call service that safely returns 'und' rather than hallucinating a language for ambiguous input.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:09:38.679Z","isFirstParty":false}