πŸ€– API Khusus Agent AI

Ready for AI Agents

API canggih untuk mempermudah Agent AI (seperti GPT-4o, Claude, Gemini, LangChain, n8n, AutoGPT, atau Worker script) menjadwalkan dan mempublikasikan video secara otomatis ke YouTube Shorts, TikTok, Facebook Reels, dan Instagram Reels.

πŸ”‘ Kredensial & Konfigurasi Endpoint

https://bobo.buatcvgratis.web.id/api/agent.php
123123
πŸ’‘ Otentikasi: Kirim token melalui HTTP Header Authorization: Bearer 123123, Header X-API-Key: 123123, atau URL Parameter ?token=123123.

πŸ’» Contoh Integrasi Cepat untuk Agent AI

Contoh Agent AI Python menjadwalkan video hasil generate AI (Runway/Sora/Luma/Heygen) hanya dengan menyertakan URL video:

import requests

API_URL = "https://bobo.buatcvgratis.web.id/api/agent.php"
API_TOKEN = "123123"

headers = {
    "Authorization": f"Bearer {API_TOKEN}",
    "Content-Type": "application/json"
}

# ── Contoh A: Upload File Video dari Komputer Lokal ke Hosting ──
with open("video_saya.mp4", "rb") as video_file:
    files = {"video": ("video_saya.mp4", video_file, "video/mp4")}
    data = {
        "action": "schedule",
        "title": "Bobo Panda Dari File Lokal πŸΌπŸ“",
        "description": "Video diupload langsung dari PC lokal ke hosting!",
        "platforms": "youtube, tiktok, facebook",
        "hashtags": "#Shorts, #FYP, #BoboDePanda",
        "scheduled_at": "+2 hours", # Tayang 2 jam lagi
        "post_immediately": "false"
    }
    res = requests.post(API_URL, headers={"Authorization": f"Bearer {API_TOKEN}"}, data=data, files=files)
    print("Upload Lokal Sukses:", res.json())

# ── Contoh B: Menjadwalkan via URL Video Remote (Hasil AI) ──
payload = {
    "action": "schedule",
    "title": "Bobo Panda Belajar Coding AI πŸΌπŸ’»",
    "description": "Keseruan Bobo panda belajar coding AI hari ini!\n#BoboDePanda #AI",
    "video_url": "https://cdn.example.com/generated_video.mp4",
    "platforms": ["youtube", "tiktok", "facebook"],
    "hashtags": ["#Shorts", "#BoboDePanda", "#FYP", "#Trending"],
    "scheduled_at": "+2 hours",
    "post_immediately": False
}
res2 = requests.post(API_URL, json=payload, headers={"Authorization": f"Bearer {API_TOKEN}"})
print("Jadwal URL Sukses:", res2.json())

Contoh Agent AI Node.js / TypeScript menggunakan fetch:

const API_URL = 'https://bobo.buatcvgratis.web.id/api/agent.php';
const API_TOKEN = '123123';

async function scheduleAIVideo() {
  const payload = {
    action: 'schedule',
    title: 'Bobo De Panda Senam Pagi 🐼🀸',
    description: 'Rutinitas senam pagi Bobo bersama kawan-kawan.',
    video_url: 'https://cdn.example.com/generated_reel.mp4',
    platforms: ['youtube', 'tiktok', 'facebook'],
    hashtags: ['#Shorts', '#FYP', '#BoboDePanda'],
    scheduled_at: '+1 hour', // atau waktu spesifik ISO8601
    post_immediately: false
  };

  const res = await fetch(API_URL, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${API_TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(payload)
  });

  const result = await res.json();
  console.log('Jadwal Video Berhasil:', result);
}

scheduleAIVideo();

Contoh penjadwalan via cURL Terminal:

# Opsi 1: Upload File Video Lokal dari PC/Server Lokal ke Hosting
curl -X POST "https://bobo.buatcvgratis.web.id/api/agent.php" \
  -H "Authorization: Bearer 123123" \
  -F "action=schedule" \
  -F "title=Bobo Panda Main Bola ⚽" \
  -F "platforms=youtube, tiktok, facebook" \
  -F "hashtags=#Shorts, #FYP, #Bobo" \
  -F "scheduled_at=+2 hours" \
  -F "video=@/path/ke/video_lokal.mp4"

# Opsi 2: Kirim URL Video Remote (JSON Payload)
curl -X POST "https://bobo.buatcvgratis.web.id/api/agent.php" \
  -H "Authorization: Bearer 123123" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "schedule",
    "title": "Bobo Panda Berselancar πŸ„β€β™‚οΈ",
    "description": "Video petualangan Bobo De Panda!",
    "video_url": "https://cdn.example.com/video.mp4",
    "platforms": ["youtube", "tiktok", "facebook"],
    "hashtags": ["#Shorts", "#FYP", "#Viral"],
    "scheduled_at": "+3 hours"
  }'

Schema Tool Calling resmi yang dapat langsung di-import ke OpenAI GPT, Claude, atau LangChain:

{
  "type": "function",
  "function": {
    "name": "schedule_video",
    "description": "Upload and schedule a video to social media platforms (YouTube Shorts, TikTok, Facebook Reels, Instagram Reels) or post it immediately.",
    "parameters": {
      "type": "object",
      "properties": {
        "title": { "type": "string", "description": "The video title / caption." },
        "description": { "type": "string", "description": "The detailed video description." },
        "video_url": { "type": "string", "description": "Direct HTTP/HTTPS URL of the MP4 video file to download and schedule." },
        "platforms": {
          "type": "array",
          "items": { "type": "string", "enum": ["youtube", "tiktok", "facebook", "instagram"] },
          "description": "Target social platforms."
        },
        "hashtags": { "type": "array", "items": { "type": "string" }, "description": "Hashtags array." },
        "scheduled_at": { "type": "string", "description": "WIB time or relative offset e.g. '+2 hours', 'tomorrow 10:00', or 'now'." },
        "post_immediately": { "type": "boolean", "description": "If true, dispatches immediately without waiting for cron." }
      },
      "required": ["title", "platforms"]
    }
  }
}
πŸ” Buka Full JSON Tool Spec πŸ“„ Buka OpenAPI 3.0 Spec

πŸ“š Daftar Lengkap Aksi Endpoint API

POST ?action=schedule (Upload & Jadwalkan Video Baru)

Mendownload video via URL remote (atau multipart file upload), menyimpan metadata, dan membuat jadwal penayangan ke platform yang dipilih.

Parameter Tipe Wajib? Keterangan
title String Wajib Judul video yang akan ditampilkan di platform.
platforms Array / String Wajib Daftar platform target: ["youtube", "tiktok", "facebook", "instagram"] atau "all".
video_url String (URL) Opsional* URL file video MP4 di web/cloud (otomatis diunduh oleh server Bobo). Sangat praktis untuk AI Agent!
video_id String Opsional* Gunakan ID video yang sudah ada di library untuk dijadwalkan ulang.
video File Binary Opsional* Upload file video MP4 langsung via form-data.
scheduled_at String Opsional Waktu tayang dalam WIB (UTC+7). Menerima string relatif seperti "+1 hour", "+30 minutes", "tomorrow 14:00", format standar "YYYY-MM-DD HH:MM:SS", atau "now".
hashtags Array / String Opsional Contoh: ["#Shorts", "#BoboDePanda", "#FYP"] atau "#Shorts #FYP".
post_immediately Boolean Opsional Jika true, video langsung diproses dan dikirim ke platform tanpa menunggu cron.
*Sediakan salah satu dari: video_url, video_id, atau video.
GET ?action=list_schedules (Lihat & Filter Antrean Jadwal)

Mengambil daftar jadwal penayangan yang tersimpan beserta metadata video dan status penayangan.

Query ParamTipeKeterangan
statusStringFilter status: pending, posted, failed, processing.
platformStringFilter platform: youtube, tiktok, facebook, instagram.
qStringPencarian kata kunci pada judul atau hashtag.
limitIntegerJumlah maksimal data yang diambil (default: 50, max: 100).
offsetIntegerPagination offset (default: 0).
GET ?action=get_schedule&schedule_id={id} (Detail Spesifik Jadwal)

Mengambil detail satu jadwal tertentu, termasuk status, ID remote hasil posting di media sosial, log pengiriman, dan error message jika gagal.

POST ?action=post_now (Kirim Video Sekarang Secara Instan)

Body: {"schedule_id": "schedule-xxxx"}. Memaksa pengiriman video segera tanpa menunggu waktu cron tiba.

POST ?action=edit_schedule (Ubah Waktu atau Jalur Provider)

Body: {"schedule_id": "...", "scheduled_at": "+3 hours", "provider": "buffer"}. Mengubah waktu penayangan atau jalur pengiriman. Jika status sebelumnya failed, otomatis di-reset ke pending.

POST ?action=delete_schedule (Hapus / Batalkan Jadwal)

Body: {"schedule_id": "..."}. Membatalkan dan menghapus antrean jadwal penayangan.

GET ?action=status (Status Sistem, Waktu Server WIB, & Provider)

Memberitahu Agent AI waktu aktif server (WIB), total antrean jadwal yang tertunda, dan kesiapan provider (YouTube Direct, Buffer, Composio).