تخطَّ إلى المحتوى
LunarClips

للمطورين

توثيق API وMCP

أنشئ الفيديوهات وعدّلها وجدولها من شيفرتك الخاصة، أو دع Claude وCursor يتوليان ذلك عنك. مفتاح API واحد يعمل مع واجهة REST وخادم MCP معًا.

العنوان الأساسيhttps://clips.lnr.ae/api/v1

في هذه الصفحة

نظرة عامة

يوفّر Clips واجهة REST لبرامجك وخوادمك، وخادم MCP لأدوات الذكاء الاصطناعي مثل Claude وCursor. كلاهما يعمل داخل مساحة عمل واحدة، هي التي ينتمي إليها مفتاح API، ويتشاركان خطتها ورصيدها وحساباتها المرتبطة.

واجهة REST
https://clips.lnr.ae/api/v1
خادم MCP
https://clips.lnr.ae/api/mcp

ما يمكنك فعله

البدء السريع

  1. أنشئ مفتاحًا

    في Clips، افتح الإعدادات، API وMCP وأنشئ مفتاحًا. انسخه فورًا، فهو لا يظهر إلا مرة واحدة. الوصول إلى الواجهة متاح في كل الخطط المدفوعة.

  2. أرسل طلبك الأول

    اطلب بيانات مساحة عملك. إذا كان المفتاح يعمل، ستصلك باسمها وخطتها.

    curl https://clips.lnr.ae/api/v1/workspace \
      -H "Authorization: Bearer YOUR_API_KEY"
  3. ابدأ البناء

    أنشئ مشروعًا أو اصنع فيديو أو جدول منشورًا. كل نقاط الواجهة موجودة في مرجع الواجهة أدناه، مع مثال جاهز للنسخ.

المصادقة والصلاحيات

أرسل المفتاح في ترويسة Authorization مع كل طلب، على هيئة رمز Bearer. تبدأ المفاتيح بـ clp_live_.

Authorization: Bearer YOUR_API_KEY

الصلاحيات

كل مفتاح إما للقراءة فقط، أو للقراءة والكتابة، أو (إذا أنشأه مالك مساحة العمل) للقراءة والكتابة والموافقة. توضح كل نقطة نهاية وكل أداة الصلاحية التي تحتاجها.

الصلاحيةما تتيحه
قراءةقراءة مساحة عملك: المشاريع والقوالب والمنشورات والحسابات والنتائج.
كتابةإجراء التغييرات: إنشاء المشاريع وتعديلها، وصنع الفيديوهات، وجدولة المنشورات. وتشمل القراءة.
موافقةالموافقة على المنشورات التي تنتظر مراجعة المالك. لا يُنشئ هذا المفتاح إلا المالك، ويتوقف عن الموافقة إذا لم يعد صاحبه هو المالك. يشمل القراءة والكتابة.

لا تتضمن الخطة المجانية الوصول إلى الواجهة. تتلقى مفاتيحها الرمز plan_required (HTTP 402) حتى تُرقّى مساحة العمل.

تعامل مع المفتاح كما تتعامل مع كلمة المرور. احفظه على خادمك أو في إعدادات أداة الذكاء الاصطناعي، ولا تضعه أبدًا في صفحة ويب أو مستودع عام. ألغِ المفتاح من الإعدادات فور شكّك في تسرّبه.

ربط أدوات الذكاء الاصطناعي

يتيح خادم MCP لأداة الذكاء الاصطناعي أن تستخدم Clips نيابةً عنك: تقرأ مساحة عملك وتصنع الفيديوهات وتجدول المنشورات حين تطلب ذلك. استبدل YOUR_API_KEY بمفتاحك.

Claude Code

شغّل هذا الأمر مرة واحدة في الطرفية، وبعدها يستطيع Claude Code استخدام Clips في كل مشاريعك.

claude mcp add --transport http clips https://clips.lnr.ae/api/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Claude Desktop

في Claude Desktop افتح Settings ثم Developer ثم Edit config، وأضف هذا إلى claude_desktop_config.json ثم أعد تشغيل Claude. يتصل Claude Desktop بالخادم عبر mcp-remote، لذا يحتاج إلى تثبيت Node.js.

{
  "mcpServers": {
    "clips": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://clips.lnr.ae/api/mcp",
        "--header",
        "Authorization:${CLIPS_AUTH}"
      ],
      "env": {
        "CLIPS_AUTH": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Cursor

أضف هذا إلى ~/.cursor/mcp.json ليشمل كل المشاريع، أو إلى .cursor/mcp.json داخل مشروع واحد. يلتقطه Cursor دون إعادة تشغيل.

{
  "mcpServers": {
    "clips": {
      "url": "https://clips.lnr.ae/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

عملاء MCP الآخرون

يمكن لأي عميل يدعم MCP عبر Streamable HTTP الاتصال. أعطه عنوان الخادم وأرسل المفتاح على هيئة رمز Bearer.

URL:    https://clips.lnr.ae/api/mcp
Header: Authorization: Bearer YOUR_API_KEY

أدوات MCP

في خادم MCP 59 أداة. تختار أداة الذكاء الاصطناعي الأداة المناسبة مما تطلبه، فنادرًا ما تحتاج إلى تسميتها بنفسك.

  • get_workspaceقراءة

    Get workspace. Get the Clips workspace this key belongs to: its name, plan, the kinds of video it makes, the platforms it posts to and how many projects it has.

  • list_templatesقراءة

    List templates. List the video templates a project can use.

  • list_projectsقراءة

    List projects. List the workspace's video projects, newest first, without their props.

  • get_projectقراءة

    Get project. Get one video project by id, including its template and full props (the text, numbers and colours in the video).

  • create_projectكتابة

    Create project. Create a video project in the workspace.

  • update_projectكتابة

    Update project. Change a project's title, its props, or both.

  • list_connected_accountsقراءة

    List connected accounts. List the Instagram, TikTok and LinkedIn accounts connected to this workspace: id, platform, handle, how posts are delivered (direct = Clips posts it; tiktok_inbox = the creator taps Post in TikTok; manual = the person posts it themselves; browser = a Lunar-owned TikTok account Clips posts to from its logged-in session, temporary), timezone and the next free posting slots.

  • schedule_postتستأذن أولًاكتابة

    Schedule a post. Schedule a finished MP4 to connected accounts, with a caption per platform.

  • publish_nowتستأذن أولًاكتابة

    Publish now. Post a finished MP4 to connected accounts right away: Clips sends it within about a minute.

  • list_postsقراءة

    List posts. List the workspace's posts, newest scheduled first, optionally filtered by account, platform, scheduled time range (from/to) and status: ready (waiting for approval), scheduled, publishing, awaiting_creator (waiting for the person to post, e.g. in their TikTok inbox), published, failed or cancelled.

  • get_postقراءة

    Get post. Get one post: its status, scheduled and published times, the link on the platform once it's live, and why it failed if it did.

  • cancel_postتستأذن أولًاكتابة

    Cancel post. Cancel a post that hasn't gone out yet (waiting for approval, scheduled, failed, or waiting for the person).

  • get_post_metricsقراءة

    Get post metrics. Get a published post's numbers as collected from the platform about 1, 3 and 7 days after posting.

  • update_postتستأذن أولًاكتابة

    Update post. Reschedule a post that hasn't gone out yet (waiting for approval, approved or scheduled), change its caption and hashtags, or both.

  • retry_postتستأذن أولًاكتابة

    Retry failed post. Send a failed post again: it goes out about 3 minutes later.

  • get_calendarقراءة

    Get calendar. List the posts on the calendar between two dates (inclusive, at most 92 days), placed by scheduled time (or published time) in the workspace's timezone: the first connected account's, as on the Calendar page, unless you pass one.

  • get_accountقراءة

    Get account. Get one connected account: platform, handle, status (connected, needs_reauth or disconnected), how posts reach it, its timezone, its weekly posting times and its next free slots.

  • set_posting_timesتستأذن أولًاكتابة

    Set posting times. Replace an account's weekly posting times: the slots "next_free_slot" fills.

  • duplicate_postتستأذن أولًاكتابة

    Duplicate post. Schedule an existing post's video again: to other connected accounts, or at a new time.

  • approve_postتستأذن أولًاموافقة

    Approve post. Approve a post that is waiting for the owner's review (status ready), which schedules it for its time.

  • generate_videoكتابة

    Generate video with AI. Have Clips' AI director make a finished animated vertical video and save it as a project: it writes the script, records a voiceover, designs motion-graphics scenes in the workspace's brand, and adds music and captions.

  • start_video_generationكتابة

    Start an AI video. Start Clips' AI director on a video and return at once with its sessionId, instead of waiting like generate_video.

  • get_video_sessionقراءة

    Get video session. Check on an AI video started with generate_video, start_video_generation or revise_video.

  • revise_videoكتابة

    Revise video with AI. Change a video the AI director made, by plain instruction: 'make the hook shorter', 'use an Arabic voice', 'swap scene 2 for a stat about churn'.

  • list_voicesقراءة

    List voices. List the narrators a video can use (pass an id as voiceId to revise_video) with gender, accent, age, language and a sample link, plus the languages a video can be written and voiced in.

  • list_video_modelsقراءة

    List video models. List the AI models the director can run on (pass an id as modelId to revise_video), with each one's tier and the credits a new video costs on it.

  • list_filmsقراءة

    List product films. List the workspace's product films, newest first, with status and a download link for finished ones.

  • create_filmكتابة

    Create product film. Make a cinematic product film of a real SaaS or app: Clips captures the product's public link and/or uses library screenshots, writes the film in the chosen style and renders it.

  • get_filmقراءة

    Get product film. Check a product film: status (writing, queued, rendering, replan, succeeded, failed), what it is doing now, and a download link that works for 15 minutes once it has succeeded.

  • generate_footageكتابة

    Generate AI footage. Film a realistic AI video clip (b-roll) from a prompt and save it to the library.

  • get_footageقراءة

    Get AI footage. Check an AI clip: status (running, succeeded, failed), its library storagePath and a download link that works for 15 minutes once it has succeeded.

  • list_footageقراءة

    List AI footage. List the workspace's AI clips, stills and 4K upscales, newest first, with status, credits used and download links for finished ones.

  • upscale_footageكتابة

    Upscale AI footage to 4K. Upscale a finished AI clip to 4K (Growth and Scale plans).

  • render_projectكتابة

    Render project to MP4. Render a template project (stat-reveal or problem-solution) to an MP4 on the Clips server, the same video the editor's export makes.

  • list_videosقراءة

    List finished videos. List the workspace's finished MP4 videos, newest first: each with its id, title, whether it was uploaded or rendered by Clips, and its storagePath.

  • get_videoقراءة

    Get video. Get one finished video by id, with a download link that works for 15 minutes (downloadUrl, null if it hasn't finished rendering).

  • list_libraryقراءة

    List library files. List files in the workspace's media library (uploads and AI-made footage), newest first, plus the library's folders.

  • create_upload_urlكتابة

    Create upload URL. Get a signed URL to upload your own file (an MP4, image, audio file or PDF, up to 1 GB and within the plan's library storage) straight into the workspace's library.

  • complete_uploadكتابة

    Complete upload. Call after the PUT to a create_upload_url uploadUrl has finished.

  • rename_videoكتابة

    Rename video. Change a finished video's title (shown in Clips and used as the post title where a platform has one).

  • list_foldersقراءة

    List library folders. List the media library's folders, A to Z, each with its id, name and how many files are in it.

  • create_folderكتابة

    Create library folder. Create a folder in the media library to organise files (up to 100 per library).

  • rename_folderكتابة

    Rename library folder. Rename a Library folder.

  • delete_folderتستأذن أولًاكتابة

    Delete library folder. Delete a media library folder.

  • move_filesكتابة

    Move files to a folder. File up to 500 library files in a folder, or back in Unfiled with folderId null.

  • delete_filesتستأذن أولًاكتابة

    Delete library files. Permanently delete up to 500 files from the media library.

  • get_brand_kitقراءة

    Get brand kit. Get the workspace's brand kit: name, accent, background and text colours, voice style, tone of voice, banned words, website and a 10-minute logo link, plus the list of all its kits (agencies keep one per client).

  • update_brand_kitكتابة

    Update brand kit. Change the brand kit: any of name, colours (each key on its own), voice style, tone and banned words; fields you leave out stay as they are.

  • list_charactersقراءة

    List characters. List the workspace's characters: its own characters (built from the cast, with colours, an accessory, a line about them and a 10-minute face link) and its Illustrated characters (drawn, with their poses).

  • create_characterكتابة

    Create character. Create one of the workspace's own characters from the cast (up to 24).

  • update_characterكتابة

    Update character. Change one of the workspace's own characters; fields you leave out stay as they are.

  • delete_characterكتابة

    Delete character. Delete one of the workspace's own characters.

  • get_usageقراءة

    Get usage. Get the workspace's plan and what it has used: credits used and left this period (AI videos spend them: about 10 a standard video, 20 Illustrated) and when they renew, pack credits, AI videos made, AI writing calls used today against the daily limit (captions and ideas spend these), and posts this week against the weekly goal.

  • get_analyticsقراءة

    Get analytics. Get how the workspace's published posts did over the last 7, 30 or 90 days: totals (views, reach, likes, comments, shares, saves), the same per platform and per account, the five most viewed posts, and the best weekday and hour to post by median views.

  • list_ideasقراءة

    List ideas. Get this week's video ideas for the workspace (five, each with a title, opening hook, angle and format), if they've been made.

  • generate_ideasكتابة

    Generate ideas. Make five fresh video ideas for this week from the workspace's formats, platforms and brand kit, replacing this week's ideas.

  • write_captionsكتابة

    Write captions. Write a post caption and hashtags for each platform (Instagram, TikTok, LinkedIn; all three by default), in the brand's tone, from a topic or an existing video (videoId from list_posts).

  • list_notificationsقراءة

    List notifications. List this workspace's notices from the bell, newest first, as the key's maker sees them: a video is ready, a post failed or went out, a payment failed.

  • mark_notifications_readكتابة

    Mark notifications read. Mark notices as read: the ids given, or every unread notice when you pass none.

تستأذن أولًاتعرض معاينة وتنتظر موافقتك قبل أن تغيّر أي شيء.

الاستجابات والأخطاء

كل استجابة بصيغة JSON وفيها حقلان: data وerror. عند النجاح يحمل data النتيجة وتكون قيمة error فارغة (null). وعند الفشل يحدث العكس، ويحتوي error على code تتصرف بناءً عليه وmessage يمكنك عرضها على المستخدم.

النجاح

{
  "data": {
    "id": "6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b",
    "title": "Coffee facts"
  },
  "error": null
}

الفشل

{
  "data": null,
  "error": {
    "code": "invalid_input",
    "message": "Give the project a title."
  }
}
الرمزحالة HTTPالمعنى
unauthorized401المفتاح مفقود أو بصيغة خاطئة أو ملغى أو منتهي الصلاحية.
forbidden403لا يملك المفتاح صلاحية هذا الإجراء: مفتاح للقراءة فقط حاول الكتابة، أو أن دورك لا يسمح بذلك.
not_found404لا يوجد عنصر بهذا المعرّف في مساحة العمل هذه.
invalid_input400حقل مفقود أو خارج النطاق المسموح. توضّح الرسالة أيّ حقل.
invalid_json400محتوى الطلب ليس JSON صالحًا.
payload_too_large413حجم محتوى الطلب يتجاوز 100 كيلوبايت.
unsupported_media_type415أرسل المحتوى بصيغة JSON مع الترويسة Content-Type: application/json.
method_not_allowed405هذا المسار لا يقبل طريقة HTTP هذه.
rate_limited429طلبات كثيرة جدًا من هذا المفتاح. انتظر عدد الثواني المذكور في Retry-After.
plan_required402الوصول إلى الواجهة يتطلب خطة مدفوعة.
plan_limit403بلغت أحد حدود خطتك، مثل عدد المشاريع أو الفيديوهات هذا الشهر.
internal500حدث خلل من جهتنا. أعد المحاولة، وإن تكرر الأمر فأخبرنا.

حدود الطلبات

يستطيع كل مفتاح إرسال 60 طلبًا في الدقيقة. بعد ذلك تتلقى rate_limited (HTTP 429) مع ترويسة Retry-After تحدد عدد الثواني التي عليك انتظارها. تحتاج إلى المزيد؟ أنشئ مفتاحًا لكل برنامج، فلكل مفتاح حدّه الخاص.

التقسيم إلى صفحات

تصل القوائم صفحةً بعد صفحة، من الأحدث إلى الأقدم. حدّد حجم الصفحة عبر limit (الافتراضي 20، والحد الأقصى 100). إذا كان هناك المزيد، تتضمن الاستجابة nextCursor: أرسله في cursor لتحصل على الصفحة التالية. وتكون قيمته فارغة (null) في الصفحة الأخيرة.

curl "https://clips.lnr.ae/api/v1/projects?limit=20&cursor=NEXT_CURSOR" \
  -H "Authorization: Bearer YOUR_API_KEY"

المعاينة والتأكيد

عمليات الكتابة التي يمتد أثرها خارج Clips، مثل جدولة منشور، تقبل ?preview=1. عندها يتحقق Clips من الطلب ويُرجع ما سيحدث، دون أن ينفّذ شيئًا.

عبر MCP، تستأذن هذه الأدوات دائمًا أولًا. يُرجع الطلب الأول معاينة وplan_id؛ تعرض عليك أداة الذكاء الاصطناعي المعاينة، ولا تعيد الطلب بالوسائط نفسها مع plan_id إلا بعد موافقتك. تعمل الخطة مرة واحدة وتنتهي صلاحيتها بعد 10 دقائق، فلا يُنشر شيء مرتين أو دون علمك.

OpenAPI

الواجهة كاملةً موصوفة في ملف OpenAPI 3.1 واحد. استورده في Postman أو Insomnia، أو قدّمه إلى Cursor أو أي أداة ذكاء اصطناعي أخرى كسياق، أو أنشئ منه مكتبة عميل بلغتك البرمجية.

curl -o clips-openapi.json https://clips.lnr.ae/api/v1/openapi.json

تنزيل ملف OpenAPI

مرجع الواجهة

مساحة العمل

مساحة العمل التي ينتمي إليها المفتاح، والقوالب التي تُبنى منها مشاريعها.

GET/api/v1/workspace

مساحة عمل المفتاح: اسمها وخطتها والصيغ والمنصات التي تنشر عليها وعدد مشاريعها. أول طلب مناسب للتأكد من أن المفتاح يعمل.

أداة MCP: get_workspace

مثال على الطلب

curl https://clips.lnr.ae/api/v1/workspace \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b",
    "name": "Lunar Coffee",
    "slug": "lunar-coffee",
    "createdAt": "2026-10-01T08:00:00.000Z",
    "plan": "pro",
    "formats": [
      "vertical"
    ],
    "platforms": [
      "instagram",
      "tiktok"
    ],
    "postsPerWeek": 5,
    "projectCount": 12
  },
  "error": null
}
GET/api/v1/templates

كل قالب بمشاهده، ووصف واضح لكل حقل، ومخطط JSON Schema الخاص به، ومثال صالح للاستخدام، إضافةً إلى النماذج الجاهزة التي يمكنك إنشاء مشروع منها دون كتابة الخصائص.

أداة MCP: list_templates

مثال على الطلب

curl https://clips.lnr.ae/api/v1/templates \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "templates": [
      {
        "id": "stat-reveal",
        "name": "Stat reveal",
        "summary": "One striking number, revealed and explained.",
        "durationSeconds": 15,
        "scenes": [
          {
            "name": "Hook",
            "from": 0,
            "to": 3
          }
        ],
        "fields": [
          {
            "path": "brand.name",
            "description": "Brand name shown at the end, 1–40 characters."
          }
        ],
        "propsSchema": {
          "type": "object"
        },
        "exampleProps": {}
      }
    ],
    "starters": [
      {
        "id": "coffee",
        "label": "Coffee shop"
      }
    ]
  },
  "error": null
}

المشاريع

فيديوهات قابلة للتعديل مبنية على قالب. أنشئ مشروعًا من نموذج جاهز أو من خصائص كاملة، ثم عدّله حتى يصبح كما تريد.

GET/api/v1/projects

المشاريع من الأحدث إلى الأقدم، صفحةً بعد صفحة.

أداة MCP: list_projects

المعاملات

  • limitintegerالاستعلاماختياري

    How many to return. (1–100, default 20)

  • cursorstringالاستعلاماختياري

    The `nextCursor` from the previous page.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/projects \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "projects": [
      {
        "id": "6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b",
        "title": "Coffee facts",
        "template": "stat-reveal",
        "createdAt": "2026-11-14T09:30:00.000Z",
        "updatedAt": "2026-11-14T09:30:00.000Z"
      }
    ],
    "nextCursor": null
  },
  "error": null
}
POST/api/v1/projects

أرسل قالبًا مع نموذج جاهز (ويمكنك إضافة اسم وجملة افتتاحية ولون مميّز)، أو قالبًا مع خصائص كاملة من «عرض القوالب».

أداة MCP: create_project

محتوى الطلب

  • titlestringمطلوب

    (1–120 characters)

  • template"stat-reveal" | "problem-solution"مطلوب
  • starter"clips" | "coffee" | "science" | "kids" | "history"اختياري

    Use a starter, or send props.

  • namestringاختياري

    With a starter: the brand name. (at most 40 characters)

  • hookstringاختياري

    With a starter: the opening line. (at most 80 characters)

  • accentstringاختياري

    With a starter: the accent colour. (matches ^#[0-9a-fA-F]{6}$)

  • propsobjectاختياري

    The template's full props, instead of a starter.

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/projects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Coffee facts",
    "template": "stat-reveal",
    "starter": "coffee",
    "name": "Lunar Coffee",
    "accent": "#c8a26b"
  }'

مثال على الاستجابة

HTTP 201
{
  "data": {
    "id": "6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b",
    "title": "Coffee facts",
    "template": "stat-reveal",
    "createdAt": "2026-11-14T09:30:00.000Z",
    "updatedAt": "2026-11-14T09:30:00.000Z",
    "props": {
      "brand": {
        "name": "Lunar Coffee",
        "accent": "#c8a26b"
      }
    }
  },
  "error": null
}
GET/api/v1/projects/{id}

مشروع واحد بكامل خصائصه.

أداة MCP: get_project

المعاملات

  • idstring (uuid)المسارمطلوب

    The project's id.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/projects/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b",
    "title": "Coffee facts",
    "template": "stat-reveal",
    "createdAt": "2026-11-14T09:30:00.000Z",
    "updatedAt": "2026-11-14T09:30:00.000Z",
    "props": {
      "brand": {
        "name": "Lunar Coffee",
        "accent": "#c8a26b"
      }
    }
  },
  "error": null
}
PATCH/api/v1/projects/{id}

غيّر اسمه أو استبدل خصائصه أو الاثنين معًا. الخصائص الجديدة تحلّ محلّ القديمة بالكامل ويجب أن تتوافق مع قالب المشروع.

أداة MCP: update_project

المعاملات

  • idstring (uuid)المسارمطلوب

    The project's id.

محتوى الطلب

  • titlestringاختياري

    (1–120 characters)

  • propsobjectاختياري

مثال على الطلب

curl -X PATCH https://clips.lnr.ae/api/v1/projects/ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Coffee facts, take two"
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b",
    "title": "Coffee facts, take two",
    "template": "stat-reveal",
    "createdAt": "2026-11-14T09:30:00.000Z",
    "updatedAt": "2026-11-14T09:30:00.000Z",
    "props": {}
  },
  "error": null
}
DELETE/api/v1/projects/{id}

يحذف المشروع. لا يمكن التراجع عن ذلك.

المعاملات

  • idstring (uuid)المسارمطلوب

    The project's id.

مثال على الطلب

curl -X DELETE https://clips.lnr.ae/api/v1/projects/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b"
  },
  "error": null
}

إنشاء الفيديو بالذكاء الاصطناعي

دع المخرج الذكي يكتب الفيديو ويعلّق عليه صوتيًا ويحرّره انطلاقًا من وصف نصي، ويحفظه مشروعًا تفتحه في المحرّر.

GET/api/v1/videos/generate

الصيغ التي يعرفها المخرج والحقول التي تطلبها كل صيغة. استخدم صيغة بدل الوصف الحر لتحصل على بنية متوقعة.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/videos/generate \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "formats": [
      {
        "id": "explainer-30",
        "name": "Explainer in 30 Seconds",
        "summary": "One idea, explained clearly.",
        "lengthSeconds": 30,
        "fields": [
          {
            "id": "topic",
            "label": "Topic",
            "required": true,
            "maxLength": 80
          }
        ]
      }
    ]
  },
  "error": null
}
POST/api/v1/videos/generate

يصنع فيديو من وصف نصي، أو من صيغة وحقولها، ويحفظه مشروعًا. افتراضيًا ينتظر الطلب النتيجة، وتستغرق عادةً من 1 إلى 4 دقائق، فاضبط مهلة انتظار طويلة. أرسل "wait": false لتحصل على sessionId فورًا (HTTP 202)، ثم تابع التقدم عبر «عرض جلسة فيديو». للخطط المدفوعة فقط؛ كل فيديو يكلّف رصيدًا ويُحتسب من حصة الخطة الشهرية لفيديوهات الذكاء الاصطناعي.

أداة MCP: generate_video

محتوى الطلب

  • promptstringاختياري

    What the video is about. Send this, or a format. (at most 4000 characters)

  • formatstringاختياري

    A format id from List video formats.

  • fieldsobjectاختياري

    The format's fields, by id (at most 8).

  • lengthSecondsintegerاختياري

    (10–60, default 30)

  • voicebooleanاختياري

    (default true)

  • musicbooleanاختياري

    (default true)

  • captions"standard" | "animated" | "off"اختياري

    (default "standard")

  • brollbooleanاختياري

    Add stock footage between scenes. (default false)

  • platform"tiktok" | "instagram" | "linkedin" | "all"اختياري

    (default "all")

  • waitbooleanاختياري

    false: answer at once with a sessionId (HTTP 202) and poll Get a video session. (default true)

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/videos/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "product-ad",
    "fields": {
      "product": "Halo, a smart water bottle",
      "problem": "People forget to drink water at work",
      "cta": "Try it for 30 days"
    },
    "lengthSeconds": 20
  }'

مثال على الاستجابة

HTTP 201
{
  "data": {
    "projectId": "6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b",
    "title": "Halo: drink more without thinking",
    "sessionId": "0b9e7c4d-2f1a-4c3b-8d5e-6f7a8b9c0d1e",
    "message": "A 20-second ad: the problem, Halo's reminder glow, the 40% proof, then the offer.",
    "editorUrl": "https://clips.lnr.ae/app/editor/6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b"
  },
  "error": null
}

استوديو الذكاء الاصطناعي

تابع فيديوهات الذكاء الاصطناعي وعدّلها، واصنع أفلامًا لتطبيقات حقيقية، وصوّر لقطات بالذكاء الاصطناعي. الطلبات المدفوعة تحجز الرصيد أولًا وتعيده إن لم يُصنع شيء.

GET/api/v1/videos/sessions/{id}

جلسة فيديو بالذكاء الاصطناعي بدأت عبر API أو MCP: قيد التشغيل أو مكتملة أو فاشلة، مع خطواتها المباشرة والمشروع المحفوظ ومشاهده وآخر الرسائل. استعلم عنها كل 15–30 ثانية ما دامت تعمل. المحادثات التي بدأت في التطبيق لا تظهر هنا. مجاني.

أداة MCP: get_video_session

المعاملات

  • idstring (uuid)المسارمطلوب

    The sessionId from Generate a video.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/videos/sessions/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "4d2a9c71-3e5b-4f08-b1c6-7a9e2d4f6b13",
    "title": "Heat pumps in 30 seconds",
    "status": "done",
    "updatedAt": "2026-11-14T09:12:44.208Z",
    "projectId": "9e1b7c3a-2f4d-4a6e-8b5c-1d3f5a7e9c20",
    "editorUrl": "https://clips.lnr.ae/app/editor/9e1b7c3a-2f4d-4a6e-8b5c-1d3f5a7e9c20",
    "revisions": {
      "used": 1,
      "limit": 10
    },
    "steps": [],
    "scenes": [
      {
        "id": "hook",
        "type": "kinetic-title",
        "text": "Your boiler is burning money"
      },
      {
        "id": "stat",
        "type": "big-number",
        "text": "3x more efficient than gas"
      },
      {
        "id": "outro",
        "type": "brand-outro",
        "text": "Switch this winter"
      }
    ],
    "messages": [
      {
        "role": "user",
        "content": "A 30 second explainer on how heat pumps work, calm and clear",
        "projectId": null,
        "createdAt": "2026-11-14T09:05:02.114Z"
      },
      {
        "role": "assistant",
        "content": "Your video is ready: a calm 30 second explainer in three scenes.",
        "projectId": "9e1b7c3a-2f4d-4a6e-8b5c-1d3f5a7e9c20",
        "createdAt": "2026-11-14T09:08:31.902Z"
      },
      {
        "role": "user",
        "content": "Make the hook shorter",
        "projectId": null,
        "createdAt": "2026-11-14T09:10:57.330Z"
      },
      {
        "role": "assistant",
        "content": "Done: the hook is now four words and lands in under two seconds.",
        "projectId": "9e1b7c3a-2f4d-4a6e-8b5c-1d3f5a7e9c20",
        "createdAt": "2026-11-14T09:12:44.150Z"
      }
    ]
  },
  "error": null
}
POST/api/v1/videos/sessions/{id}/revise

عدّل فيديو أنشأه الذكاء الاصطناعي بتعليمات، للفيديو كله أو لمشهد واحد (sceneId). يكلّف التعديل 1 رصيد حتى الحد الذي تسمح به الخطة لكل فيديو؛ أما newVersion، أو أي تغيير بعد بلوغ الحد، فيكلّف ثمن فيديو جديد (10 رصيد). يأتي الرد فورًا، ثم تابع الجلسة. ومع "wait": true يأتي الرد 200 مع الجلسة عند الانتهاء (من 1 إلى 4 دقائق).

أداة MCP: revise_video

المعاملات

  • idstring (uuid)المسارمطلوب

    The video's sessionId.

محتوى الطلب

  • instructionstringمطلوب

    (at most 4000 characters)

  • sceneIdstringاختياري

    (matches ^[a-z0-9-]{1,32}$)

  • newVersionbooleanاختياري

    (default false)

  • voiceIdstringاختياري
  • languagestringاختياري
  • modelIdstringاختياري
  • waitbooleanاختياري

    (default false)

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/videos/sessions/ID/revise \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "instruction": "Use an Arabic voice and make the hook shorter",
    "language": "ar"
  }'

مثال على الاستجابة

HTTP 202
{
  "data": {
    "sessionId": "4d2a9c71-3e5b-4f08-b1c6-7a9e2d4f6b13",
    "title": "Heat pumps in 30 seconds",
    "status": "running"
  },
  "error": null
}
GET/api/v1/videos/voices

المعلّقون الذين تمرّرهم في voiceId عند التعديل، واللغات التي يمكن كتابة الفيديو والتعليق الصوتي بها. مع source=library يبحث في مكتبة الأصوات العامة. مجاني.

أداة MCP: list_voices

المعاملات

  • source"account" | "library"الاستعلاماختياري

    Curated narrators, or the public library. (default "account")

  • searchstringالاستعلاماختياري

    With source=library: words to search for. (at most 60 characters)

  • languagestringالاستعلاماختياري

    With source=library: an ISO 639-1 code.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/videos/voices \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "voices": [
      {
        "id": "a1B2c3D4e5F6g7H8i9J0",
        "name": "Alice",
        "tagline": "Clear, Engaging Educator",
        "gender": "female",
        "accent": "british",
        "age": "middle_aged",
        "language": "en",
        "useCase": "educational",
        "descriptive": "confident",
        "previewUrl": "https://…/alice-preview.mp3"
      }
    ],
    "languages": [
      {
        "id": "en",
        "name": "English"
      },
      {
        "id": "ar",
        "name": "Arabic"
      }
    ],
    "hasMore": false
  },
  "error": null
}
GET/api/v1/videos/models

النماذج التي يستطيع المخرج العمل بها، بأسمائها العامة في Clips، مع فئة كل نموذج والرصيد الذي يكلّفه فيديو جديد عليه. مرّر المعرّف في modelId عند التعديل. مجاني.

أداة MCP: list_video_models

مثال على الطلب

curl https://clips.lnr.ae/api/v1/videos/models \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "models": [
      {
        "id": "m_3f9a1c7e5b2d8a40",
        "label": "Clips Pro",
        "tier": "premium",
        "credits": 10,
        "recommended": true
      }
    ],
    "defaultId": "m_3f9a1c7e5b2d8a40"
  },
  "error": null
}
GET/api/v1/films

أفلام المنتجات في مساحة العمل، من الأحدث إلى الأقدم، مع رابط تنزيل للمكتملة منها. مجاني.

أداة MCP: list_films

المعاملات

  • limitintegerالاستعلاماختياري

    How many to return. (1–100, default 20)

  • cursorstringالاستعلاماختياري

    The nextCursor from the previous page.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/films \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "films": [
      {
        "id": "b7f3d1e9-6a2c-4e85-9d47-2c8a6e0f4b31",
        "status": "succeeded",
        "stage": "Ready in your Library",
        "style": {
          "id": "glass",
          "name": "Glass"
        },
        "aspect": "9:16",
        "brief": "Show how Halo turns support tickets into answers in seconds.",
        "message": null,
        "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/halo-product-film.mp4",
        "downloadUrl": "https://storage.clips.lnr.ae/storage/v1/object/sign/media/…/halo-product-film.mp4?token=…",
        "createdAt": "2026-11-14T08:40:10.512Z",
        "finishedAt": "2026-11-14T08:52:37.006Z"
      }
    ],
    "nextCursor": null
  },
  "error": null
}
POST/api/v1/films

فيلم سينمائي لتطبيق حقيقي انطلاقًا من رابطه العام أو لقطات شاشة من المكتبة أو كليهما. يكلّف 10 رصيد، يُحجز أولًا ويُعاد إن تعذّر صنع الفيلم. يستغرق نحو 5–15 دقيقة، فتابعه عبر «عرض فيلم منتج». الأنماط: glass, studio-light, fluid, isometric, flow, turnaround, minimal, neon, vivid, ribbon, canvas, playful, sunlit.

أداة MCP: create_film

محتوى الطلب

  • briefstringمطلوب

    (at most 4000 characters)

  • style"glass" | "studio-light" | "fluid" | "isometric" | "flow" | "turnaround" | "minimal" | "neon" | "vivid" | "ribbon" | "canvas" | "playful" | "sunlit"مطلوب
  • aspect"9:16" | "16:9"اختياري

    (default "9:16")

  • productUrlstringاختياري
  • productScreensarray of stringاختياري

    (at most 8 items)

  • brandKitIdstring (uuid)اختياري
  • brandobjectاختياري

    { kind: "kit" } (default), { kind: "link", url }, or { kind: "none", name? }.

  • wideScreens"crop" | "whole"اختياري

    (default "crop")

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/films \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "brief": "Show how Halo turns support tickets into answers in seconds.",
    "style": "glass",
    "productUrl": "https://app.halo.example"
  }'

مثال على الاستجابة

HTTP 201
{
  "data": {
    "id": "b7f3d1e9-6a2c-4e85-9d47-2c8a6e0f4b31",
    "status": "writing",
    "stage": "Writing the film",
    "style": {
      "id": "glass",
      "name": "Glass"
    },
    "aspect": "9:16",
    "brief": "Show how Halo turns support tickets into answers in seconds.",
    "message": null,
    "storagePath": null,
    "downloadUrl": null,
    "createdAt": "2026-11-14T08:40:10.512Z",
    "finishedAt": null
  },
  "error": null
}
GET/api/v1/films/{id}

حالة الفيلم (writing أو queued أو rendering أو replan أو succeeded أو failed) ومرحلته، ورابط تنزيل صالح لمدة 15 دقيقة بعد نجاحه. مجاني.

أداة MCP: get_film

المعاملات

  • idstring (uuid)المسارمطلوب

    The film's id.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/films/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "b7f3d1e9-6a2c-4e85-9d47-2c8a6e0f4b31",
    "status": "succeeded",
    "stage": "Ready in your Library",
    "style": {
      "id": "glass",
      "name": "Glass"
    },
    "aspect": "9:16",
    "brief": "Show how Halo turns support tickets into answers in seconds.",
    "message": null,
    "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/halo-product-film.mp4",
    "downloadUrl": "https://storage.clips.lnr.ae/storage/v1/object/sign/media/…/halo-product-film.mp4?token=…",
    "createdAt": "2026-11-14T08:40:10.512Z",
    "finishedAt": "2026-11-14T08:52:37.006Z"
  },
  "error": null
}
GET/api/v1/footage

المقاطع والصور الثابتة ونسخ 4K المصنوعة بالذكاء الاصطناعي، من الأحدث إلى الأقدم، مع الرصيد المستهلك وروابط تنزيل للمكتملة منها. مجاني.

أداة MCP: list_footage

المعاملات

  • limitintegerالاستعلاماختياري

    How many to return. (1–100, default 20)

  • cursorstringالاستعلاماختياري

    The nextCursor from the previous page.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/footage \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "footage": [
      {
        "id": "e2c84a6f-1b9d-4d3e-a7f5-8c0b2e4d6a19",
        "kind": "video",
        "status": "succeeded",
        "model": "motion-2-5",
        "modelName": "Lunar Motion 2.5",
        "prompt": "A barista pouring latte art in a sunlit cafe, slow motion",
        "seconds": 5,
        "credits": 15,
        "createdAt": "2026-11-14T10:02:18.441Z",
        "error": null,
        "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/ai-footage/e2c84a6f-1b9d-4d3e-a7f5-8c0b2e4d6a19-barista-latte-art.mp4",
        "downloadUrl": "https://storage.clips.lnr.ae/storage/v1/object/sign/media/…/barista-latte-art.mp4?token=…",
        "posterUrl": "https://storage.clips.lnr.ae/storage/v1/object/sign/media/…/barista-latte-art.jpg?token=…"
      }
    ],
    "nextCursor": null
  },
  "error": null
}
POST/api/v1/footage

صوّر مقطعًا من وصف نصي، ويُحفظ في المكتبة. 15 رصيد لكل وحدة بطول مقطع (النماذج الأغلى والمدد الأطول والصوت تستهلك أكثر)، يُحجز أولًا ويُعاد إن فشل التصوير. النماذج: motion-2-5 (Starter+), hailuo-h3 (Growth+), wan-3-0 (Growth+), kling-3-0-pro (Growth+), veo-3-1 (Scale+). تابعه عبر «عرض لقطة ذكاء اصطناعي» (من 1 إلى 3 دقائق).

أداة MCP: generate_footage

محتوى الطلب

  • promptstringمطلوب

    (3–800 characters)

  • model"motion-2-5" | "hailuo-h3" | "wan-3-0" | "kling-3-0-pro" | "veo-3-1"اختياري

    (default "motion-2-5")

  • secondsintegerاختياري

    (default 5)

  • withSoundbooleanاختياري

    (default false)

  • shotstringاختياري
  • camerastringاختياري
  • lightingstringاختياري
  • lookstringاختياري
  • firstFramePathstringاختياري

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/footage \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A barista pouring latte art in a sunlit cafe, slow motion",
    "model": "motion-2-5",
    "seconds": 5
  }'

مثال على الاستجابة

HTTP 202
{
  "data": {
    "id": "e2c84a6f-1b9d-4d3e-a7f5-8c0b2e4d6a19",
    "kind": "video",
    "status": "running",
    "model": "motion-2-5",
    "modelName": "Lunar Motion 2.5",
    "prompt": "A barista pouring latte art in a sunlit cafe, slow motion",
    "seconds": 5,
    "credits": 15,
    "createdAt": "2026-11-14T10:02:18.441Z",
    "error": null,
    "storagePath": null,
    "downloadUrl": null,
    "posterUrl": null
  },
  "error": null
}
GET/api/v1/footage/{id}

حالة المقطع، وبعد نجاحه مسار storagePath الخاص به (انشره عبر POST /api/v1/posts) ورابط تنزيل صالح لمدة 15 دقيقة. مجاني.

أداة MCP: get_footage

المعاملات

  • idstring (uuid)المسارمطلوب

    The clip's id.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/footage/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "e2c84a6f-1b9d-4d3e-a7f5-8c0b2e4d6a19",
    "kind": "video",
    "status": "succeeded",
    "model": "motion-2-5",
    "modelName": "Lunar Motion 2.5",
    "prompt": "A barista pouring latte art in a sunlit cafe, slow motion",
    "seconds": 5,
    "credits": 15,
    "createdAt": "2026-11-14T10:02:18.441Z",
    "error": null,
    "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/ai-footage/e2c84a6f-1b9d-4d3e-a7f5-8c0b2e4d6a19-barista-latte-art.mp4",
    "downloadUrl": "https://storage.clips.lnr.ae/storage/v1/object/sign/media/…/barista-latte-art.mp4?token=…",
    "posterUrl": "https://storage.clips.lnr.ae/storage/v1/object/sign/media/…/barista-latte-art.jpg?token=…"
  },
  "error": null
}
POST/api/v1/footage/{id}/upscale

يرفع دقة مقطع مكتمل صُنع بالذكاء الاصطناعي إلى 4K (في خطتي Growth وScale). يستهلك رصيدًا بحسب طول المقطع، يُحجز أولًا ويُعاد إن فشل. يُرجع النسخة الجديدة، فتابعها عبر «عرض لقطة ذكاء اصطناعي».

أداة MCP: upscale_footage

المعاملات

  • idstring (uuid)المسارمطلوب

    The finished clip's id.

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/footage/ID/upscale \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 202
{
  "data": {
    "id": "f4a1c9e3-7d2b-4b6a-9e8c-3a5d7f1b2c40",
    "kind": "upscale",
    "status": "running",
    "model": "bytedance-upscaler",
    "modelName": "4K upscale",
    "prompt": "A barista pouring latte art in a sunlit cafe, slow motion",
    "seconds": 5,
    "credits": 15,
    "createdAt": "2026-11-14T10:02:18.441Z",
    "error": null,
    "storagePath": null,
    "downloadUrl": null,
    "posterUrl": null
  },
  "error": null
}

التصيير

حوّل مشروعًا مبنيًا على قالب إلى ملف MP4 على خادم Clips، ثم نزّله أو انشره.

POST/api/v1/projects/{id}/render

يبدأ تصيير مشروع مبني على قالب (stat-reveal أو problem-solution) إلى ملف MP4 مطابق لما يصدّره المحرّر، ويحفظه في المكتبة. يردّ فورًا؛ استعلم عن «عرض فيديو» بقيمة videoId حتى تصبح الحالة done (عادةً خلال دقيقة إلى ثلاث دقائق)، ثم استخدم downloadUrl أو انشره. تصيير واحد في كل مرة لكل مساحة عمل (يُرفض بالرمز 429 ما دام أحدها قيد التنفيذ)، وعدد يومي حسب الخطة (Starter 10، Growth 30، Scale 100، بأيام UTC). لا يستهلك أي رصيد. الحجم size هو 720p أو 1080p ضمن حجم التصدير في خطتك، وجسم الطلب اختياري.

أداة MCP: render_project

المعاملات

  • idstring (uuid)المسارمطلوب

    The project's id.

محتوى الطلب

  • size"720p" | "1080p"اختياري

    Output size by the short side of the 9:16 frame. Default: 1080p where the plan allows it.

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/projects/ID/render \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "size": "1080p"
  }'

مثال على الاستجابة

HTTP 202
{
  "data": {
    "videoId": "9d2e4f6a-1b3c-4d5e-8f7a-0b1c2d3e4f5a",
    "status": "pending",
    "projectId": "6f1c2b8e-4a3d-4e6f-9b1a-2c7d8e9f0a1b",
    "title": "Coffee facts",
    "size": "1080p",
    "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/9d2e4f6a-1b3c-4d5e-8f7a-0b1c2d3e4f5a-coffee-facts.mp4"
  },
  "error": null
}

الفيديوهات والمكتبة

اعثر على الفيديوهات المكتملة وملفات المكتبة ونزّلها، وارفع ملفات MP4 الخاصة بك، لتحصل على videoId أو storagePath للنشر.

GET/api/v1/videos

ملفات MP4 المكتملة، من الأحدث إلى الأقدم. يحصل الفيديو على سجل بمجرد أن يصيّره Clips أو يجدوله، أما ملفات MP4 التي رفعتها فقط فتجدها في المكتبة. مرّر id الفيديو في videoId، أو مسار storagePath الخاص به، إلى POST /api/v1/posts.

أداة MCP: list_videos

المعاملات

  • limitintegerالاستعلاماختياري

    How many to return. (1–100, default 20)

  • cursorstringالاستعلاماختياري

    The nextCursor from the previous page.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "videos": [
      {
        "id": "c3a9e7d2-5b14-4e8f-a6d0-91b2f4c8e735",
        "title": "Launch teaser",
        "source": "upload",
        "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/8e2b5c1a-4f7d-4a3e-b9c6-0d1e2f3a4b5c-launch-teaser.mp4",
        "durationMs": 28400,
        "createdAt": "2026-11-12T09:41:07.512Z"
      }
    ],
    "nextCursor": null
  },
  "error": null
}
GET/api/v1/videos/{id}

فيديو واحد مع حالته ورابط تنزيل صالح لمدة 15 دقيقة. تبقى قيمة downloadUrl فارغة (null) حتى ينتهي التصيير. اطلب رابطًا جديدًا عند الحاجة بدل تخزين الرابط.

أداة MCP: get_video

المعاملات

  • idstring (uuid)المسارمطلوب

    The video's id, from List finished videos.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/videos/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "c3a9e7d2-5b14-4e8f-a6d0-91b2f4c8e735",
    "title": "Launch teaser",
    "source": "upload",
    "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/8e2b5c1a-4f7d-4a3e-b9c6-0d1e2f3a4b5c-launch-teaser.mp4",
    "durationMs": 28400,
    "createdAt": "2026-11-12T09:41:07.512Z",
    "status": "done",
    "downloadUrl": "https://storage.clips.lnr.ae/storage/v1/object/sign/media/…/launch-teaser.mp4?token=…&download=launch-teaser.mp4",
    "downloadUrlExpiresAt": "2026-11-14T10:15:00.000Z"
  },
  "error": null
}
GET/api/v1/library

ملفات مكتبة الوسائط (ما رفعته واللقطات المصنوعة بالذكاء الاصطناعي)، من الأحدث إلى الأقدم، مع مجلدات المكتبة. الملف الذي يحمل postable: true هو ملف MP4 يمكنك تمريره في storagePath إلى POST /api/v1/posts. الملفات التي تنتظر مراجعة المحتوى لا تظهر.

أداة MCP: list_library

المعاملات

  • folderstringالاستعلاماختياري

    all, unfiled, or a folder id from the folders list. (default "all")

  • kind"video" | "image" | "audio" | "pdf"الاستعلاماختياري

    Only files of this kind.

  • limitintegerالاستعلاماختياري

    How many to return. (1–100, default 20)

  • cursorstringالاستعلاماختياري

    The nextCursor from the previous page.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/library \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "folders": [
      {
        "id": "0f5d8a3c-7e21-4b96-8c4d-3a6e9b1f2d58",
        "name": "November campaign"
      }
    ],
    "files": [
      {
        "name": "launch-teaser.mp4",
        "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/8e2b5c1a-4f7d-4a3e-b9c6-0d1e2f3a4b5c-launch-teaser.mp4",
        "kind": "video",
        "mimeType": "video/mp4",
        "sizeBytes": 18734210,
        "createdAt": "2026-11-12T09:38:52.104Z",
        "folderId": "0f5d8a3c-7e21-4b96-8c4d-3a6e9b1f2d58",
        "postable": true
      },
      {
        "name": "product-shot.png",
        "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/2d4f6a8c-1b3e-4c5d-8e7f-9a0b1c2d3e4f-product-shot.png",
        "kind": "image",
        "mimeType": "image/png",
        "sizeBytes": 842113,
        "createdAt": "2026-11-10T16:02:31.877Z",
        "folderId": null,
        "postable": false
      }
    ],
    "nextCursor": "MjAyNi0xMS0xMFQxNjowMjozMS44Nzd8MmQ0ZjZhOGMtMWIzZS00YzVkLThlN2YtOWEwYjFjMmQzZTRm"
  },
  "error": null
}
POST/api/v1/library/uploads

يُرجع رابطًا موقّعًا لملف جديد واحد، ومسار storagePath الذي سيحمله. أرسل محتوى الملف بطلب PUT إلى uploadUrl مع الترويسات المُرجعة خلال ساعتين، ثم استدعِ «إكمال الرفع» بنفس storagePath وsizeBytes ليبدأ فحص محتوى الملف. تُقبل الفيديوهات والصور النقطية والملفات الصوتية وملفات PDF حتى 1 GB، ضمن سعة المكتبة في خطتك.

أداة MCP: create_upload_url

محتوى الطلب

  • fileNamestringمطلوب

    The file's name with its extension. (1–200 characters)

  • contentTypestringمطلوب

    The file's mime type, e.g. video/mp4. SVG isn't accepted.

  • sizeBytesintegerمطلوب

    The file's exact size in bytes. (at least 1)

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/library/uploads \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileName": "launch-teaser.mp4",
    "contentType": "video/mp4",
    "sizeBytes": 18734210
  }'

مثال على الاستجابة

HTTP 201
{
  "data": {
    "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/8e2b5c1a-4f7d-4a3e-b9c6-0d1e2f3a4b5c-launch-teaser.mp4",
    "uploadUrl": "https://storage.clips.lnr.ae/storage/v1/object/upload/sign/media/…/launch-teaser.mp4?token=…",
    "method": "PUT",
    "headers": {
      "Content-Type": "video/mp4"
    },
    "expiresAt": "2026-11-14T12:00:00.000Z",
    "kind": "video",
    "postable": true
  },
  "error": null
}
POST/api/v1/library/uploads/complete

استدعِه بعد انتهاء طلب PUT إلى uploadUrl. يقرأ Clips الملف المخزّن: إن اختلف حجمه الحقيقي عن sizeBytes، أو لم يكن من الأنواع التي تقبلها المكتبة، أو تجاوزت به مساحة العمل سعة التخزين في خطتها، يُحذف الملف ويفشل الطلب. وإلا يبدأ فحص محتواه. يقبل POST /api/v1/posts الملف بعد انتهاء الفحص، عادةً خلال دقيقة، وحتى ذلك الحين يردّ بأن الملف ما زال قيد الفحص.

أداة MCP: complete_upload

محتوى الطلب

  • storagePathstringمطلوب

    The storagePath the upload request returned. (at most 400 characters)

  • sizeBytesintegerمطلوب

    The sizeBytes sent with the upload request. (at least 1)

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/library/uploads/complete \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/8e2b5c1a-4f7d-4a3e-b9c6-0d1e2f3a4b5c-launch-teaser.mp4",
    "sizeBytes": 18734210
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "storagePath": "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/8e2b5c1a-4f7d-4a3e-b9c6-0d1e2f3a4b5c-launch-teaser.mp4",
    "name": "launch-teaser.mp4",
    "kind": "video",
    "sizeBytes": 18734210,
    "postable": true,
    "contentCheck": "started"
  },
  "error": null
}
PATCH/api/v1/videos/{id}

يغيّر عنوان الفيديو. ليس للفيديوهات وصف منفصل.

أداة MCP: rename_video

المعاملات

  • idstring (uuid)المسارمطلوب

    The video's id.

محتوى الطلب

  • titlestringمطلوب

    (1–120 characters)

مثال على الطلب

curl -X PATCH https://clips.lnr.ae/api/v1/videos/ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Launch teaser (final)"
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "c3a9e7d2-5b14-4e8f-a6d0-91b2f4c8e735",
    "title": "Launch teaser (final)"
  },
  "error": null
}
GET/api/v1/library/folders

مجلدات المكتبة مرتّبةً أبجديًا، مع عدد الملفات في كل منها. المجلدات مجرد تصنيفات: وضع الملف في مجلد لا يغيّر storagePath أبدًا.

أداة MCP: list_folders

مثال على الطلب

curl https://clips.lnr.ae/api/v1/library/folders \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "folders": [
      {
        "id": "0f5d8a3c-7e21-4b96-8c4d-3a6e9b1f2d58",
        "name": "November campaign",
        "fileCount": 12
      }
    ]
  },
  "error": null
}
POST/api/v1/library/folders

ينشئ مجلدًا. تتسع المكتبة لـ 100 مجلد كحد أقصى.

أداة MCP: create_folder

محتوى الطلب

  • namestringمطلوب

    Unique in the library, ignoring case. (1–60 characters)

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/library/folders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "November campaign"
  }'

مثال على الاستجابة

HTTP 201
{
  "data": {
    "id": "0f5d8a3c-7e21-4b96-8c4d-3a6e9b1f2d58",
    "name": "November campaign"
  },
  "error": null
}
PATCH/api/v1/library/folders/{id}

يعيد تسمية المجلد.

أداة MCP: rename_folder

المعاملات

  • idstring (uuid)المسارمطلوب

    The folder's id.

محتوى الطلب

  • namestringمطلوب

    Unique in the library, ignoring case. (1–60 characters)

مثال على الطلب

curl -X PATCH https://clips.lnr.ae/api/v1/library/folders/ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "December campaign"
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "0f5d8a3c-7e21-4b96-8c4d-3a6e9b1f2d58",
    "name": "December campaign"
  },
  "error": null
}
DELETE/api/v1/library/folders/{id}

يحذف المجلد دون حذف ملفاته، إذ تعود إلى «بلا مجلد». مع ?preview=1 يُرجع المعاينة ولا يحذف شيئًا.

أداة MCP: delete_folder

المعاملات

  • idstring (uuid)المسارمطلوب

    The folder's id.

  • preview"1"الاستعلاماختياري

    1 returns what would happen without changing anything.

مثال على الطلب

curl -X DELETE https://clips.lnr.ae/api/v1/library/folders/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "0f5d8a3c-7e21-4b96-8c4d-3a6e9b1f2d58"
  },
  "error": null
}
POST/api/v1/library/files/move

يضع حتى 500 ملف من المكتبة في مجلد، أو يعيدها إلى «بلا مجلد» مع folderId بقيمة null. لا يتحرك شيء في التخزين، فتبقى storagePaths والمنشورات التي تستخدمها تعمل.

أداة MCP: move_files

محتوى الطلب

  • storagePathsarray of stringمطلوب

    storagePath values from List library files. (1–500 items)

  • folderIdstring | null (uuid)مطلوب

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/library/files/move \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "storagePaths": [
      "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/8e2b5c1a-4f7d-4a3e-b9c6-0d1e2f3a4b5c-launch-teaser.mp4",
      "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/2d4f6a8c-1b3e-4c5d-8e7f-9a0b1c2d3e4f-product-shot.png"
    ],
    "folderId": "0f5d8a3c-7e21-4b96-8c4d-3a6e9b1f2d58"
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "moved": 2,
    "folderId": "0f5d8a3c-7e21-4b96-8c4d-3a6e9b1f2d58"
  },
  "error": null
}
POST/api/v1/library/files/delete

يحذف حتى 500 ملف من المكتبة نهائيًا. لا يمكن التراجع عن ذلك، والمنشورات التي لم تُنشر بعد وتستخدم ملف MP4 محذوفًا ستفشل. استدعِه أولًا مع ?preview=1: يسرد الملفات ويعدّ تلك المنشورات دون حذف أي شيء.

أداة MCP: delete_files

المعاملات

  • preview"1"الاستعلاماختياري

    1 returns what would happen without changing anything.

محتوى الطلب

  • storagePathsarray of stringمطلوب

    storagePath values from List library files. (1–500 items)

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/library/files/delete \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "storagePaths": [
      "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/2d4f6a8c-1b3e-4c5d-8e7f-9a0b1c2d3e4f-product-shot.png"
    ]
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "deleted": [
      "6b1f0c2e-8d4a-4f3b-9a1e-2c7d5e9f0a11/library/2d4f6a8c-1b3e-4c5d-8e7f-9a0b1c2d3e4f-product-shot.png"
    ],
    "failed": 0
  },
  "error": null
}

الحسابات المتصلة

الحسابات الاجتماعية المتصلة بمساحة العمل، وكيف تصل المنشورات إلى كل منها، وأوقات النشر الأسبوعية التي يملؤها next_free_slot.

GET/api/v1/accounts

الحسابات المتصلة مع طريقة التسليم (`direct`: ينشره Clips؛ `tiktok_inbox`: يصل إلى صندوق TikTok لدى صانع المحتوى فيضغط Post؛ `manual`: ينشره الشخص بنفسه؛ `browser`: وضع TikTok مؤقت تديره Lunar)، والمنطقة الزمنية، وأقرب أوقات النشر المتاحة. استدعِه قبل الجدولة.

أداة MCP: list_connected_accounts

مثال على الطلب

curl https://clips.lnr.ae/api/v1/accounts \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "accounts": [
      {
        "id": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
        "platform": "instagram",
        "handle": "@lunarcoffee",
        "status": "connected",
        "publishMode": "auto",
        "delivery": "direct",
        "timezone": "Asia/Dubai",
        "nextFreeSlots": [
          "2026-11-16T05:00:00.000Z"
        ]
      },
      {
        "id": "d7e8f9a0-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
        "platform": "tiktok",
        "handle": "@lunarcoffee",
        "status": "connected",
        "publishMode": "auto",
        "delivery": "tiktok_inbox",
        "timezone": "Asia/Dubai",
        "nextFreeSlots": [
          "2026-11-16T15:00:00.000Z"
        ]
      }
    ]
  },
  "error": null
}
GET/api/v1/accounts/{id}

عرض حساب

قراءة

حساب واحد في مساحة العمل هذه، متصلًا كان أم لا: الحالة (`connected` أو `needs_reauth` أو `disconnected`)، وطريقة التسليم، والمنطقة الزمنية، وأوقات النشر الأسبوعية (اليوم 0 = الأحد، بالتوقيت المحلي بنظام 24 ساعة)، وأقرب الأوقات المتاحة.

أداة MCP: get_account

المعاملات

  • idstring (uuid)المسارمطلوب

    The account's id, from List accounts.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/accounts/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
    "platform": "instagram",
    "handle": "@lunarcoffee",
    "status": "connected",
    "publishMode": "auto",
    "delivery": "direct",
    "timezone": "Asia/Dubai",
    "postingTimes": [
      {
        "weekday": 1,
        "time": "09:00"
      },
      {
        "weekday": 3,
        "time": "18:30"
      },
      {
        "weekday": 5,
        "time": "12:00"
      }
    ],
    "nextFreeSlots": [
      "2026-11-16T05:00:00.000Z",
      "2026-11-18T14:30:00.000Z"
    ]
  },
  "error": null
}
PUT/api/v1/accounts/{id}/posting-times

يستبدل أوقات النشر الأسبوعية للحساب بالقائمة التي ترسلها (القائمة الفارغة تمسحها، والمكرر يُحذف، و42 وقتًا كحد أقصى). الأوقات بالمنطقة الزمنية للحساب. تحتفظ المنشورات المجدولة مسبقًا بأوقاتها. يُرجع الحساب بعد التحديث.

أداة MCP: set_posting_times

المعاملات

  • idstring (uuid)المسارمطلوب

    The account's id, from List accounts.

  • preview"1"الاستعلاماختياري

    `1` runs every check and returns `{ preview }` (what would happen) without changing anything.

محتوى الطلب

  • postingTimesarray of objectمطلوب

    (at most 42 items)

مثال على الطلب

curl -X PUT https://clips.lnr.ae/api/v1/accounts/ID/posting-times \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postingTimes": [
      {
        "weekday": 1,
        "time": "09:00"
      },
      {
        "weekday": 3,
        "time": "18:30"
      },
      {
        "weekday": 5,
        "time": "12:00"
      }
    ]
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
    "platform": "instagram",
    "handle": "@lunarcoffee",
    "status": "connected",
    "publishMode": "auto",
    "delivery": "direct",
    "timezone": "Asia/Dubai",
    "postingTimes": [
      {
        "weekday": 1,
        "time": "09:00"
      },
      {
        "weekday": 3,
        "time": "18:30"
      },
      {
        "weekday": 5,
        "time": "12:00"
      }
    ],
    "nextFreeSlots": [
      "2026-11-16T05:00:00.000Z",
      "2026-11-18T14:30:00.000Z"
    ]
  },
  "error": null
}

المنشورات والتقويم

جدول ملف MP4 مكتملًا على الحسابات المتصلة، ثم تابع المنشورات وعدّلها وأعد محاولتها وانسخها أو ألغِها، واطّلع على أرقامها.

GET/api/v1/posts

المنشورات بدءًا بأحدث موعد مجدول، مع التصفية حسب الحالة أو الحساب أو المنصة أو نطاق زمني للمواعيد المجدولة. لا يُضبط `failureReason` إلا في المنشورات الفاشلة.

أداة MCP: list_posts

المعاملات

  • status"draft" | "ready" | "approved" | "scheduled" | "publishing" | "awaiting_creator" | "published" | "failed" | "cancelled"الاستعلاماختياري

    `ready` waits for approval; `awaiting_creator` waits for the person (e.g. their TikTok inbox).

  • accountIdstring (uuid)الاستعلاماختياري

    Only this account's posts.

  • platform"instagram" | "tiktok" | "linkedin" | "facebook" | "threads" | "youtube" | "pinterest"الاستعلاماختياري

    Only this platform's posts.

  • fromstring (date-time)الاستعلاماختياري

    Scheduled at or after this time (ISO 8601 with offset).

  • tostring (date-time)الاستعلاماختياري

    Scheduled before this time (ISO 8601 with offset).

  • limitintegerالاستعلاماختياري

    How many to return. (1–100, default 20)

مثال على الطلب

curl https://clips.lnr.ae/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "posts": [
      {
        "id": "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
        "platform": "instagram",
        "accountId": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
        "status": "scheduled",
        "caption": "Three things nobody tells you about cold brew.",
        "hashtags": [
          "coldbrew",
          "coffee"
        ],
        "scheduledFor": "2026-11-16T14:00:00.000Z",
        "publishedAt": null,
        "externalUrl": null,
        "failureReason": null,
        "videoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
      }
    ]
  },
  "error": null
}
POST/api/v1/posts

يجدول ملف MP4 مكتملًا (`videoId`، أو `storagePath` من المكتبة) على ما يصل إلى 3 حسابات، حساب واحد لكل منصة، مع تعليق لكل منصة. قيمة `when` هي "next_free_slot" (الافتراضية)، أو وقت بصيغة ISO، أو "now" للنشر خلال دقيقة تقريبًا (أداة publish_now). يجب أن يكون ملف المكتبة الذي رفعته قد أنهى فحص المحتوى (راجع «إكمال الرفع»). يُرجع معرّفات المنشورات الجديدة، وتكون `awaitingApproval` بقيمة true حين تراجع مساحة العمل المنشورات قبل نشرها.

أداة MCP: schedule_post

المعاملات

  • preview"1"الاستعلاماختياري

    `1` runs every check and returns `{ preview }` (what would happen) without changing anything.

محتوى الطلب

  • accountIdsarray of string (uuid)مطلوب

    (1–3 items)

  • captionsobjectمطلوب

    One caption per platform you post to.

  • videoIdstring (uuid)اختياري

    A finished video. Pass this or storagePath.

  • storagePathstringاختياري

    A workspace Library MP4, '<workspaceId>/library/<file>.mp4'. Pass this or videoId. (at most 400 characters)

  • titlestringاختياري

    Used as the YouTube, Pinterest and LinkedIn title and in the calendar. (at most 200 characters)

  • whenstringاختياري

    "next_free_slot" (default), "now", or an ISO 8601 time with offset at least 2 minutes ahead.

  • sendForReviewbooleanاختياري

    Hold the posts for the owner's approval. Review workspaces always hold API posts.

  • tiktokobjectاختياري

    Only when TikTok direct posting is on (delivery `direct`). Ask the person; never assume.

  • youtubeobjectاختياري

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "videoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "accountIds": [
      "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
      "d7e8f9a0-1b2c-4d3e-8f4a-5b6c7d8e9f0a"
    ],
    "captions": {
      "instagram": {
        "caption": "Three things nobody tells you about cold brew.",
        "hashtags": [
          "coldbrew",
          "coffee"
        ]
      },
      "tiktok": {
        "caption": "Cold brew, explained in 15 seconds"
      }
    },
    "when": "2026-11-16T18:00:00+04:00"
  }'

مثال على الاستجابة

HTTP 201
{
  "data": {
    "postIds": [
      "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
      "8b2d4f6a-1c3e-4a5b-9d7f-0e2a4c6b8d1f"
    ],
    "awaitingApproval": false
  },
  "error": null
}
GET/api/v1/posts/{id}

منشور واحد: حالته، وموعده المجدول ووقت نشره، ورابطه بعد نشره، وسبب فشله إن فشل.

أداة MCP: get_post

المعاملات

  • idstring (uuid)المسارمطلوب

    The post's id.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/posts/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
    "platform": "instagram",
    "accountId": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
    "status": "published",
    "caption": "Three things nobody tells you about cold brew.",
    "hashtags": [
      "coldbrew",
      "coffee"
    ],
    "scheduledFor": "2026-11-16T14:00:00.000Z",
    "publishedAt": "2026-11-16T14:00:41.000Z",
    "externalUrl": "https://www.instagram.com/reel/C9xYz12AbCd/",
    "failureReason": null,
    "videoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
  },
  "error": null
}
PATCH/api/v1/posts/{id}

ينقل منشورًا لم يُنشر بعد (`draft` أو `ready` أو `approved` أو `scheduled`) إلى موعد آخر، أو يستبدل تعليقه ووسومه، أو الاثنين معًا؛ ولا يتغير إلا ما ترسله. في مساحة عمل تراجع المنشورات، يعيد تغيير التعليق أو الوسوم المنشورَ المعتمد إلى المالك (`ready`)، أما تغيير الموعد فلا. لا يمكن تغيير الفيديو والحسابات والعنوان هنا: ألغِ المنشور وجدوله من جديد، أو انسخه.

أداة MCP: update_post

المعاملات

  • idstring (uuid)المسارمطلوب

    The post's id.

  • preview"1"الاستعلاماختياري

    `1` runs every check and returns `{ preview }` (what would happen) without changing anything.

محتوى الطلب

  • whenstring (date-time)اختياري

    ISO 8601 with offset, at least 2 minutes ahead, at most a year out.

  • captionstringاختياري

    (at most 5000 characters)

  • hashtagsarray of stringاختياري

    (at most 30 items)

مثال على الطلب

curl -X PATCH https://clips.lnr.ae/api/v1/posts/ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "when": "2026-11-17T19:30:00+04:00",
    "caption": "Cold brew: three things nobody tells you."
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
    "platform": "instagram",
    "accountId": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
    "status": "scheduled",
    "caption": "Cold brew: three things nobody tells you.",
    "hashtags": [
      "coldbrew",
      "coffee"
    ],
    "scheduledFor": "2026-11-17T15:30:00.000Z",
    "publishedAt": null,
    "externalUrl": null,
    "failureReason": null,
    "videoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
  },
  "error": null
}
DELETE/api/v1/posts/{id}

يلغي منشورًا لم يُنشر بعد (بانتظار الموافقة أو مجدول أو فاشل أو بانتظار الشخص). أما المنشور الجاري نشره أو المنشور فعلًا فلا يمكن إلغاؤه أو إزالته من المنصة من هنا؛ احذفه من المنصة نفسها.

أداة MCP: cancel_post

المعاملات

  • idstring (uuid)المسارمطلوب

    The post's id.

  • preview"1"الاستعلاماختياري

    `1` runs every check and returns `{ preview }` (what would happen) without changing anything.

مثال على الطلب

curl -X DELETE https://clips.lnr.ae/api/v1/posts/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
    "platform": "instagram",
    "accountId": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
    "status": "cancelled",
    "caption": "Three things nobody tells you about cold brew.",
    "hashtags": [
      "coldbrew",
      "coffee"
    ],
    "scheduledFor": "2026-11-16T14:00:00.000Z",
    "publishedAt": null,
    "externalUrl": null,
    "failureReason": null,
    "videoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
  },
  "error": null
}
POST/api/v1/posts/{id}/retry

يرسل المنشور الفاشل مجددًا بعد نحو 3 دقائق. يُرفض الطلب إذا كان حسابه يحتاج إلى إعادة ربط، أو إذا رفضت المنصة المنشور نهائيًا (عندها ألغِه وجدول الفيديو من جديد مع التغيير الذي تطلبه المنصة). بلا محتوى طلب.

أداة MCP: retry_post

المعاملات

  • idstring (uuid)المسارمطلوب

    The post's id.

  • preview"1"الاستعلاماختياري

    `1` runs every check and returns `{ preview }` (what would happen) without changing anything.

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/posts/ID/retry \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
    "platform": "instagram",
    "accountId": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
    "status": "scheduled",
    "caption": "Three things nobody tells you about cold brew.",
    "hashtags": [
      "coldbrew",
      "coffee"
    ],
    "scheduledFor": "2026-11-14T10:03:00.000Z",
    "publishedAt": null,
    "externalUrl": null,
    "failureReason": null,
    "videoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
  },
  "error": null
}
POST/api/v1/posts/{id}/approve

يوافق على منشور ينتظر مراجعة المالك، فيُجدوَل في وقته. يحتاج إلى مفتاح بصلاحية الموافقة: لا يُنشئه إلا مالك مساحة العمل، ويتوقف عن الموافقة إذا لم يعد صاحبه هو المالك. يُرفض الطلب إذا لم يكن المنشور بانتظار الموافقة أو فات وقته. بلا محتوى طلب.

أداة MCP: approve_post

المعاملات

  • idstring (uuid)المسارمطلوب

    The post's id.

  • preview"1"الاستعلاماختياري

    `1` runs every check and returns `{ preview }` (what would happen) without changing anything.

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/posts/ID/approve \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
    "status": "scheduled",
    "scheduledFor": "2026-11-16T14:00:00.000Z"
  },
  "error": null
}
POST/api/v1/posts/{id}/duplicate

يجدول فيديو هذا المنشور مرة أخرى، على حسابات أخرى أو في موعد جديد، بالقواعد نفسها المتبعة في «جدولة منشور أو نشره». التعليقات افتراضيًا هي تعليقات المنشور الأصلي. يذهب كل فيديو إلى حساب واحد لكل منصة، لذا تُرفض النسخة الموجهة إلى منصة جُدول عليها الفيديو أو نُشر فيها مسبقًا.

أداة MCP: duplicate_post

المعاملات

  • idstring (uuid)المسارمطلوب

    The post's id.

  • preview"1"الاستعلاماختياري

    `1` runs every check and returns `{ preview }` (what would happen) without changing anything.

محتوى الطلب

  • accountIdsarray of string (uuid)مطلوب

    (1–3 items)

  • whenstringاختياري

    "next_free_slot" (default), or an ISO 8601 time with offset at least 2 minutes ahead and at most a year out.

  • captionsobjectاختياري

    One caption per platform you post to.

  • sendForReviewbooleanاختياري
  • tiktokobjectاختياري

    Only when TikTok direct posting is on (delivery `direct`). Ask the person; never assume.

  • youtubeobjectاختياري

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/posts/ID/duplicate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountIds": [
      "d7e8f9a0-1b2c-4d3e-8f4a-5b6c7d8e9f0a"
    ],
    "when": "next_free_slot",
    "captions": {
      "tiktok": {
        "caption": "Cold brew, explained"
      }
    }
  }'

مثال على الاستجابة

HTTP 201
{
  "data": {
    "postIds": [
      "8b2d4f6a-1c3e-4a5b-9d7f-0e2a4c6b8d1f"
    ],
    "awaitingApproval": false
  },
  "error": null
}
GET/api/v1/posts/{id}/metrics

الأرقام التي جُمعت من المنصة بعد نحو 1 و3 و7 أيام من النشر. أرقام المنصة الحقيقية فقط: القائمة الفارغة تعني أنه لم يُجمع شيء بعد، وnull يعني أن المنصة لا تقدّم هذا المقياس.

أداة MCP: get_post_metrics

المعاملات

  • idstring (uuid)المسارمطلوب

    The post's id.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/posts/ID/metrics \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "post": {
      "id": "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
      "platform": "instagram",
      "accountId": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
      "status": "published",
      "caption": "Three things nobody tells you about cold brew.",
      "hashtags": [
        "coldbrew",
        "coffee"
      ],
      "scheduledFor": "2026-11-16T14:00:00.000Z",
      "publishedAt": "2026-11-16T14:00:41.000Z",
      "externalUrl": "https://www.instagram.com/reel/C9xYz12AbCd/",
      "failureReason": null,
      "videoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
    },
    "snapshots": [
      {
        "window": "1d",
        "capturedAt": "2026-11-17T14:05:00.000Z",
        "views": 4210,
        "reach": 3880,
        "likes": 312,
        "comments": 18,
        "shares": 25,
        "saves": 41,
        "avgWatchTimeMs": 9400
      }
    ],
    "note": "Numbers come from the platform about 1, 3 and 7 days after posting."
  },
  "error": null
}
GET/api/v1/calendar

المنشورات الواقعة في الأيام المحلية من `from` إلى `to` (شاملةً، بحد أقصى 92 يومًا) حسب موعدها المجدول، أو وقت نشرها إن لم يكن لها موعد، بالمنطقة الزمنية لمساحة العمل: منطقة أول حساب متصل، كما في صفحة التقويم، ما لم تمرّر منطقة أخرى. المنشورات الملغاة لا تظهر، وتكون `truncated` بقيمة true إذا تجاوز العدد 1,000 منشور.

أداة MCP: get_calendar

المعاملات

  • fromstring (date)الاستعلاممطلوب

    First day, YYYY-MM-DD.

  • tostring (date)الاستعلاممطلوب

    Last day, YYYY-MM-DD.

  • timezonestringالاستعلاماختياري

    An IANA timezone such as Europe/London.

مثال على الطلب

curl "https://clips.lnr.ae/api/v1/calendar?from=DATE&to=DATE" \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "timezone": "Asia/Dubai",
    "from": "2026-11-16",
    "to": "2026-11-22",
    "posts": [
      {
        "id": "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
        "platform": "instagram",
        "accountId": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
        "status": "scheduled",
        "caption": "Three things nobody tells you about cold brew.",
        "hashtags": [
          "coldbrew",
          "coffee"
        ],
        "scheduledFor": "2026-11-16T14:00:00.000Z",
        "publishedAt": null,
        "externalUrl": null,
        "failureReason": null,
        "videoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
        "videoTitle": "Cold brew facts",
        "localDate": "2026-11-16",
        "localTime": "18:00"
      }
    ],
    "truncated": false
  },
  "error": null
}

العلامة والشخصيات

كيف تبدو مساحة العمل وبأي صوت تتحدث، ومن يظهر في فيديوهاتها. كل فيديو وتعليق وفكرة يلتزم بهوية العلامة.

GET/api/v1/brand

هوية العلامة الافتراضية (أو التي يحددها `kitId`) بألوانها ونمط الصوت ونبرة الكلام والكلمات المحظورة، ورابط للشعار صالح لمدة 10 دقائق، إضافةً إلى قائمة بكل هويات العلامة في مساحة العمل.

أداة MCP: get_brand_kit

المعاملات

  • kitIdstring (uuid)الاستعلاماختياري

    One of the workspace's kits. Omit for the default.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/brand \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "kit": {
      "id": "5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
      "name": "Ember Bakery",
      "isDefault": true,
      "colors": {
        "accent": "#ff6b4a",
        "background": "#1f1d36",
        "text": "#ffffff"
      },
      "voice": {
        "id": "warm-deep",
        "label": "Warm and deep"
      },
      "tone": "Speak like a friendly expert: plain words, short sentences, one idea at a time. Confident, never pushy.",
      "bannedWords": [
        "cheap",
        "best ever"
      ],
      "website": "https://emberbakery.com",
      "logoUrl": "https://media.clips.lnr.ae/storage/v1/object/sign/media/…?token=…",
      "updatedAt": "2026-11-12T09:41:00.000Z"
    },
    "kits": [
      {
        "id": "5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
        "name": "Ember Bakery",
        "accent": "#ff6b4a",
        "isDefault": true
      },
      {
        "id": "6d2e3f4a-5b6c-4d7e-8f9a-0b1c2d3e4f5a",
        "name": "Ember Catering",
        "accent": "#2bb3a3",
        "isDefault": false
      }
    ]
  },
  "error": null
}
PATCH/api/v1/brand

غيّر ما تشاء من الاسم والألوان (كل مفتاح على حدة) والصوت والنبرة والكلمات المحظورة؛ والحقول التي لا ترسلها تبقى كما هي. `bannedWords` تستبدل القائمة كاملةً. يعدّل الهوية الافتراضية ما لم يحدد `kitId` هوية أخرى. إن لم تكن لمساحة العمل هوية بعد، فأرسل اسمًا لإنشائها. يخضع للتحقق نفسه المتبع في صفحة هوية العلامة.

أداة MCP: update_brand_kit

محتوى الطلب

  • kitIdstring (uuid)اختياري
  • namestringاختياري

    (1–60 characters)

  • colorsobjectاختياري
  • voice"warm-deep" | "bright-energetic" | "clear-neutral" | "soft-friendly" | "bold-dramatic"اختياري
  • tonestringاختياري

    (at most 500 characters)

  • bannedWordsarray of stringاختياري

    (at most 50 items)

مثال على الطلب

curl -X PATCH https://clips.lnr.ae/api/v1/brand \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "colors": {
      "accent": "#ff6b4a"
    },
    "tone": "Warm, plain and short. Talk to the viewer as '\''you'\''.",
    "bannedWords": [
      "cheap",
      "best ever"
    ]
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "kit": {
      "id": "5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
      "name": "Ember Bakery",
      "isDefault": true,
      "colors": {
        "accent": "#ff6b4a",
        "background": "#1f1d36",
        "text": "#ffffff"
      },
      "voice": {
        "id": "warm-deep",
        "label": "Warm and deep"
      },
      "tone": "Warm, plain and short. Talk to the viewer as 'you'.",
      "bannedWords": [
        "cheap",
        "best ever"
      ],
      "website": "https://emberbakery.com",
      "logoUrl": "https://media.clips.lnr.ae/storage/v1/object/sign/media/…?token=…",
      "updatedAt": "2026-11-12T09:41:00.000Z"
    },
    "kits": [
      {
        "id": "5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
        "name": "Ember Bakery",
        "accent": "#ff6b4a",
        "isDefault": true
      },
      {
        "id": "6d2e3f4a-5b6c-4d7e-8f9a-0b1c2d3e4f5a",
        "name": "Ember Catering",
        "accent": "#2bb3a3",
        "isDefault": false
      }
    ]
  },
  "error": null
}
GET/api/v1/characters

شخصيات مساحة العمل الخاصة (المبنية من طاقم الشخصيات) وشخصياتها المرسومة مع وضعياتها. الصور روابط صالحة لمدة 10 دقائق. اذكر اسم شخصية في وصف الفيديو لتظهر فيه.

أداة MCP: list_characters

مثال على الطلب

curl https://clips.lnr.ae/api/v1/characters \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "characters": [
      {
        "id": "7e3f4a5b-6c7d-4e8f-9a0b-1c2d3e4f5a6b",
        "name": "Mia",
        "base": "woman",
        "look": "flat",
        "colors": {
          "skin": "#e9b08a",
          "hair": "#2c2420",
          "outfit": "#ff6b4a",
          "outfitAccent": null
        },
        "accessory": "glasses",
        "about": "Head baker. Calm, funny, explains every step.",
        "faceUrl": null
      }
    ],
    "illustrated": [
      {
        "id": "8f4a5b6c-7d8e-4f9a-0b1c-2d3e4f5a6b7c",
        "name": "Leo",
        "description": "A cheerful delivery cyclist in a red cap",
        "approved": true,
        "referenceUrl": "https://media.clips.lnr.ae/storage/v1/object/sign/media/…?token=…",
        "poses": [
          {
            "name": "Waving",
            "url": "https://media.clips.lnr.ae/storage/v1/object/sign/media/…?token=…"
          },
          {
            "name": "Pointing",
            "url": "https://media.clips.lnr.ae/storage/v1/object/sign/media/…?token=…"
          }
        ]
      }
    ]
  },
  "error": null
}
POST/api/v1/characters

أضف شخصية خاصة بمساحة العمل من طاقم الشخصيات، حتى 24 شخصية. مجاني: لا يرسم الذكاء الاصطناعي شيئًا. أما الشخصيات المرسومة فتُصنع في التطبيق.

أداة MCP: create_character

محتوى الطلب

  • namestringمطلوب

    Unique in the workspace. (1–40 characters)

  • base"kid" | "girl" | "woman" | "man" | "gran" | "grandpa" | "blob" | "robot" | "cat"مطلوب

    The cast figure they're built on.

  • look"flat" | "3d"اختياري

    Flat cartoon (default) or 3D toon figure.

  • colorsobjectاختياري

    Colours as #rrggbb; null for the figure's default.

  • accessory"none" | "glasses" | "sunglasses" | "cap" | "headphones" | "bow" | "crown" | "party-hat"اختياري
  • aboutstringاختياري

    One line on who they are; the AI director uses it when writing them into a video. (at most 200 characters)

  • facePathstringاختياري

    A picture already in the Library to use as their face. Once set it is their locked reference.

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/characters \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mia",
    "base": "woman",
    "colors": {
      "hair": "#2c2420",
      "outfit": "#ff6b4a"
    },
    "accessory": "glasses",
    "about": "Head baker. Calm, funny, explains every step."
  }'

مثال على الاستجابة

HTTP 201
{
  "data": {
    "id": "7e3f4a5b-6c7d-4e8f-9a0b-1c2d3e4f5a6b",
    "name": "Mia",
    "base": "woman",
    "look": "flat",
    "colors": {
      "skin": "#e9b08a",
      "hair": "#2c2420",
      "outfit": "#ff6b4a",
      "outfitAccent": null
    },
    "accessory": "glasses",
    "about": "Head baker. Calm, funny, explains every step.",
    "faceUrl": null
  },
  "error": null
}
PATCH/api/v1/characters/{id}

غيّر أيًّا من حقول الشخصية؛ والحقول التي لا ترسلها تبقى كما هي. الوجه المضبوط مسبقًا مرجع مقفل، ولا يمكن استبداله بوجه يصنعه الذكاء الاصطناعي.

أداة MCP: update_character

المعاملات

  • idstring (uuid)المسارمطلوب

    The character's id, from List characters.

محتوى الطلب

  • namestringاختياري

    Unique in the workspace. (1–40 characters)

  • base"kid" | "girl" | "woman" | "man" | "gran" | "grandpa" | "blob" | "robot" | "cat"اختياري

    The cast figure they're built on.

  • look"flat" | "3d"اختياري

    Flat cartoon (default) or 3D toon figure.

  • colorsobjectاختياري

    Colours as #rrggbb; null for the figure's default.

  • accessory"none" | "glasses" | "sunglasses" | "cap" | "headphones" | "bow" | "crown" | "party-hat"اختياري
  • aboutstringاختياري

    One line on who they are; the AI director uses it when writing them into a video. (at most 200 characters)

  • facePathstringاختياري

    A picture already in the Library to use as their face. Once set it is their locked reference.

مثال على الطلب

curl -X PATCH https://clips.lnr.ae/api/v1/characters/ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "look": "3d",
    "about": "Head baker and owner. Calm, funny, explains every step."
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "7e3f4a5b-6c7d-4e8f-9a0b-1c2d3e4f5a6b",
    "name": "Mia",
    "base": "woman",
    "look": "3d",
    "colors": {
      "skin": "#e9b08a",
      "hair": "#2c2420",
      "outfit": "#ff6b4a",
      "outfitAccent": null
    },
    "accessory": "glasses",
    "about": "Head baker and owner. Calm, funny, explains every step.",
    "faceUrl": null
  },
  "error": null
}
DELETE/api/v1/characters/{id}

يزيل إحدى شخصيات مساحة العمل الخاصة. تبقى في الفيديوهات المصنوعة مسبقًا. لا يمكن التراجع عن ذلك.

أداة MCP: delete_character

المعاملات

  • idstring (uuid)المسارمطلوب

    The character's id, from List characters.

مثال على الطلب

curl -X DELETE https://clips.lnr.ae/api/v1/characters/ID \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "id": "7e3f4a5b-6c7d-4e8f-9a0b-1c2d3e4f5a6b"
  },
  "error": null
}

الاستهلاك والتحليلات والإشعارات

ما تبقّى لمساحة العمل من رصيد وحصص، وأداء منشوراتها على كل منصة، والتنبيهات التي تحتاج إلى انتباهك.

GET/api/v1/usage

خطة مساحة العمل وما استهلكته: الرصيد المستخدم والمتبقي هذا الشهر مع تاريخ التجديد (يستهلك فيديو الذكاء الاصطناعي 10 والفيديو المرسوم 20)، ورصيد الحزم، وعدد فيديوهات الذكاء الاصطناعي المصنوعة، وطلبات الكتابة بالذكاء الاصطناعي المستخدمة اليوم مقابل الحد اليومي (تستهلكها الأفكار والتعليقات)، ومنشورات هذا الأسبوع (من الاثنين إلى الأحد، بتوقيت UTC) مقابل الهدف الأسبوعي. راجعه قبل أي طلب ذكاء اصطناعي.

أداة MCP: get_usage

مثال على الطلب

curl https://clips.lnr.ae/api/v1/usage \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "plan": {
      "id": "growth",
      "name": "Growth"
    },
    "credits": {
      "used": 140,
      "limit": 360,
      "left": 220,
      "bonus": 10,
      "trial": false,
      "periodStart": "2026-11-01T00:00:00.000Z",
      "resetsAt": "2026-12-01T00:00:00.000Z"
    },
    "packCredits": {
      "balance": 100,
      "expiresAt": "2027-02-08T00:00:00.000Z"
    },
    "aiVideos": {
      "made": 12,
      "canMakeAbout": 32
    },
    "aiHelp": {
      "usedToday": 18,
      "dailyLimit": 400,
      "resetsAt": "2026-11-15T00:00:00.000Z"
    },
    "posts": {
      "thisWeek": 4,
      "weeklyGoal": 7,
      "weekStart": "2026-11-09T00:00:00.000Z",
      "weekEnd": "2026-11-16T00:00:00.000Z"
    }
  },
  "error": null
}
GET/api/v1/analytics

أداء المنشورات خلال آخر 7 أو 30 أو 90 يومًا: المجاميع، وحسب كل منصة وكل حساب، وأكثر خمسة منشورات مشاهدةً، وأفضل يوم وساعة للنشر (حسب وسيط المشاهدات، متى كان للساعة منشوران مقيسان). كل رقم هو ما أبلغت عنه المنصة، والرقم الذي لا تقدّمه المنصة يكون null، لا 0 أبدًا.

أداة MCP: get_analytics

المعاملات

  • days7 | 30 | 90الاستعلاماختياري

    The range, counted back from now. (default 30)

مثال على الطلب

curl https://clips.lnr.ae/api/v1/analytics \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "days": 30,
    "from": "2026-10-15T12:00:00.000Z",
    "to": "2026-11-14T12:00:00.000Z",
    "totals": {
      "posts": 18,
      "measured": 16,
      "figures": {
        "views": 48210,
        "reach": 39120,
        "likes": 2311,
        "comments": 184,
        "shares": 96,
        "saves": 140
      }
    },
    "platforms": [
      {
        "platform": "instagram",
        "posts": 10,
        "measured": 9,
        "figures": {
          "views": 21400,
          "reach": 18050,
          "likes": 1290,
          "comments": 92,
          "shares": 61,
          "saves": 140
        }
      },
      {
        "platform": "linkedin",
        "posts": 2,
        "measured": 1,
        "figures": {
          "views": 1240,
          "reach": null,
          "likes": 41,
          "comments": 7,
          "shares": null,
          "saves": null
        }
      },
      {
        "platform": "tiktok",
        "posts": 6,
        "measured": 6,
        "figures": {
          "views": 25570,
          "reach": 21070,
          "likes": 980,
          "comments": 85,
          "shares": 35,
          "saves": null
        }
      }
    ],
    "accounts": [
      {
        "id": "c4a1e2f3-5b6d-4e7f-8a9b-0c1d2e3f4a5b",
        "platform": "instagram",
        "handle": "@emberbakery",
        "posts": 10,
        "measured": 9,
        "figures": {
          "views": 21400,
          "reach": 18050,
          "likes": 1290,
          "comments": 92,
          "shares": 61,
          "saves": 140
        }
      },
      {
        "id": "d7e8f9a0-1b2c-4d3e-8f4a-5b6c7d8e9f0a",
        "platform": "tiktok",
        "handle": "@emberbakery",
        "posts": 6,
        "measured": 6,
        "figures": {
          "views": 25570,
          "reach": 21070,
          "likes": 980,
          "comments": 85,
          "shares": 35,
          "saves": null
        }
      }
    ],
    "topPosts": [
      {
        "id": "3f8f6c1e-2b4a-4c3d-9e5f-1a2b3c4d5e6f",
        "platform": "tiktok",
        "account": "@emberbakery",
        "title": "Sourdough in 30 seconds",
        "publishedAt": "2026-11-03T17:00:00.000Z",
        "url": "https://www.tiktok.com/@emberbakery/video/7312…",
        "measuredAt": "2026-11-10T17:05:00.000Z",
        "figures": {
          "views": 9800,
          "reach": 8100,
          "likes": 412,
          "comments": 31,
          "shares": 18,
          "saves": null
        }
      },
      {
        "id": "8b2d4f6a-1c3e-4a5b-9d7f-0e2a4c6b8d1f",
        "platform": "instagram",
        "account": "@emberbakery",
        "title": "Three proofing mistakes",
        "publishedAt": "2026-10-29T18:00:00.000Z",
        "url": "https://www.instagram.com/reel/C9…",
        "measuredAt": "2026-11-05T18:04:00.000Z",
        "figures": {
          "views": 6100,
          "reach": 5200,
          "likes": 380,
          "comments": 22,
          "shares": 14,
          "saves": 51
        }
      }
    ],
    "bestTimes": {
      "timezone": "Asia/Dubai",
      "slots": [
        {
          "weekday": "Tuesday",
          "hour": 18,
          "medianViews": 4200,
          "posts": 3
        },
        {
          "weekday": "Saturday",
          "hour": 10,
          "medianViews": 3100,
          "posts": 2
        }
      ]
    }
  },
  "error": null
}
GET/api/v1/notifications

تنبيهات مساحة العمل هذه من قائمة الجرس، من الأحدث إلى الأقدم، كما يراها منشئ المفتاح: فيديو جاهز، أو منشور فشل أو نُشر، أو دفعة فشلت. لا تُدرج إشعارات المجتمع الشخصية أبدًا.

أداة MCP: list_notifications

المعاملات

  • limitintegerالاستعلاماختياري

    How many to return. (1–100, default 20)

  • unread"true" | "false"الاستعلاماختياري

    `true` for unread notices only.

مثال على الطلب

curl https://clips.lnr.ae/api/v1/notifications \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "notifications": [
      {
        "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "title": "Your video is ready",
        "body": "\"Sourdough in 30 seconds\" is ready to review.",
        "link": "https://clips.lnr.ae/app/films",
        "read": false,
        "createdAt": "2026-11-14T09:12:00.000Z"
      },
      {
        "id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
        "title": "A post didn't go out",
        "body": "Instagram needs you to reconnect @emberbakery.",
        "link": "https://clips.lnr.ae/app/accounts",
        "read": true,
        "createdAt": "2026-11-12T18:01:00.000Z"
      }
    ],
    "unread": 1
  },
  "error": null
}
POST/api/v1/notifications/read

يعلّم التنبيهات التي تسردها كمقروءة، أو كل التنبيهات غير المقروءة إن لم ترسل أي ids. يُرجع عدد ما تغيّر.

أداة MCP: mark_notifications_read

محتوى الطلب

  • idsarray of string (uuid)اختياري

    (1–100 items)

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/notifications/read \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
    ]
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "marked": 1
  },
  "error": null
}

الأفكار والتعليقات

مساعدة بالذكاء الاصطناعي في اختيار ما تنشره وكيف تصوغه. كل طلب يُحتسب من الحصة اليومية لطلبات الكتابة بالذكاء الاصطناعي، ولا يستهلك الرصيد أبدًا.

GET/api/v1/ideas

أفكار الفيديو الخمس لهذا الأسبوع (العنوان والجملة الافتتاحية والزاوية والصيغة)، إن كانت قد أُنشئت. مجاني: لا ينشئ أفكارًا جديدة أبدًا.

أداة MCP: list_ideas

مثال على الطلب

curl https://clips.lnr.ae/api/v1/ideas \
  -H "Authorization: Bearer YOUR_API_KEY"

مثال على الاستجابة

HTTP 200
{
  "data": {
    "week": "2026-11-09",
    "ideas": [
      {
        "title": "Three proofing mistakes",
        "hook": "Your dough isn't lazy. You're rushing it.",
        "angle": "Side-by-side loaves show what under-proofing does, then the one-finger test that fixes it.",
        "format": {
          "id": "explainers",
          "label": "Explainers and science"
        }
      },
      {
        "title": "Behind the 5am bake",
        "hook": "This is what a bakery looks like before you're awake.",
        "angle": "A fast walk through the first hour of the day, ending on the first tray out of the oven.",
        "format": {
          "id": "uploads",
          "label": "My own videos"
        }
      }
    ],
    "createdAt": "2026-11-10T08:02:11.000Z"
  },
  "error": null
}
POST/api/v1/ideas

ينشئ خمس أفكار جديدة لهذا الأسبوع من صيغ مساحة العمل ومنصاتها وهوية علامتها، لتحل محل أفكار هذا الأسبوع. يكلّف طلب كتابة واحدًا بالذكاء الاصطناعي من الحصة اليومية، لا من الرصيد، ويُرفض بالرمز `plan_limit` إذا نفدت حصة اليوم. يستغرق حتى دقيقة.

أداة MCP: generate_ideas

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/ideas \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

مثال على الاستجابة

HTTP 201
{
  "data": {
    "week": "2026-11-09",
    "ideas": [
      {
        "title": "Three proofing mistakes",
        "hook": "Your dough isn't lazy. You're rushing it.",
        "angle": "Side-by-side loaves show what under-proofing does, then the one-finger test that fixes it.",
        "format": {
          "id": "explainers",
          "label": "Explainers and science"
        }
      },
      {
        "title": "Behind the 5am bake",
        "hook": "This is what a bakery looks like before you're awake.",
        "angle": "A fast walk through the first hour of the day, ending on the first tray out of the oven.",
        "format": {
          "id": "uploads",
          "label": "My own videos"
        }
      }
    ],
    "createdAt": "2026-11-14T12:00:41.000Z"
  },
  "error": null
}
POST/api/v1/captions

تعليق ووسوم لكل منصة، بنبرة العلامة، انطلاقًا من موضوع أو من أحد فيديوهات مساحة العمل. كل منصة تكلّف طلب كتابة واحدًا بالذكاء الاصطناعي من الحصة اليومية، لا من الرصيد؛ وإن لم يتبقَّ ما يكفي لكل المنصات المطلوبة، يُرفض الطلب بالرمز `plan_limit` قبل استهلاك أي شيء.

أداة MCP: write_captions

محتوى الطلب

  • topicstringاختياري

    What the post is about. Required unless videoId is given. (at most 200 characters)

  • descriptionstringاختياري

    More to write from. Nothing that isn't here is invented. (at most 1000 characters)

  • videoIdstring (uuid)اختياري

    One of the workspace's videos; its title is used when there's no topic.

  • platformsarray of "instagram" | "tiktok" | "linkedin"اختياري

    Default: all three. (1–3 items)

مثال على الطلب

curl -X POST https://clips.lnr.ae/api/v1/captions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "videoId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "description": "New winter loaf with roasted chestnuts. In store Friday.",
    "platforms": [
      "instagram",
      "linkedin"
    ]
  }'

مثال على الاستجابة

HTTP 200
{
  "data": {
    "captions": {
      "instagram": {
        "caption": "Our winter loaf is back, now with roasted chestnuts.\nIn store from Friday, while the trays last.",
        "hashtags": [
          "#Sourdough",
          "#WinterBaking",
          "#DubaiBakery"
        ],
        "full": "Our winter loaf is back, now with roasted chestnuts.\nIn store from Friday, while the trays last.\n\n#Sourdough #WinterBaking #DubaiBakery"
      },
      "linkedin": {
        "caption": "Seasonal products give regulars a reason to come back.\n\nOur winter loaf returns on Friday with roasted chestnuts, and we filmed the first bake to show how it's made.",
        "hashtags": [
          "#SmallBusiness",
          "#Bakery"
        ],
        "full": "Seasonal products give regulars a reason to come back.\n\nOur winter loaf returns on Friday with roasted chestnuts, and we filmed the first bake to show how it's made.\n\n#SmallBusiness #Bakery"
      }
    },
    "notWritten": [],
    "aiCallsLeftToday": 380
  },
  "error": null
}