وبسرویس ابزارهای لمورا
همهٔ ابزارهایی که هوش مصنوعی لمورا در چت استفاده میکند — ساخت پاورپوینت، Word، Excel و PDF، OCR، تبدیل صوت، حذف پسزمینه، نمودار، دادههای بازار و... — بهصورت API مستقیم هم در دسترس است. پردازش کامل روی سرورهای لمورا انجام میشود و هزینهٔ هر فراخوانی از کیف پول صاحب کلید کسر میشود.
Authorization: Bearer lsk-…
https://lemura.ir/wp-json/lemuraai/v1
https://lemura.ir/public/v1
یک کلید و یک کیف پول برای همه: هزینهٔ هر فراخوانی (مدلها، ابزارها، ویدیو) از کیف پول صاحب کلید کسر و در گزارش مصرف ثبت میشود. قواعد درخواست، متدها، موجودی و کدهای خطا در هر دو وبسرویس یکسان است.
شروع سریع
آدرس پایه: https://lemura.ir/public/v1 — احراز هویت با هدر Authorization: Bearer lsk-... — قیمتها برای پلن «رایگان»
# ساخت پاورپوینت
curl -X POST https://lemura.ir/public/v1/tools/pptx_generate \
-H "Authorization: Bearer lsk-YOUR_KEY" -H "Content-Type: application/json" \
-d '{"title":"گزارش فصلی","slides":[{"title":"خلاصه","bullets":["رشد ۲۰٪","۳ محصول جدید"]}]}'
# ارسال فایل (multipart): فیلد فایل همنام پارامتر ابزار است
curl -X POST "https://lemura.ir/public/v1/tools/ocr_image?wait=30" -H "Authorization: Bearer lsk-YOUR_KEY" \
-F file=@scan.jpg -F 'args={"languages":["fa","en"]}'
# کارهای طولانی job_id برمیگردانند (HTTP 202)
curl https://lemura.ir/public/v1/jobs/job_xxx -H "Authorization: Bearer lsk-YOUR_KEY"
{ ok, data, files[], error, meta } — فایلها با لینک دانلود موقتقواعد مشترک هر دو وبسرویس
احراز هویت
هر دو وبسرویس با یک کلید کار میکنند. کلید را در صفحهٔ «کلیدها و آمار» بسازید و در هدر هر درخواست بفرستید:
Authorization: Bearer lsk-YOUR_KEY
نحوهٔ درخواست
- بدنهٔ درخواستها JSON است با هدر
Content-Type: application/json. - ارسال فایل با
multipart/form-data(فیلد فایل؛ در ابزارها همنام پارامتر و آرگومانهای دیگر در فیلد args بهصورت JSON). - پاسخها همیشه JSON با کدگذاری UTF-8 است؛ مبالغ به تومان است.
- کارهای طولانی (ویدیو، OCR، تبدیل صوت و...) ناهمگام هستند: شناسهٔ کار برمیگردد و وضعیت را بعداً میپرسید.
متدها
| متد | کاربرد |
|---|---|
| GET | خواندن: فهرست مدلها/ابزارها، موجودی، وضعیت کار، دریافت فایل |
| POST | اجرا: چت، تولید تصویر/ویدیو، فراخوانی ابزار، آپلود فایل، ساخت وظیفه |
| DELETE | حذف: فایل، ویدیو، وظیفه |
موجودی کیف پول و اطلاعات حساب
موجودی و اطلاعات حساب از هر دو وبسرویس با پاسخ یکسان در دسترس است:
GET https://lemura.ir/wp-json/lemuraai/v1/balance GET https://lemura.ir/public/v1/balance GET https://lemura.ir/wp-json/lemuraai/v1/me GET https://lemura.ir/public/v1/me
curl https://lemura.ir/public/v1/balance -H "Authorization: Bearer lsk-YOUR_KEY"
{"object": "balance", "user_id": 42, "balance": 125000, "currency": "toman", ...}
کدهای خطا
| HTTP | معنی |
|---|---|
| 400 | ورودی نامعتبر |
| 401 | کلید ارسال نشده یا نامعتبر است |
| 402 | موجودی کیف پول کافی نیست |
| 403 | دسترسی به این مدل/ابزار مجاز نیست |
| 404 | مدل، ابزار یا کار پیدا نشد |
| 409 / 428 | کار هنوز آماده نیست / عملیات تغییردهنده نیاز به هدر X-Lemura-Confirm: true دارد |
| 429 | عبور از سقف تعداد درخواست یا سهمیهٔ روزانه (هدرهای X-RateLimit-*) |
| 5xx | خطای موقت سرور یا سرویس بالادستی — چند ثانیه بعد دوباره تلاش کنید |
صوت
audio_denoise
async
v1.0.0Reduce background noise in an audio file (noisereduce spectral gating); outputs WAV/MP3.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| file | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| strength | number | 0.1–1.0 | |
| stationary | boolean | Stationary noise (hum, fan) | |
| format | string wav | mp3 |
Output |
curl -X POST https://lemura.ir/public/v1/tools/audio_denoise -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"file": "f_0123456789abcdef01234567"}'
speech_to_text
async
v1.0.0Transcribe audio/video files to text with faster-whisper (Persian, English and 90+ languages), optional timestamps and SRT subtitles.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| file | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| language | string auto | fa | en | ar | tr | de | fr |
Language code or auto | |
| timestamps | boolean | Include segment timestamps | |
| srt | boolean | Also produce an .srt subtitle file | |
| translate | boolean | Translate to English instead of transcribing |
curl -X POST https://lemura.ir/public/v1/tools/speech_to_text -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"file": "f_0123456789abcdef01234567"}'
text_to_speech
v1.0.0Convert text to natural speech (MP3) with neural voices (Persian: Dilara/Farid, English and many more).
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| text | string | Text to speak (max 5000 chars) | |
| voice | string fa-IR-DilaraNeural | fa-IR-FaridNeural | en-US-JennyNeural | en-US-GuyNeural | en-GB-SoniaNeural | ar-SA-ZariyahNeural | tr-TR-EmelNeural | de-DE-KatjaNeural |
Voice | |
| rate | string | Speed like +10% or -20% | |
| pitch | string | Pitch like +5Hz |
curl -X POST https://lemura.ir/public/v1/tools/text_to_speech -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"text": "..."}'
کد
code_interpreter
v1.0.0Run Python 3.11 code in an isolated sandbox (no network) for calculations, data analysis and file conversion. pandas, numpy, matplotlib, plotly, openpyxl, python-docx, Pillow are available. Input files are in ./in, save outputs to ./out.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| code | string | Python code | |
| files | array | فایل |
curl -X POST https://lemura.ir/public/v1/tools/code_interpreter -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"code": "..."}'
تولید اسناد
docx_generate
v1.0.0Create a Word (.docx) document from content blocks (headings, paragraphs, lists, tables, images), or fill a .docx template (docxtpl) with a context.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| title | string | Document title | |
| rtl | boolean | Right-to-left (Persian) | |
| blocks | array | ||
| template | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| context | object | Template variables for docxtpl | |
| filename | string | Output file name |
curl -X POST https://lemura.ir/public/v1/tools/docx_generate -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{}'
pdf_generate
v1.0.0Render HTML or Markdown into a high-quality PDF (WeasyPrint) with full Persian/RTL support and the Vazirmatn font.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| html | string | HTML body | |
| markdown | string | Markdown text (used if html is empty) | |
| title | string | Document title | |
| rtl | boolean | Right-to-left | |
| page_size | string A4 | A5 | Letter | A3 |
Page size | |
| landscape | boolean | Landscape orientation | |
| css | string | Extra CSS | |
| filename | string | Output file name |
curl -X POST https://lemura.ir/public/v1/tools/pdf_generate -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{}'
pdf_tools
v1.0.0Manipulate PDFs: merge, split, extract pages, rotate, add text watermark, convert pages to images, images to PDF, compress, read metadata.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| action | string merge | split | extract_pages | rotate | watermark | to_images | images_to_pdf | compress | metadata |
Operation | |
| files | array | فایل | |
| pages | string | Page ranges like 1-3,5 | |
| angle | integer 90 | 180 | 270 |
Rotation angle | |
| text | string | Watermark text | |
| dpi | integer | Image DPI |
curl -X POST https://lemura.ir/public/v1/tools/pdf_tools -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"action": "merge", "files": ["f_0123456789abcdef01234567"]}'
pptx_generate
v1.0.0Create a PowerPoint (.pptx) presentation from structured slides. Supports Persian/RTL text, themes, notes and images.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| title | string | Presentation title | |
| subtitle | string | Subtitle | |
| theme | string purple | dark | light | blue | green |
Theme | |
| rtl | boolean | Right-to-left (Persian) layout | |
| slides | array | ||
| filename | string | Output file name |
curl -X POST https://lemura.ir/public/v1/tools/pptx_generate -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"slides": [{"title": "..."}], "title": "..."}'
qrcode_generate
v1.0.0Generate a QR code image (PNG or SVG) for a URL, text, Wi-Fi config or contact card, with custom colors and optional center logo.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| data | string | Content to encode | |
| size | integer | Box size in px | |
| fill_color | string | Foreground color | |
| back_color | string | Background color | |
| format | string png | svg |
Output format | |
| logo | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل |
curl -X POST https://lemura.ir/public/v1/tools/qrcode_generate -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"data": "..."}'
xlsx_generate
v1.0.0Create an Excel (.xlsx) workbook with one or more sheets, formulas, styled headers, auto-filter and optional native charts.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| sheets | array | ||
| rtl | boolean | Right-to-left sheets | |
| filename | string | Output file name |
curl -X POST https://lemura.ir/public/v1/tools/xlsx_generate -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"sheets": [{"name": "...", "rows": ["..."]}]}'
مالی
crypto_market
v1.0.0Live crypto market data from major exchanges (ccxt): ticker, OHLCV candles, order book, markets; optional technical indicators and candlestick chart.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| action | string ticker | ohlcv | orderbook | markets |
Data | |
| symbol | string | Pair like BTC/USDT | |
| exchange | string binance | kucoin | okx | bybit | kraken | coinbase | bitfinex | gateio | mexc |
Exchange | |
| timeframe | string 1m | 5m | 15m | 1h | 4h | 1d | 1w |
Candle timeframe | |
| limit | integer | Candles | |
| indicators | array | ||
| chart | boolean | Return a candlestick chart image |
curl -X POST https://lemura.ir/public/v1/tools/crypto_market -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"action": "ticker"}'
stock_market
v1.0.0Stock/ETF/index/forex data from Yahoo Finance (yfinance): price history, company info and technical indicators (pandas-ta) with an optional chart.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| symbol | string | Ticker like AAPL, ^GSPC, EURUSD=X, GC=F | |
| action | string history | info | indicators |
Data | |
| period | string 5d | 1mo | 3mo | 6mo | 1y | 2y | 5y | max |
Range | |
| interval | string 1h | 1d | 1wk | 1mo |
Interval | |
| indicators | array | ||
| chart | boolean | Return a chart image |
curl -X POST https://lemura.ir/public/v1/tools/stock_market -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"symbol": "..."}'
تصویر
image_edit
v1.0.0Edit images with a pipeline of operations: resize, crop, rotate, flip, grayscale, blur, sharpen, brightness, contrast, text watermark, format conversion, compression, thumbnail.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| file | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| ops | array | ||
| format | string png | jpeg | webp |
Output format | |
| quality | integer | JPEG/WebP quality |
curl -X POST https://lemura.ir/public/v1/tools/image_edit -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"file": "f_0123456789abcdef01234567"}'
remove_background
async
v1.0.0Remove the background of a photo (rembg / U²-Net); optionally replace it with a solid color.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| file | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| bg_color | string | Optional background color, e.g. #ffffff | |
| alpha_matting | boolean | Finer edges |
curl -X POST https://lemura.ir/public/v1/tools/remove_background -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"file": "f_0123456789abcdef01234567"}'
پردازش زبان
nlp_analyze
v1.0.0Detect language (fastText, 176 languages) and extract named entities, sentences and noun phrases (spaCy).
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| text | string | Text | |
| ops | array |
curl -X POST https://lemura.ir/public/v1/tools/nlp_analyze -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"text": "..."}'
persian_nlp
v1.0.0Persian text processing with hazm: normalization (spacing, characters, half-space), sentence/word tokenization, stemming, lemmatization.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| text | string | Persian text | |
| ops | array |
curl -X POST https://lemura.ir/public/v1/tools/persian_nlp -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"text": "..."}'
text_summarize
v1.0.0Extractive summarization (sumy: LSA/LexRank/TextRank/Luhn) and multilingual sentiment analysis (transformers).
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| text | string | Text | |
| file | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| task | string summarize | sentiment | both |
Task | |
| sentences | integer | Summary sentences | |
| method | string lsa | lexrank | textrank | luhn |
Algorithm | |
| language | string persian | english | auto |
Language |
curl -X POST https://lemura.ir/public/v1/tools/text_summarize -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{}'
پردازش فایل
archive_tools
v1.0.0List, extract or create ZIP / 7z archives (optionally password-protected).
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| action | string list | extract | create |
Operation | |
| file | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| files | array | فایل | |
| format | string zip | 7z |
Archive format for create | |
| password | string | Archive password | |
| name | string | Output archive name |
curl -X POST https://lemura.ir/public/v1/tools/archive_tools -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"action": "list"}'
html_extract
v1.0.0Fetch a public web page (or take raw HTML/file) and extract its main readable content as text/markdown with metadata (trafilatura).
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| url | string | Public https URL | |
| html | string | Raw HTML instead of URL | |
| file | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| output | string text | markdown | json |
Output format | |
| include_links | boolean | Keep links |
curl -X POST https://lemura.ir/public/v1/tools/html_extract -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{}'
ocr_image
async
v1.0.0Extract text from images or scanned PDFs with EasyOCR (Persian + English by default).
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| file | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| languages | array | ||
| detail | boolean | Return boxes and confidence | |
| max_pages | integer | Max PDF pages |
curl -X POST https://lemura.ir/public/v1/tools/ocr_image -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"file": "f_0123456789abcdef01234567"}'
pdf_extract
async
v1.0.0Extract text and tables from a digital PDF (pdfplumber), page by page.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| file | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| pages | string | Page ranges like 1-3,5 | |
| tables | boolean | Also extract tables | |
| max_chars | integer | Max characters returned |
curl -X POST https://lemura.ir/public/v1/tools/pdf_extract -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"file": "f_0123456789abcdef01234567"}'
پایگاه دانش (RAG)
knowledge_index
async
v1.0.0Index files, web pages or text into the user's private knowledge base (langchain splitter + chromadb) so it can be searched in chat.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| collection | string | Knowledge base name | |
| files | array | فایل | |
| urls | array | ||
| text | string | Raw text to index | |
| replace | boolean | Replace the collection first |
curl -X POST https://lemura.ir/public/v1/tools/knowledge_index -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"collection": "..."}'
knowledge_search
v1.0.0Semantic search over the user's knowledge base; returns the most relevant passages with sources (chat with your data).
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| collection | string | Knowledge base name (empty = all) | |
| query | string | Question or search phrase | |
| k | integer | Results |
curl -X POST https://lemura.ir/public/v1/tools/knowledge_search -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"query": "..."}'
ویدیو و انیمیشن
animation_code
async
v1.1.0Render a fully custom animation from a Remotion React component (TSX). The code must `export default` a React component; it may import from 'react', 'remotion' (AbsoluteFill, Sequence, Series, useCurrentFrame, useVideoConfig, interpolate, spring, Easing, Img, Audio, staticFile), '@remotion/transitions' (+ /fade /slide /wipe /flip), '@remotion/shapes', '@remotion/paths', '@remotion/noise'. Use the 'Vazirmatn' font for Persian. Input files are available via staticFile('in/<file name>') or by passing their ids in props. No network inside the renderer (no remote URLs). Max 60 s (30 s at 1080p). Queued like animation_render.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| code | string | TSX source of the component (export default) | |
| duration_sec | number | ||
| aspect | string 16:9 | 9:16 | 1:1 | 4:5 |
Aspect ratio | |
| quality | string 480p | 720p | 1080p |
Resolution (short side) | |
| fps | integer 24 | 25 | 30 |
Frames per second | |
| format | string mp4 | webm | gif |
Output format | |
| props | object | Props passed to the component (file ids f_xxx/att_N become staticFile paths) | |
| files | array | فایل | |
| title | string | File name |
curl -X POST https://lemura.ir/public/v1/tools/animation_code -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"code": "..."}'
animation_render
async
v1.1.0Render an animated video (MP4/WebM/GIF) from scenes: title, text (word-by-word), bullets, image (Ken Burns), quote, stat (animated counter), chart (animated bars), steps, split (image+text), cta — with transitions (fade/slide/wipe/flip), theme, logo, background music and watermark. Persian RTL with the Vazirmatn font by default. Aspect 16:9, 9:16 (stories/reels), 1:1 or 4:5. Max 20 scenes; total length max 30 s at 1080p, 60 s at 720p (default), 120 s at 480p. Rendering is queued (one render at a time) and returns a job_id; the user is notified.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| title | string | Video title (also the file name) | |
| scenes | array | ||
| aspect | string 16:9 | 9:16 | 1:1 | 4:5 |
Aspect ratio | |
| quality | string 480p | 720p | 1080p |
Resolution (short side) | |
| fps | integer 24 | 25 | 30 |
Frames per second | |
| format | string mp4 | webm | gif |
Output format | |
| theme | object | ||
| rtl | boolean | Right-to-left (Persian) layout | |
| logo | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| music | string | File id: f_xxx (uploaded/generated file) or att_N (chat attachment) فایل | |
| music_volume | number | ||
| watermark | string | Small corner text |
curl -X POST https://lemura.ir/public/v1/tools/animation_render -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"aspect": "9:16", "scenes": [{"duration": 3, "subtitle": "\u062f\u0633\u062a\u06cc\u0627\u0631 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0641\u0627\u0631\u0633\u06cc", "title": "\u0644\u0645\u0648\u0631\u0627", "type": "title"}, {"items": ["\u06af\u0641\u062a\u06af\u0648 \u0628\u0627 \u0628\u0647\u062a\u0631\u06cc\u0646 \u0645\u062f\u0644\u200c\u0647\u0627", "\u0633\u0627\u062e\u062a \u062a\u0635\u0648\u06cc\u0631 \u0648 \u0648\u06cc\u062f\u06cc\u0648", "\u0648\u0628\u200c\u0633\u0631\u0648\u06cc\u0633 API"], "title": "\u0627\u0645\u06a9\u0627\u0646\u0627\u062a", "transition": "slide", "type": "bullets"}, {"suffix": "%", "title": "\u0631\u0636\u0627\u06cc\u062a \u06a9\u0627\u0631\u0628\u0631\u0627\u0646", "type": "stat", "value": 98}, {"button": "lemura.ir", "title": "\u0647\u0645\u06cc\u0646 \u062d\u0627\u0644\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f", "transition": "wipe", "type": "cta"}], "title": "\u0645\u0639\u0631\u0641\u06cc \u0644\u0645\u0648\u0631\u0627"}'
مصورسازی و داده
chart_generate
v1.0.0Create a chart (bar, line, pie, scatter, area, histogram, heatmap, funnel) as PNG/SVG image or interactive HTML with Persian font support.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| type | string bar | line | pie | scatter | area | histogram | heatmap | funnel |
Chart type | |
| title | string | Title | |
| data | object | ||
| x_title | string | X axis title | |
| y_title | string | Y axis title | |
| format | string png | svg | html |
Output | |
| width | integer | px | |
| height | integer | px | |
| theme | string dark | light |
Theme |
curl -X POST https://lemura.ir/public/v1/tools/chart_generate -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"data": {"series": [{"values": ["..."]}]}, "type": "bar"}'
fake_data
v1.0.0Generate realistic fake datasets (Persian or English locales) for testing: people, contacts, addresses, companies, dates, numbers, text.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| locale | string fa_IR | en_US | de_DE | ar_SA | tr_TR |
Locale | |
| rows | integer | Row count | |
| fields | array | faker providers: name, email, phone_number, address, company, job, date, city, text, iban, credit_card_number, uuid4, random_int, ... | |
| format | string json | csv | xlsx |
Output |
curl -X POST https://lemura.ir/public/v1/tools/fake_data -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"fields": ["..."]}'
وب
browser_render
async
v1.0.0Open a public web page in a real headless Chromium (JavaScript-heavy sites) and return its rendered text, HTML, a screenshot or a PDF.
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| url | string | Public https URL | |
| action | string text | html | screenshot | pdf |
What to return | |
| full_page | boolean | Full-page screenshot | |
| wait_ms | integer | Extra wait after load | |
| selector | string | Optional CSS selector to wait for / extract | |
| width | integer | Viewport width |
curl -X POST https://lemura.ir/public/v1/tools/browser_render -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"url": "..."}'
web_scrape
v1.0.0Fetch a public web page over a safe proxy and extract text, links, tables, metadata or CSS-selector fields (httpx + BeautifulSoup).
پارامترها، نمونه و محدودیتها
| پارامتر | نوع | الزامی | توضیح |
|---|---|---|---|
| url | string | Public https URL | |
| extract | string text | links | tables | meta | all |
What to extract | |
| selectors | object | name -> CSS selector | |
| max_chars | integer | Max characters |
curl -X POST https://lemura.ir/public/v1/tools/web_scrape -H "Authorization: Bearer lsk-YOUR_KEY" \
-H "Content-Type: application/json" -d '{"url": "..."}'
API مدیریت وظایف و اعلان
GET https://lemura.ir/public/v1/tasks # list
POST https://lemura.ir/public/v1/tasks # {"name","tool_id","payload","trigger":{"type":"cron","expr":"0 8 * * *"},"post_action":{"channels":["email"]}}
POST https://lemura.ir/public/v1/tasks/<id>/approve # confirm the exact payload + schedule
POST https://lemura.ir/public/v1/tasks/<id>/run | pause | activate
DELETE https://lemura.ir/public/v1/tasks/<id>
POST https://lemura.ir/public/v1/notifications # {"title","body","channels":["inapp","push","email","sms"]}