# Basalt Language Detection

> Basalt Language Detection is a paid API for AI agents from basalt-n6lt.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Detects the language of a given text string, returning ISO language codes with confidence scores

## Facts

- Endpoint: POST https://basalt-n6lt.onrender.com/language-detect
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/basalt-language-detection-5c9ba4b2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1cQn9G_dO9aSEq3KfHjUN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability basalt-language-detection-5c9ba4b2 -d '<json body>'
```

Example prompt: What language is this text written in: 'Hola, ¿cómo estás? Espero que todo vaya bien por tu lado'? Give me the top candidate languages and tell me how confident you are.

## When to prefer this

Choose this endpoint when you need fast, cheap ($0.002/call) language identification with ranked candidate scores and an explicit confidence flag — ideal for routing pipelines, multilingual content moderation, or pre-translation gating where knowing confidence matters. Prefer this over general-purpose LLM language guessing when you need machine-readable ISO codes and structured probability output rather than free-text answers.

## Known failure modes

- Very short or ambiguous text may return confident:false with multiple similar-scoring candidates
- Texts mixing multiple languages may produce unreliable primary detection
- Empty or whitespace-only input may return an error or null language
- Extremely rare or constructed languages may not be in the model's training set
- Network timeouts on the Render-hosted service during cold starts

## How this service works

Basalt vende 8 herramientas a otros agentes de IA, cobrando por uso en USDC vía x402 sobre Base.

## Output

Returns a JSON object with the detected primary language as a 3-letter ISO 639-3 code (e.g. 'spa' for Spanish), a boolean confidence flag indicating whether the model is certain, and a ranked list of candidate language codes each with a float probability score summing near 1.0.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "language": "spa",
  "confident": true,
  "candidates": [
   {
    "code": "spa",
    "score": 0.99
   },
   {
    "code": "cat",
    "score": 0.006
   },
   {
    "code": "por",
    "score": 0.002
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/basalt-language-detection-5c9ba4b2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from basalt-n6lt.onrender.com](https://www.zero.xyz/host/basalt-n6lt.onrender.com/llms.txt)
