Agentic Platform
Documentation API reference Tools Skills

Tools

HTML Lang

html_lang

Get the language of a given HTML page (BCP47 format)

A simple agent that returns the language of a given HTML page (BCP47 format). First, we try to read the lang attribute on the html tag. If we don't find it, extract the text from the html and ask to a LLM.

Playground

Your organization, project and token stay in this browser's local storage and are sent straight to the API — this page never sees them.

POST
item
html_code required HTML code of the page to process
config
default_to If we don't find, return this value (if not empty) instead of an error.

Billing

Fixed cost per item requested. Most pages declare their language in the HTML and reading it there adds nothing. Only when they do not is a model asked, and only on the first 10,000 characters, so the content read is capped and the answer is a single language code.

These usage SKUs can be charged on a call.

SKU Credits Description
Tool call 1 per request Charged once per successful item, on top of any usage below.
Gemini 3 Flash (flex), input 250 per million tokens Tokens the model reads from the prompt you send.
Gemini 3 Flash (flex), output 1,500 per million tokens Tokens the model writes in its answer.
Gemini 3 Flash (flex), read from cache 50 per million tokens Tokens the model reads from a cached prompt. Cheaper than a fresh read.
Gemini 3 Flash (standard), input 500 per million tokens Tokens the model reads from the prompt you send.
Gemini 3 Flash (standard), output 3,000 per million tokens Tokens the model writes in its answer.
Gemini 3 Flash (standard), read from cache 50 per million tokens Tokens the model reads from a cached prompt. Cheaper than a fresh read.

Schemas

item is what you send, config how the tool behaves, and the response is what you get back.

Item

object
Properties
html_code string required

HTML code of the page to process

Example
{
  "html_code": "string"
}

Configuration

object
Properties
default_to string

If we don't find, return this value (if not empty) instead of an error.

Default: ""

Example
{
  "default_to": ""
}

Response

object
Properties
bcp47_lang_code string required

BCP47 language code of the page

source string required

Source of the language code (html_attribute, llm or default)

Example
{
  "bcp47_lang_code": "string",
  "source": "string"
}

Endpoints

POST http://agents.botify.com/{organization}/{project}/html_lang/process
POST http://agents.botify.com/{organization}/{project}/html_lang/batch_process
POST http://agents.botify.com/{organization}/{project}/html_lang/async_process
POST http://agents.botify.com/{organization}/{project}/html_lang/async_batch_process

See running a long job in the background for the polling flow.

cURL

curl -X POST "http://agents.botify.com/{organization}/{project}/html_lang/process" \
  -H "Authorization: Bearer $BOTIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "item": {
    "html_code": "<html_code>"
  }
}'

Raw metadata