# cerio api

base_url: https://api.cerio.ru
auth: none
endpoints: 47
groups: 14
json: https://api.cerio.ru/api/docs

## ИИ API (`ai`)

### POST /api/ai/ask

Запрос к AI: текст и/или изображение → краткий ответ модели в поле answer. Это простой эндпоинт «вопрос-ответ»; для чатов, стриминга, инструментов и эмбеддингов используйте /api/ai/v1/*. Ответ: {"answer":"..."}

Параметры: Content-Type: application/json. Поля: prompt — вопрос или системная инструкция; text — пользовательский текст; imageBase64 — картинка в base64 или data URL (до 7 МБ, иначе 400); imageMimeType — MIME-тип, например image/jpeg; temperature; maxTokens; clientName — метка клиента для статистики; modelId — идентификатор модели из GET /api/ai/v1/models. Альтернатива — multipart/form-data с полями prompt, text и файлом image.

URL:
```
https://api.cerio.ru/api/ai/ask
```

curl:
```
curl -X POST "https://api.cerio.ru/api/ai/ask" -H "Content-Type: application/json" -d '{"prompt":"Привет","text":"Hello"}'
```

fetch:
```
fetch(`https://api.cerio.ru/api/ai/ask`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ prompt: "Привет", text: "Hello" }) }).then(r => r.json()).then(console.log);
```

powershell:
```
$body = '{"prompt":"Привет","text":"Hello"}'; Invoke-RestMethod -Uri "https://api.cerio.ru/api/ai/ask" -Method Post -ContentType "application/json" -Body $body
```

csharp:
```
using var client = new HttpClient(); var json = "{\"prompt\":\"Привет\",\"text\":\"Hello\"}"; var content = new StringContent(json, Encoding.UTF8, "application/json"); var response = await client.PostAsync("https://api.cerio.ru/api/ai/ask", content);
```

curl-multipart:
```
curl -X POST "https://api.cerio.ru/api/ai/ask" -F "prompt=Опиши что на фото" -F "image=@photo.jpg"
```

fetch-multipart:
```
const fd = new FormData(); fd.append("prompt", "Опиши что на фото"); fd.append("image", fileInput.files[0]); fetch(`https://api.cerio.ru/api/ai/ask`, { method: "POST", body: fd }).then(r => r.json()).then(console.log);
```

powershell-multipart:
```
$form = @{ prompt = "Опиши что на фото"; image = Get-Item "photo.jpg" }; Invoke-RestMethod -Uri "https://api.cerio.ru/api/ai/ask" -Method Post -Form $form
```

csharp-multipart:
```
using var content = new MultipartFormDataContent(); content.Add(new StringContent("Опиши что на фото"), "prompt"); content.Add(new ByteArrayContent(File.ReadAllBytes("photo.jpg")), "image", "photo.jpg"); var response = await new HttpClient().PostAsync("https://api.cerio.ru/api/ai/ask", content);
```

curl — JSON с картинкой:
```
curl -sS -X POST "https://api.cerio.ru/api/ai/ask" -H "Content-Type: application/json" -d '{"prompt":"Опиши изображение","imageBase64":"data:image/jpeg;base64,/9j/4AAQSkZJRg...","imageMimeType":"image/jpeg"}'
```

fetch — картинка из input:
```
const b64 = await new Promise(r => { const fr = new FileReader(); fr.onload = () => r(fr.result); fr.readAsDataURL(fileInput.files[0]); });
const res = await fetch("https://api.cerio.ru/api/ai/ask", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ prompt: "Опиши изображение", imageBase64: b64 }) });
const data = await res.json(); console.log(data.answer);
```

### POST /api/ai/transcribe

Загрузите аудио или видео — получите текст расшифровки. Для видео звук снимается на сервере (нужен ffmpeg). При необходимости запросите разбивку по фрагментам со временем начала и конца.

Параметры: Поле file: аудио или видео (например mp4, webm). На сервере с API.Ai для видео нужен ffmpeg. Для фрагментов с таймкодами добавьте к адресу ?segments=1 или ?timestamps=true.

Адрес:
```
https://api.cerio.ru/api/ai/transcribe
```

Адрес с таймкодами:
```
https://api.cerio.ru/api/ai/transcribe?segments=1  (то же: ?timestamps=true)
```

curl — только текст:
```
curl -sS -X POST "https://api.cerio.ru/api/ai/transcribe" -F "file=@audio.wav"
```

curl — сегменты и время:
```
curl -sS -X POST "https://api.cerio.ru/api/ai/transcribe?segments=1" -F "file=@audio.wav"
```

Python (httpx):
```
import httpx
with open("audio.wav", "rb") as f:
    r = httpx.post("https://api.cerio.ru/api/ai/transcribe?segments=1", files={"file": ("audio.wav", f, "audio/wav")})
print(r.json())
```

PowerShell:
```
$u = "https://api.cerio.ru/api/ai/transcribe?timestamps=true"
Invoke-RestMethod -Uri $u -Method Post -Form @{ file = Get-Item 'audio.wav' }
```

fetch — только текст:
```
const fd = new FormData();
fd.append("file", document.getElementById("audio").files[0]);
const r = await fetch("https://api.cerio.ru/api/ai/transcribe", { method: "POST", body: fd });
console.log(await r.json());
```

fetch — сегменты:
```
const fd = new FormData();
fd.append("file", document.getElementById("audio").files[0]);
const r = await fetch("https://api.cerio.ru/api/ai/transcribe?segments=1", { method: "POST", body: fd });
console.log(await r.json());
```

curl — видео (mp4):
```
curl -sS -X POST "https://api.cerio.ru/api/ai/transcribe?segments=1" -F "file=@clip.mp4"
```

### GET /api/ai/v1/models

Список моделей в формате, совместимом с OpenAI (object = list). В data — модели, доступные для вызова: «Cerio v1.5» — чат и изображения, «cerio-embedding» — эмбеддинги. Поле id указывайте в model при POST /api/ai/v1/chat/completions или /api/ai/v1/embeddings. owned_by служебное. Короткий алиас того же API — /v1/models.

Параметры: Тело запроса не требуется. Без токена запрос бесплатный: 10 запросов в сутки с одного IP. С токеном — по лимиту токена; передайте его заголовком X-Api-Token или Authorization: Bearer.

PowerShell:
```
irm "https://api.cerio.ru/api/ai/v1/models" -Headers @{ "X-Api-Token" = "<токен>" }
```

curl:
```
curl -s "https://api.cerio.ru/api/ai/v1/models" -H "X-Api-Token: <токен>"
```

### POST /api/ai/v1/chat/completions

Ответ модели в формате, совместимом с OpenAI. В теле JSON укажите model (значение id из GET /api/ai/v1/models), массив messages с ролями system, user, assistant. Опционально temperature, max_tokens, tools и stream. Потоковый режим stream: true поддерживается: ответ приходит как SSE (text/event-stream); для статистики токенов добавьте stream_options.include_usage. Изображения передаются одной ссылкой data: в image_url. В ответе может быть поле reasoning_content.

Параметры: Content-Type: application/json. Поля: model, messages (role и content — строка или части multimodal), temperature, max_tokens, stream, stream_options, tools. При передаче tools запрос обслуживается моделью с поддержкой инструментов, поэтому model в ответе может отличаться от запрошенного. Без токена запрос бесплатный: 10 запросов в сутки с одного IP. С токеном — по лимиту токена; передайте его заголовком X-Api-Token или Authorization: Bearer.

PowerShell:
```
$body = @{ model = "Cerio v1.5"; messages = @(@{ role = "user"; content = "Привет" }) } | ConvertTo-Json -Depth 5; Invoke-RestMethod -Uri "https://api.cerio.ru/api/ai/v1/chat/completions" -Method Post -Body $body -ContentType "application/json" -Headers @{ "X-Api-Token" = "<токен>" }
```

curl:
```
curl -s "https://api.cerio.ru/api/ai/v1/chat/completions" -H "Content-Type: application/json" -H "X-Api-Token: <токен>" -d '{"model":"Cerio v1.5","messages":[{"role":"user","content":"Привет"}]}'
```

JavaScript fetch:
```
const r = await fetch("https://api.cerio.ru/api/ai/v1/chat/completions", { method: "POST", headers: { "Content-Type": "application/json", "X-Api-Token": "<токен>" }, body: JSON.stringify({ model: "Cerio v1.5", messages: [{ role: "user", content: "Привет" }] }) }); console.log(await r.json());
```

curl (stream):
```
curl -N "https://api.cerio.ru/api/ai/v1/chat/completions" -H "Content-Type: application/json" -H "X-Api-Token: <токен>" -d '{"model":"Cerio v1.5","messages":[{"role":"user","content":"Привет"}],"stream":true}'
```

### POST /api/ai/v1/embeddings

Числовые векторы текста в формате, совместимом с OpenAI. Передайте input — строку или массив строк; model необязателен: «cerio-embedding» или отсутствие поля направляют запрос на модель эмбеддингов по умолчанию. Ответ: object = list, data с полями object, embedding (1024 числа) и index, а также model и usage. Векторы подходят для семантического поиска, кластеризации и RAG.

Параметры: Content-Type: application/json. Поля: input (обязательно) — непустая строка или массив непустых строк; model (необязательно) — «cerio-embedding» или null. Размерность всегда 1024, параметр dimensions игнорируется; encoding_format не поддерживается — векторы возвращаются числами. Токенизированный input (массивы чисел) отклоняется. Без токена запрос бесплатный: 10 запросов в сутки с одного IP. С токеном — по лимиту токена; передайте его заголовком X-Api-Token или Authorization: Bearer.

PowerShell:
```
$body = @{ model = "cerio-embedding"; input = @("первый текст", "второй текст") } | ConvertTo-Json; Invoke-RestMethod -Uri "https://api.cerio.ru/api/ai/v1/embeddings" -Method Post -Body $body -ContentType "application/json" -Headers @{ "X-Api-Token" = "<токен>" }
```

curl:
```
curl -s "https://api.cerio.ru/api/ai/v1/embeddings" -H "Content-Type: application/json" -H "X-Api-Token: <токен>" -d '{"model":"cerio-embedding","input":["первый текст","второй текст"]}'
```

JavaScript fetch:
```
const r = await fetch("https://api.cerio.ru/api/ai/v1/embeddings", { method: "POST", headers: { "Content-Type": "application/json", "X-Api-Token": "<токен>" }, body: JSON.stringify({ model: "cerio-embedding", input: ["первый текст", "второй текст"] }) }); const { data } = await r.json(); console.log(data[0].embedding.length); // 1024
```

### POST /api/ai/v1/responses

Ответ модели в формате Responses API. Передайте model («Cerio v1.5») и input — строку или массив сообщений с role и content. Поддерживаются stream: true (SSE-события с префиксом response.), instructions, max_output_tokens и tools. В output приходят элементы reasoning (сводка рассуждений) и message с текстом; usage содержит input_tokens, output_tokens и total_tokens.

Параметры: Content-Type: application/json. Поля: model, input (строка или массив объектов role и content), instructions, max_output_tokens, stream, tools. Ответ: id, object = response, status, model, output (элементы reasoning и message), usage. Ошибки — объект error с полями message и type. Без токена запрос бесплатный: 10 запросов в сутки с одного IP. С токеном — по лимиту токена; передайте его заголовком X-Api-Token или Authorization: Bearer.

PowerShell:
```
$body = @{ model = "Cerio v1.5"; input = "Привет" } | ConvertTo-Json; Invoke-RestMethod -Uri "https://api.cerio.ru/api/ai/v1/responses" -Method Post -Body $body -ContentType "application/json" -Headers @{ "X-Api-Token" = "<токен>" }
```

curl:
```
curl -s "https://api.cerio.ru/api/ai/v1/responses" -H "Content-Type: application/json" -H "X-Api-Token: <токен>" -d '{"model":"Cerio v1.5","input":"Привет"}'
```

JavaScript fetch:
```
const r = await fetch("https://api.cerio.ru/api/ai/v1/responses", { method: "POST", headers: { "Content-Type": "application/json", "X-Api-Token": "<токен>" }, body: JSON.stringify({ model: "Cerio v1.5", input: "Привет" }) }); console.log(await r.json());
```

## Штрихкоды (`barcode`)

### GET /api/barcode/generate

Генерация штрихкода (PNG). format=QR_CODE и др.

Параметры: text (обяз.), format=QR_CODE, width, height, margin=2, signature=true, output (json — base64)

URL:
```
https://api.cerio.ru/api/barcode/generate?text=Hello&format=QR_CODE
```

curl:
```
curl "https://api.cerio.ru/api/barcode/generate?text=Hello&format=QR_CODE"
```

fetch:
```
fetch(`https://api.cerio.ru/api/barcode/generate?text=Hello&format=QR_CODE`).then(r => r.blob())
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/barcode/generate?text=Hello&format=QR_CODE" -Method Get -OutFile qr.png
```

csharp:
```
using var client = new HttpClient(); var bytes = await client.GetByteArrayAsync("https://api.cerio.ru/api/barcode/generate?text=Hello&format=QR_CODE");
```

### GET /api/barcode/formats

Список поддерживаемых форматов

URL:
```
https://api.cerio.ru/api/barcode/formats
```

curl:
```
curl "https://api.cerio.ru/api/barcode/formats"
```

fetch:
```
fetch(`https://api.cerio.ru/api/barcode/formats`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/barcode/formats" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/barcode/formats");
```

### POST /api/barcode/recognize

Распознавание штрихкода на изображении (multipart/form-data, поле file)

curl-multipart:
```
curl -X POST "https://api.cerio.ru/api/barcode/recognize" -F "file=@image.png"
```

fetch-multipart:
```
const fd = new FormData(); fd.append("file", fileInput.files[0]); fetch(`https://api.cerio.ru/api/barcode/recognize`, { method: "POST", body: fd }).then(r => r.json()).then(console.log);
```

powershell-multipart:
```
$form = @{ file = Get-Item "image.png" }; Invoke-RestMethod -Uri "https://api.cerio.ru/api/barcode/recognize" -Method Post -Form $form
```

csharp-multipart:
```
using var content = new MultipartFormDataContent(); content.Add(new ByteArrayContent(File.ReadAllBytes("image.png")), "file", "image.png"); var response = await new HttpClient().PostAsync("https://api.cerio.ru/api/barcode/recognize", content);
```

## Валюта (`currency`)

### GET /api/currency

Курсы валют

Параметры: baseCurrency=rub, currencies=usd,eur (через запятую)

URL:
```
https://api.cerio.ru/api/currency?baseCurrency=rub&currencies=usd,eur
```

curl:
```
curl "https://api.cerio.ru/api/currency?baseCurrency=rub&currencies=usd,eur"
```

fetch:
```
fetch(`https://api.cerio.ru/api/currency?baseCurrency=rub&currencies=usd,eur`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/currency?baseCurrency=rub&currencies=usd,eur" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/currency?baseCurrency=rub&currencies=usd,eur");
```

### GET /api/currency/list

Список доступных валют

URL:
```
https://api.cerio.ru/api/currency/list
```

curl:
```
curl "https://api.cerio.ru/api/currency/list"
```

fetch:
```
fetch(`https://api.cerio.ru/api/currency/list`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/currency/list" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/currency/list");
```

## Дата и время (`datetime`)

### GET /api/datetime/now

Текущее время (локальное + UTC)

URL:
```
https://api.cerio.ru/api/datetime/now
```

curl:
```
curl "https://api.cerio.ru/api/datetime/now"
```

fetch:
```
fetch(`https://api.cerio.ru/api/datetime/now`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/datetime/now" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/datetime/now");
```

### GET /api/datetime/in

Время в городе или часовом поясе

Параметры: place (обяз.) — город или Europe/Moscow, countryCode (опц.)

URL:
```
https://api.cerio.ru/api/datetime/in?place=Moscow
```

curl:
```
curl "https://api.cerio.ru/api/datetime/in?place=Moscow"
```

fetch:
```
fetch(`https://api.cerio.ru/api/datetime/in?place=Moscow`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/datetime/in?place=Moscow" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/datetime/in?place=Moscow");
```

### GET /api/datetime/convert

Конвертация даты между часовыми поясами

Параметры: date, from, to — часовые пояса

URL:
```
https://api.cerio.ru/api/datetime/convert?date=2025-02-28%2012:00&from=Europe/Moscow&to=America/New_York
```

curl:
```
curl "https://api.cerio.ru/api/datetime/convert?date=2025-02-28%2012:00&from=Europe/Moscow&to=America/New_York"
```

fetch:
```
fetch(`https://api.cerio.ru/api/datetime/convert?date=2025-02-28%2012:00&from=Europe/Moscow&to=America/New_York`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/datetime/convert?date=2025-02-28%2012:00&from=Europe/Moscow&to=America/New_York" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/datetime/convert?date=2025-02-28%2012:00&from=Europe/Moscow&to=America/New_York");
```

### GET /api/datetime/diff

Разница между двумя датами

Параметры: from, to

URL:
```
https://api.cerio.ru/api/datetime/diff?from=2025-01-01&to=2025-02-28
```

curl:
```
curl "https://api.cerio.ru/api/datetime/diff?from=2025-01-01&to=2025-02-28"
```

fetch:
```
fetch(`https://api.cerio.ru/api/datetime/diff?from=2025-01-01&to=2025-02-28`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/datetime/diff?from=2025-01-01&to=2025-02-28" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/datetime/diff?from=2025-01-01&to=2025-02-28");
```

### POST /api/datetime/mcp

MCP JSON-RPC endpoint (initialize, tools/list, tools/call)

Параметры: jsonrpc,id,method,params

LM Studio (mcp.json):
```
{"mcpServers":{"datetime":{"url":"https://cerio.ru/api/datetime/mcp"}}}
```

JSON (tools/call datetime_now):
```
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"datetime_now","arguments":{}}}
```

LM Studio с токеном:
```
{"mcpServers":{"datetime":{"url":"https://cerio.ru/api/datetime/mcp","headers":{"Authorization":"Bearer YOUR_TOKEN"}}}}
```

URL:
```
https://api.cerio.ru/api/datetime/mcp
```

curl (initialize):
```
curl -X POST "https://api.cerio.ru/api/datetime/mcp" -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{}}"
```

curl (tools/call datetime_in):
```
curl -X POST "https://api.cerio.ru/api/datetime/mcp" -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":3,\"method\":\"tools/call\",\"params\":{\"name\":\"datetime_in\",\"arguments\":{\"place\":\"Moscow\"}}}"
```

curl (tools/list):
```
curl -X POST "https://api.cerio.ru/api/datetime/mcp" -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\",\"params\":{}}"
```

### GET /api/datetime/mcp/examples

Готовые примеры MCP-запросов для DateTime

Параметры: -

URL:
```
https://api.cerio.ru/api/datetime/mcp/examples
```

curl:
```
curl "https://api.cerio.ru/api/datetime/mcp/examples"
```

## Гороскоп (`horoscope`)

### GET /api/horoscope

Гороскоп на 7 дней для знака зодиака

Параметры: sign (обяз.) — aries, taurus, gemini и т.д.; date (опц.) yyyy-MM-dd; extended=1

URL:
```
https://api.cerio.ru/api/horoscope?sign=leo&extended=luckyNumbers,luckyColors,compatibility,loveRelationships,careerFinance,health,moodOfDay,luckyDayOfWeek,adviceOfDay
```

curl:
```
curl "https://api.cerio.ru/api/horoscope?sign=leo&extended=luckyNumbers,luckyColors,compatibility,loveRelationships,careerFinance,health,moodOfDay,luckyDayOfWeek,adviceOfDay"
```

fetch:
```
fetch(`https://api.cerio.ru/api/horoscope?sign=leo&extended=luckyNumbers,luckyColors,compatibility,loveRelationships,careerFinance,health,moodOfDay,luckyDayOfWeek,adviceOfDay`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/horoscope?sign=leo&extended=luckyNumbers,luckyColors,compatibility,loveRelationships,careerFinance,health,moodOfDay,luckyDayOfWeek,adviceOfDay" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/horoscope?sign=leo&extended=luckyNumbers,luckyColors,compatibility,loveRelationships,careerFinance,health,moodOfDay,luckyDayOfWeek,adviceOfDay");
```

### GET /api/horoscope/signs

Список знаков зодиака

URL:
```
https://api.cerio.ru/api/horoscope/signs
```

curl:
```
curl "https://api.cerio.ru/api/horoscope/signs"
```

fetch:
```
fetch(`https://api.cerio.ru/api/horoscope/signs`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/horoscope/signs" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/horoscope/signs");
```

## IP (`ip`)

### GET /api/ip/address

IP-адрес вызывающего клиента

URL:
```
https://api.cerio.ru/api/ip/address
```

curl:
```
curl "https://api.cerio.ru/api/ip/address"
```

fetch:
```
fetch(`https://api.cerio.ru/api/ip/address`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/ip/address" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/ip/address");
```

### GET /api/ip/geolocation

Геолокация по IP

Параметры: ip (опц.) — IP для проверки; без параметра — ваш IP

URL:
```
https://api.cerio.ru/api/ip/geolocation?ip=8.8.8.8
```

curl:
```
curl "https://api.cerio.ru/api/ip/geolocation?ip=8.8.8.8"
```

fetch:
```
fetch(`https://api.cerio.ru/api/ip/geolocation?ip=8.8.8.8`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/ip/geolocation?ip=8.8.8.8" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/ip/geolocation?ip=8.8.8.8");
```

### GET /api/ip/timezone

Часовой пояс и локальное время по IP

Параметры: ip (опц.)

URL:
```
https://api.cerio.ru/api/ip/timezone
```

curl:
```
curl "https://api.cerio.ru/api/ip/timezone"
```

fetch:
```
fetch(`https://api.cerio.ru/api/ip/timezone`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/ip/timezone" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/ip/timezone");
```

## MCP Calculator (`mcpcalculator`)

### POST /api/mcpcalculator/mcp

MCP JSON-RPC: initialize, tools/list, tools/call. Tools: calculator_calculate, calculator_arithmetic, calculator_percent, calculator_convert_units

Параметры: jsonrpc,id,method,params

LM Studio (mcp.json):
```
{"mcpServers":{"calculator":{"url":"https://cerio.ru/api/mcpcalculator/mcp"}}}
```

curl (tools/call):
```
curl -X POST "https://api.cerio.ru/api/mcpcalculator/mcp" -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"calculator_calculate\",\"arguments\":{\"expression\":\"2+2\"}}}"
```

### GET /api/mcpcalculator/mcp

Информация о MCP endpoint

Параметры: -

URL:
```
https://api.cerio.ru/api/mcpcalculator/mcp
```

curl:
```
curl "https://api.cerio.ru/api/mcpcalculator/mcp"
```

## MCP Database (`mcpdatabase`)

### POST /api/mcpdatabase/mcp

MCP JSON-RPC: database_query, database_execute, database_list_tables (Postgres/MySQL/SQLite)

Параметры: jsonrpc,id,method,params

LM Studio (mcp.json):
```
{"mcpServers":{"database":{"url":"https://cerio.ru/api/mcpdatabase/mcp"}}}
```

LM Studio с токеном:
```
{"mcpServers":{"database":{"url":"https://cerio.ru/api/mcpdatabase/mcp","headers":{"Authorization":"Bearer YOUR_TOKEN"}}}}
```

curl (tools/call list_tables):
```
curl -X POST "https://api.cerio.ru/api/mcpdatabase/mcp" -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"database_list_tables\",\"arguments\":{\"connectionString\":\"Host=localhost;Database=api;Username=api;Password=xxx\",\"provider\":\"postgres\"}}}"
```

### GET /api/mcpdatabase/mcp

Информация о MCP endpoint

Параметры: -

URL:
```
https://api.cerio.ru/api/mcpdatabase/mcp
```

curl:
```
curl "https://api.cerio.ru/api/mcpdatabase/mcp"
```

## MCP DateTime (`mcpdatetime`)

### POST /api/mcpdatetime/mcp

MCP JSON-RPC: initialize, tools/list, tools/call. Tools: datetime_now, datetime_in, datetime_convert, datetime_diff

Параметры: jsonrpc,id,method,params

JSON:
```
{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}
```

### GET /api/mcpdatetime/mcp

Информация о MCP endpoint

Параметры: -

URL:
```
https://api.cerio.ru/api/mcpdatetime/mcp
```

## MCP Notes (`mcpnotes`)

### POST /api/mcpnotes/mcp

MCP JSON-RPC: initialize, tools/list, tools/call. Tools: notes_create, notes_list, notes_get, notes_update, notes_delete, notes_search. Без заголовка авторизации — заметки по IP; Bearer или X-Notes-Token — изоляция по токену.

Параметры: jsonrpc,id,method,params

LM Studio (mcp.json):
```
{"mcpServers":{"notes":{"url":"https://cerio.ru/api/mcpnotes/mcp"}}}
```

LM Studio + Bearer:
```
{"mcpServers":{"notes":{"url":"https://cerio.ru/api/mcpnotes/mcp","headers":{"Authorization":"Bearer YOUR_TOKEN"}}}}
```

LM Studio + X-Notes-Token:
```
{"mcpServers":{"notes":{"url":"https://cerio.ru/api/mcpnotes/mcp","headers":{"X-Notes-Token":"YOUR_SECRET"}}}}
```

curl (tools/list):
```
curl -X POST "https://api.cerio.ru/api/mcpnotes/mcp" -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\",\"params\":{}}"
```

curl (notes_create):
```
curl -X POST "https://api.cerio.ru/api/mcpnotes/mcp" -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"notes_create\",\"arguments\":{\"title\":\"Заголовок\",\"content\":\"Текст\"}}}"
```

curl + токен (X-Notes-Token):
```
curl -X POST "https://api.cerio.ru/api/mcpnotes/mcp" -H "Content-Type: application/json" -H "X-Notes-Token: my-secret" -d "{\"jsonrpc\":\"2.0\",\"id\":3,\"method\":\"tools/call\",\"params\":{\"name\":\"notes_list\",\"arguments\":{}}}"
```

### GET /api/mcpnotes/mcp

Краткая информация об MCP endpoint (имя, протокол, эндпоинт, подсказка по разделению IP/токен).

URL:
```
https://api.cerio.ru/api/mcpnotes/mcp
```

curl:
```
curl "https://api.cerio.ru/api/mcpnotes/mcp"
```

## MCP Web Search (`mcpwebsearch`)

### POST /api/mcpwebsearch/mcp

MCP JSON-RPC: GetOpenWebSearchStatus, Search, FetchWebContent, FetchGithubReadme, FetchCsdnArticle, FetchJuejinArticle, FetchLinuxDoArticle

LM Studio (mcp.json):
```
{"mcpServers":{"websearch":{"url":"https://cerio.ru/api/mcpwebsearch/mcp"}}}
```

LM Studio + Bearer:
```
{"mcpServers":{"websearch":{"url":"https://cerio.ru/api/mcpwebsearch/mcp","headers":{"Authorization":"Bearer YOUR_TOKEN"}}}}
```

curl (Search):
```
curl -X POST "https://api.cerio.ru/api/mcpwebsearch/mcp" -H "Content-Type: application/json" -d "{\\"jsonrpc\\":\\"2.0\\",\\"id\\":1,\\"method\\":\\"tools/call\\",\\"params\\":{\\"name\\":\\"Search\\",\\"arguments\\":{\\"query\\":\\"Model Context Protocol web search\\",\\"limit\\":5,\\"engines\\":\\"duckduckgo,bing\\"}}}"
```

### GET /api/mcpwebsearch/mcp

Краткая информация об MCP endpoint (имя, протокол, список методов).

URL:
```
https://api.cerio.ru/api/mcpwebsearch/mcp
```

curl:
```
curl "https://api.cerio.ru/api/mcpwebsearch/mcp"
```

## Сетевые утилиты (`networktools`)

### GET /api/networktools/ping

Ping хоста

Параметры: host (опц., по умолчанию 8.8.8.8), count=4

URL:
```
https://api.cerio.ru/api/networktools/ping?host=google.com
```

curl:
```
curl "https://api.cerio.ru/api/networktools/ping?host=google.com"
```

fetch:
```
fetch(`https://api.cerio.ru/api/networktools/ping?host=google.com`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/networktools/ping?host=google.com" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/networktools/ping?host=google.com");
```

### GET /api/networktools/nslookup

DNS lookup (nslookup)

Параметры: query (обяз.) — домен или IP, server (опц.) — DNS сервер

URL:
```
https://api.cerio.ru/api/networktools/nslookup?query=example.com
```

curl:
```
curl "https://api.cerio.ru/api/networktools/nslookup?query=example.com"
```

fetch:
```
fetch(`https://api.cerio.ru/api/networktools/nslookup?query=example.com`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/networktools/nslookup?query=example.com" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/networktools/nslookup?query=example.com");
```

### GET /api/networktools/whois

Whois lookup

Параметры: query (обяз.) — домен или IP

URL:
```
https://api.cerio.ru/api/networktools/whois?query=example.com
```

curl:
```
curl "https://api.cerio.ru/api/networktools/whois?query=example.com"
```

fetch:
```
fetch(`https://api.cerio.ru/api/networktools/whois?query=example.com`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/networktools/whois?query=example.com" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/networktools/whois?query=example.com");
```

### GET /api/networktools/portcheck

Проверка доступности порта

Параметры: host (обяз.), port (обяз. 1–65535), timeout=15

URL:
```
https://api.cerio.ru/api/networktools/portcheck?host=google.com&port=443
```

curl:
```
curl "https://api.cerio.ru/api/networktools/portcheck?host=google.com&port=443"
```

fetch:
```
fetch(`https://api.cerio.ru/api/networktools/portcheck?host=google.com&port=443`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/networktools/portcheck?host=google.com&port=443" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/networktools/portcheck?host=google.com&port=443");
```

### GET /api/networktools/emailverify

Проверка email (синтаксис, MX, доставка)

Параметры: email (обяз.)

URL:
```
https://api.cerio.ru/api/networktools/emailverify?email=test@example.com
```

curl:
```
curl "https://api.cerio.ru/api/networktools/emailverify?email=test@example.com"
```

fetch:
```
fetch(`https://api.cerio.ru/api/networktools/emailverify?email=test@example.com`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/networktools/emailverify?email=test@example.com" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/networktools/emailverify?email=test@example.com");
```

### GET /api/networktools/speedtest/download

Файл для спидтеста (size=10|100|1000 МБ)

Параметры: size=10 (МБ)

URL:
```
https://api.cerio.ru/api/networktools/speedtest/download?size=10
```

curl:
```
curl "https://api.cerio.ru/api/networktools/speedtest/download?size=10"
```

fetch:
```
fetch(`https://api.cerio.ru/api/networktools/speedtest/download?size=10`).then(r => r.blob())
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/networktools/speedtest/download?size=10" -Method Get -OutFile speedtest.bin
```

csharp:
```
using var client = new HttpClient(); var bytes = await client.GetByteArrayAsync("https://api.cerio.ru/api/networktools/speedtest/download?size=10");
```

## Персонализатор (`personalizer`)

### GET /api/personalizer/generate

Генерация фейкового профиля (ФИО, паспорт, телефон, email...)

Параметры: locale=ru, seed (опц.), fields (опц.) — firstName, email, phone, passport...

URL:
```
https://api.cerio.ru/api/personalizer/generate?locale=ru
```

curl:
```
curl "https://api.cerio.ru/api/personalizer/generate?locale=ru"
```

fetch:
```
fetch(`https://api.cerio.ru/api/personalizer/generate?locale=ru`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/personalizer/generate?locale=ru" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/personalizer/generate?locale=ru");
```

### GET /api/personalizer/locales

Список поддерживаемых локалей

URL:
```
https://api.cerio.ru/api/personalizer/locales
```

curl:
```
curl "https://api.cerio.ru/api/personalizer/locales"
```

fetch:
```
fetch(`https://api.cerio.ru/api/personalizer/locales`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/personalizer/locales" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/personalizer/locales");
```

### GET /api/personalizer/phone-country

Страна по номеру телефона

Параметры: phone (обяз.) — +12025550156 или +7 995 482 1237

URL:
```
https://api.cerio.ru/api/personalizer/phone-country?phone=+79001234567
```

curl:
```
curl "https://api.cerio.ru/api/personalizer/phone-country?phone=+79001234567"
```

fetch:
```
fetch(`https://api.cerio.ru/api/personalizer/phone-country?phone=%2B79001234567`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/personalizer/phone-country?phone=+79001234567" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/personalizer/phone-country?phone=%2B79001234567");
```

## Погода (`weather`)

### GET /api/weather/current

Текущая погода по городу и стране

Параметры: city (обяз.), country=RU, unit=celsius

URL:
```
https://api.cerio.ru/api/weather/current?city=Moscow&country=RU
```

curl:
```
curl "https://api.cerio.ru/api/weather/current?city=Moscow&country=RU"
```

fetch:
```
fetch(`https://api.cerio.ru/api/weather/current?city=Moscow&country=RU`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/weather/current?city=Moscow&country=RU" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/weather/current?city=Moscow&country=RU");
```

### GET /api/weather/forecast

Прогноз по городу

Параметры: city (обяз.), country=RU, unit=celsius, days=3

URL:
```
https://api.cerio.ru/api/weather/forecast?city=Moscow&country=RU&days=3
```

curl:
```
curl "https://api.cerio.ru/api/weather/forecast?city=Moscow&country=RU&days=3"
```

fetch:
```
fetch(`https://api.cerio.ru/api/weather/forecast?city=Moscow&country=RU&days=3`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/weather/forecast?city=Moscow&country=RU&days=3" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/weather/forecast?city=Moscow&country=RU&days=3");
```

### GET /api/weather

Полные данные (текущая + прогноз)

Параметры: city (обяз.), country=RU, unit=celsius, forecast=true, days=3

URL:
```
https://api.cerio.ru/api/weather?city=Moscow&country=RU
```

curl:
```
curl "https://api.cerio.ru/api/weather?city=Moscow&country=RU"
```

fetch:
```
fetch(`https://api.cerio.ru/api/weather?city=Moscow&country=RU`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/weather?city=Moscow&country=RU" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/weather?city=Moscow&country=RU");
```

### GET /api/weather/coordinates

Координаты города

Параметры: city (обяз.), country=RU

URL:
```
https://api.cerio.ru/api/weather/coordinates?city=Kazan&country=RU
```

curl:
```
curl "https://api.cerio.ru/api/weather/coordinates?city=Kazan&country=RU"
```

fetch:
```
fetch(`https://api.cerio.ru/api/weather/coordinates?city=Kazan&country=RU`).then(r => r.json()).then(console.log);
```

powershell:
```
Invoke-RestMethod -Uri "https://api.cerio.ru/api/weather/coordinates?city=Kazan&country=RU" -Method Get
```

csharp:
```
using var client = new HttpClient(); var json = await client.GetStringAsync("https://api.cerio.ru/api/weather/coordinates?city=Kazan&country=RU");
```

### POST /api/weather/mcp

MCP JSON-RPC: weather_current, weather_forecast, weather_coordinates, weather_full. Источник: Open-Meteo.

Параметры: jsonrpc,id,method,params

URL:
```
https://api.cerio.ru/api/weather/mcp
```

curl (tools/list):
```
curl -X POST "https://api.cerio.ru/api/weather/mcp" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
```

curl (tools/call weather_current):
```
curl -X POST "https://api.cerio.ru/api/weather/mcp" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"weather_current","arguments":{"city":"Москва","country":"RU","unit":"celsius"}}}'
```

curl (tools/call weather_forecast):
```
curl -X POST "https://api.cerio.ru/api/weather/mcp" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"weather_forecast","arguments":{"city":"London","country":"GB","unit":"celsius","days":5}}}'
```

JSON (tools/call weather_current):
```
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"weather_current","arguments":{"city":"Москва","country":"RU","unit":"celsius"}}}
```

LM Studio (mcp.json):
```
{"mcpServers":{"weather":{"url":"https://cerio.ru/api/weather/mcp"}}}
```

### GET /api/weather/mcp

Информация о MCP endpoint

Параметры: -

URL:
```
https://api.cerio.ru/api/weather/mcp
```

