انتقل إلى المحتوى
Keyloom API وMCP: يمكن الآن لـ Claude وChatGPT إضافة العناصر إلى الكومب في After Effects. شاهد كيف
Keyloom
API وMCP

توثيق الـ API

اربط مساعدًا ذكيًا عبر MCP، أو استدعِ الـ REST API من سكربتاتك. كلاهما يبحث في مكتبة Keyloom ويعمل في After Effects عبر لوحة Keyloom.

REST base URL
https://keyloom.art/api/v1
MCP endpoint
https://keyloom.art/mcp

المصادقة

مفاتيح API ضمن Premium. أنشئ مفتاحًا من لوحة التحكم (API و MCP) أو من الإضافة (الإعدادات › المساعدات الذكية). يظهر المفتاح مرة واحدة: احفظه سرًّا، واحذفه متى شئت لقطع الاتصال.

أرسل المفتاح في ترويسة Authorization:

Authorization: Bearer 12|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

التطبيقات التي تقبل رابطًا فقط (موصِّلات claude.ai و ChatGPT) تضع المفتاح داخل العنوان:

https://keyloom.art/mcp/12%7Cxxxxxxxxxxxxxxxx

كل طلب يعمل باسم حسابك: العناصر التي تضعها تُحتسب كتطبيق عادي، فيُدفع للمبدعين.

خادم MCP

يتحدث Keyloom بروتوكول Model Context Protocol عبر HTTP (JSON-RPC 2.0، POST). الطرق المدعومة: initialize و ping و tools/list و tools/call و resources/list و resources/read.

Claude Desktop · Claude Code · Cursor · VS Code

{
  "mcpServers": {
    "keyloom": {
      "url": "https://keyloom.art/mcp",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}

claude.ai · ChatGPT

أضف موصِّلًا مخصصًا والصق العنوان مع مفتاحك: https://keyloom.art/mcp/YOUR_KEY

استدعاء مباشر

curl https://keyloom.art/mcp \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"search_library","arguments":{"query":"rocket","limit":4}}}'

أدوات MCP

ما يستطيع مساعدك استدعاءه. الأوصاف هي نفسها التي يقرؤها المساعد.

search_library Search the Keyloom motion library read-only

Search Keyloom's library of animated After Effects elements (icons, shape elements, backgrounds, transitions, scenes — all delivered as precomps). Keyword search over English, French and Arabic keywords: use short concrete words ("rocket", "loading spinner", "liquid transition"), not long sentences. If nothing is found, try synonyms or a broader word, or drop filters. Returns items with an `id` you pass to add_to_after_effects or get_item. Show the user a few good matches (title, duration, Premium or free, thumbnail link) before adding many items.

ParameterTypeDescription
query string What to look for, a few keywords. Empty = browse.
category icons | logos | shape-elements | backgrounds | transitions | scenes | lower-thirds | social-media | infographics | overl... Category slug (see list_categories).
premium boolean true = Premium items only, false = free items only.
color red | orange | yellow | green | teal | blue | purple | pink | black | white | gray Main color family.
style flat | line | gradient | 3d-look | hand-drawn | glitch | minimal | corporate | playful | neon
duration short | medium | long short ≤ 5 s, medium 5–10 s, long > 10 s.
aspect landscape | square | portrait Shape of the item's comp.
collection string Curated collection slug (see list_collections).
sort relevant | new | popular | rating Default: relevant with a query, popular without.
limit integer Items per page, default 10.
page integer
get_item Get one library item read-only

Full details of one item: description, tags, colors, the names of its controls (Color, Size… effects the user can change in After Effects), size, duration, fps, preview video.

ParameterTypeDescription
id* string Item id from search_library.
list_categories List categories read-only

The library's categories with their kind (icon, element, background, transition, scene). Use a slug as `category` in search_library.

list_collections List curated collections read-only

Hand-picked sets that look good together (same style). Use a slug as `collection` in search_library when the user wants a consistent look.

after_effects_status Is After Effects ready? read-only

Whether the Keyloom panel is open in the user's After Effects, and what is open there: project, active comp (name, size, fps, duration, playhead time in seconds). Call it before adding items, to pick items that fit the comp (a 1080×1920 comp needs portrait backgrounds) and to choose times.

add_to_after_effects Add an item to After Effects acts in After Effects

Places one library item into the active comp in the user's After Effects, through the Keyloom panel (it must be open: check after_effects_status). Like clicking Apply in the panel: icons, elements and scenes start at the playhead (or `at_time`); backgrounds go to the bottom, scaled to cover and looped; transitions align to the nearest cut. With no comp open, a comp matching the item is created. One undo step in After Effects. Call it once per item; for a sequence, give each item its own `at_time`. Waits up to about 20 seconds for the result; if the answer is still "pending" (a large download), check later with get_job.

ParameterTypeDescription
id* string Item id from search_library.
at_time number Seconds in the active comp where the item starts. Default: the playhead.
use_after_effects_tool Use a Keyloom tool in After Effects acts in After Effects

Runs one of the Keyloom panel's animation tools in the user's After Effects, on what is SELECTED there (layers, properties or keyframes) in the active comp. You cannot select things yourself: ask the user to select first, or pass options.allLayers = true for tools that work on layers. One undo step in After Effects. Good after add_to_after_effects, which leaves the new layer selected (e.g. align it, ease it, add overshoot). Tools and their options: ease (preset: linear | ease | smooth | strong | snap (fast start, soft landing) | slowStart | hold | custom | curve; in: custom only: incoming influence %, 0.1–100; out: custom only: outgoing influence %, 0.1–100; x1: curve only: CSS cubic-bezier x1 (0–1); y1: curve only: y1 (may be < 0 or > 1 for anticipation / overshoot); x2: curve only: x2 (0–1); y2: curve only: y2) · ease-copy (action: copy (from the first selected keyframes) | paste (onto...

ParameterTypeDescription
tool* ease | ease-copy | stagger | layer-create | layer-shift | trim-to-keys | bake | animate | loop-precomp | trim-paths | ec...
options object Options of that tool (see the list above). Leave out for the defaults.
get_job Check an item sent to After Effects read-only

Status of an item sent with add_to_after_effects: pending (waiting for the panel), sent (After Effects is placing it), done, failed (with the reason), expired (the panel was closed).

ParameterTypeDescription
job_id* string

REST API

JSON للداخل والخارج. نقاط البحث عامة؛ ونقاط After Effects تحتاج مفتاحك.

MethodPathWhatParametersKey
GET /api/v1/assets ابحث في المكتبة q, category, premium, color, style, duration, aspect, resolution, collection, sort, page, keyword —
GET /api/v1/assets/{id} عنصر واحد: الوصف والوسوم وعناصر التحكم وفيديو المعاينة — —
GET /api/v1/categories الفئات (المعرّف، الاسم، النوع) — —
GET /api/v1/tools أدوات الإضافة وما يحتاج منها Premium — —
GET /api/v1/ae/status هل اللوحة مفتوحة، وأي كومب نشط — 🔑
POST /api/v1/ae/send ضع عنصرًا في الكومب النشط item, at_time, wait 🔑
POST /api/v1/ae/tool شغّل أداة على المحدد في After Effects tool, options, wait 🔑
GET /api/v1/ae/jobs/{job_id} نتيجة عنصر أو أداة أُرسلت — 🔑

بحث

category = slug from /categories · duration = short | medium | long · aspect = landscape | square | portrait · resolution = hd | 4k · sort = relevant | new | popular | rating · keyword=1 = keyword search only

curl "https://keyloom.art/api/v1/assets?q=rocket&category=icons&sort=popular"

{ "data": [ { "uuid": "…", "title": "Rocket launch", "category": "icons", "type": "icon",
             "is_premium": true, "width": 1080, "height": 1080, "duration_frames": 90, "fps": 30,
             "thumb_url": "…", "preview_sm_url": "…" } ],
  "meta": { "current_page": 1, "last_page": 3 },
  "search": { "mode": "keyword", "corrected": null } }

ضع عنصرًا في After Effects

curl -X POST https://keyloom.art/api/v1/ae/send \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"item":"ITEM_UUID","at_time":2,"wait":true}'

{ "data": { "job_id": "…", "status": "done", "item": { "id": "…", "title": "Rocket launch" },
            "result": { "comp": "Main", "layer": "Rocket launch" } } }

شغّل أداة

تعمل الأدوات على المحدد في After Effects. القائمة الكاملة وما تفعله كل أداة في صفحة الأدوات. /tools

curl -X POST https://keyloom.art/api/v1/ae/tool \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"tool":"align","options":{"edge":"center","to":"comp"},"wait":true}'

tool = ease · ease-copy · stagger · layer-create · layer-shift · trim-to-keys · bake · animate · loop-precomp · trim-paths · echo · fit-comp · comp-duration · precompose-each · key-clean · reverse-keys · wiggle · loop · overshoot · bounce · spin · control-null · parent-chain · anchor · align · distribute · flip · rename · reverse-order · crop-comp · cleanup · color

المهام

إرسال عنصر أو أداة ينشئ مهمة. تلتقطها لوحة Keyloom خلال ثوانٍ، وتنفّذها في After Effects وتُبلغ بالنتيجة. مع wait=true ينتظر الرد النتيجة حتى 20 ثانية.

  1. pending

    في انتظار اللوحة

  2. sent

    After Effects يعمل عليها

  3. done

    انتهى: انظر النتيجة

  4. failed

    انظر الرسالة

  5. expired

    اللوحة أُغلقت

الأخطاء والحدود

تعود الأخطاء بصيغة JSON مع رسالة للناس وسبب للكود:

{ "message": "The Keyloom panel is not open in After Effects…", "reason": "panel_closed" }
401invalid_keyالمفتاح خاطئ أو منتهٍ أو محذوف.
403premium_requiredمفاتيح API تحتاج اشتراك Premium فعّالًا.
404not_foundلا يوجد عنصر أو أداة أو مهمة بهذا المعرّف.
409panel_closed · panel_outdatedافتح After Effects ولوحة Keyloom مسجّلة الدخول، بأحدث إصدار.
422—معامل ناقص أو غير صالح.
429rate_limitedطلبات كثيرة: انتظر بضع ثوانٍ.
503assistants_offالـ API و MCP متوقفان للصيانة.
  • حتى 30 عناصر أو أدوات تُرسل إلى After Effects في الدقيقة.
  • كل إجراء خطوة تراجع واحدة في After Effects.

مونتاجك القادم، أسرع إنجازًا.

ابدأ مجانًا بالإضافة. واشترك في بريميوم للمكتبة كاملة والبحث بالذكاء الاصطناعي وAPI وMCP.

  • أضِف بنقرة واحدة داخل After Effects
  • العربية والإنجليزية والفرنسية
  • ألغِ متى شئت