وثائق API
ادمج خدمات تحويل الكتب الإلكترونية من E-Ink في تطبيقاتك
استخدم مع وكلاء الذكاء الاصطناعي — بدون إعداد
انسخ الأمر أدناه والصقه في Cursor أو Claude Code أو Codex أو أي وكيل ذكاء اصطناعي للتثبيت تلقائيًا.
ثبّت مهارة E-Ink: شغّل npx e-ink-skill، ثم اضبط متغير البيئة EINK_API_KEY على مفتاح API الخاص بي.متوافق مع Cursor وClaude Code وWindsurf وCodex والمزيد.
طرق تثبيت أخرىالبدء
لاستخدام API الخاص بـ E-Ink، تحتاج إلى مفتاح API. أنشئ واحدًا من لوحة التحكم ثم أضفه في رأس Authorization لطلباتك.
المصادقة
يجب أن تتضمن جميع طلبات API مفتاح API في رأس Authorization:
Authorization: Bearer eink_your_api_key_hereBase URL
https://e-ink.me/api/v1نظام الرصيد
تستهلك استدعاءات API رصيدًا من حسابك، مثل واجهة الويب.
| API | تكلفة الرصيد |
|---|---|
| صفحة ويب إلى كتاب إلكتروني | 3(لكل رابط) |
| تحويل تنسيق الملفات | 2 / 5(PDF OCR: 5) |
| ترجمة الكتب الإلكترونية | 3(لكل ملف) |
| تحويل النص إلى كلام | 5(لكل ملف) |
| إنشاء خريطة ذهنية | 2 / 5(AI: 5) |
نقاط نهاية API
/api/v1/creditsالتحقق من رصيد النقاط
يُرجع رصيد النقاط الحالي.
curl https://e-ink.me/api/v1/credits \
-H "Authorization: Bearer eink_your_api_key"{
"credits": 150
}/api/v1/convert/webpageصفحة ويب إلى كتاب إلكتروني
تحويل صفحة ويب واحدة أو أكثر إلى تنسيق EPUB أو PDF أو Markdown.
curl -X POST https://e-ink.me/api/v1/convert/webpage \
-H "Authorization: Bearer eink_your_api_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://e-ink.me", "format": "epub"}' \
-o article.epub/api/v1/convertتحويل تنسيق الملفات
تحويل الملفات بين EPUB وPDF وMarkdown وHTML وDOCX وTXT والمزيد.
curl -X POST https://e-ink.me/api/v1/convert \
-H "Authorization: Bearer eink_your_api_key" \
-F "file=@book.epub" \
-F "converter=epub-to-pdf" \
-o book.pdf/api/v1/convert/translateترجمة الكتب الإلكترونية
ترجمة ملف EPUB إلى لغة أخرى.
curl -X POST https://e-ink.me/api/v1/convert/translate \
-H "Authorization: Bearer eink_your_api_key" \
-F "file=@book.epub" \
-F "targetLanguage=Chinese" \
-F "sourceLanguage=auto" \
-o book-translated.epub/api/v1/convert/ttsتحويل النص إلى كلام
تحويل النص إلى صوت (تنسيق MP3).
curl -X POST https://e-ink.me/api/v1/convert/tts \
-H "Authorization: Bearer eink_your_api_key" \
-H "Content-Type: application/json" \
-d '{"input": "Hello, this is a test.", "voice": "en-US-JennyNeural"}' \
-o speech.mp3/api/v1/convert/mindmapإنشاء خريطة ذهنية
إنشاء خريطة ذهنية من ملف EPUB أو PDF.
curl -X POST https://e-ink.me/api/v1/convert/mindmap \
-H "Authorization: Bearer eink_your_api_key" \
-F "file=@book.epub" \
-F "mode=structure" \
-F "format=freemind"{
"tree": { "label": "Book Title", "children": [...] },
"stats": { "nodeCount": 42, "maxDepth": 4 },
"files": {
"freemind": "<map>...</map>",
"opml": "<?xml ...?>...",
"markdown": "# Book Title\n## Chapter 1\n..."
}
}رموز الخطأ
| Code | Description |
|---|---|
| 400 | Bad Request — معاملات غير صالحة |
| 401 | Unauthorized — مفتاح API مفقود أو غير صالح |
| 402 | Payment Required — رصيد غير كافٍ |
| 413 | Payload Too Large — الملف يتجاوز حد الحجم |
| 500 | Internal Server Error — حدث خطأ في الخادم |
AI Agent Skill
استخدم E-Ink مباشرة في Cursor وClaude Code وCodex وأدوات البرمجة الأخرى بالذكاء الاصطناعي.
التثبيت
أخبر وكيل الذكاء الاصطناعي
موصى بهانسخ هذا الأمر والصقه في محادثة وكيل الذكاء الاصطناعي. سيتولى التثبيت نيابة عنك.
ثبّت مهارة E-Ink: شغّل npx e-ink-skill، ثم اضبط متغير البيئة EINK_API_KEY على مفتاح API الخاص بي.تشغيل npx يدويًا
npx e-ink-skillاستنساخ من GitHub
# Cursor
git clone https://github.com/Selenium39/e-ink-skill.git ~/.cursor/skills/e-ink-skill
# Claude Code / Codex
git clone https://github.com/Selenium39/e-ink-skill.git ~/.claude/skills/e-ink-skillتعيين مفتاح API كمتغير بيئة:
export EINK_API_KEY="eink_your_api_key_here"المهارة متاحة الآن في وكيل الذكاء الاصطناعي. جرب أن تسأل: