Cara pakai Ezkielyna API di Google Apps Script (Google Sheets, Docs, Gmail)

Apps Script bisa memanggil API apa pun lewat UrlFetchApp. Dengan Ezkielyna API kamu bisa membuat fungsi AI di Google Sheets, merangkum email Gmail atau mengisi dokumen otomatis.

Satu key bisa dipakai untuk 313 model; contoh harga per 2026-11-12: DeepSeek V4.1 Flash Rp600 per 1 juta token input dan Rp2.400 output.

Diperbarui dari data live · Sumber: daftar model · tabel harga · halaman status

Yang kamu butuhkan

  • Akun Google (Sheets, Docs atau Gmail)
  • API key Ezkielyna

Langkah-langkah

  1. 1Buat API key

    Masuk ke https://api.ezkielyna.store, isi saldo dengan Ezkielyna API Credit (atau aktifkan paket Flash Max, Luna atau Claude Pack), lalu buat key di menu API Keys. Pilih grup Auto kalau ingin memakai teks, Claude, GPT, Grok, gambar dan video dengan satu key (grup Pro 3x untuk jalur cadangan Claude dan GPT dipilih sendiri, tidak ikut di Auto).

  2. 2Buka editor Apps Script

    Di Google Sheets buka Ekstensi → Apps Script. Proyek baru terbuka dengan file Code.gs.

  3. 3Simpan key di Script Properties

    Buka Project Settings (ikon roda gigi) → Script Properties → Add script property. Isi nama EZK_API_KEY dan nilai key-mu, supaya key tidak tertulis di kode.

  4. 4Tempel fungsi AI

    Ganti isi Code.gs dengan kode ini lalu simpan.

    Code.gs
    const EZK_BASE = "https://api.ezkielyna.store/v1";
    
    function askAI(prompt, model) {
      const key = PropertiesService.getScriptProperties().getProperty("EZK_API_KEY");
      const res = UrlFetchApp.fetch(EZK_BASE + "/chat/completions", {
        method: "post",
        contentType: "application/json",
        headers: { Authorization: "Bearer " + key },
        payload: JSON.stringify({
          model: model || "deepseek-v4.1-flash",
          messages: [{ role: "user", content: String(prompt) }],
        }),
        muteHttpExceptions: true,
      });
      const data = JSON.parse(res.getContentText());
      if (res.getResponseCode() !== 200) throw new Error(data.error ? data.error.message : res.getContentText());
      return data.choices[0].message.content;
    }
    
    /** Di sel Google Sheets: =AI("Ringkas: " & A2) */
    function AI(prompt, model) {
      return askAI(prompt, model);
    }
  5. 5Pakai di Google Sheets

    Kembali ke spreadsheet dan ketik rumus di sel, misalnya =AI("Terjemahkan ke Inggris: " & A2). Saat pertama dijalankan, Google meminta izin akses ke layanan eksternal; setujui dengan akunmu.

Kalau ada masalah

  • Rumus kustom di Sheets dibatasi sekitar 30 detik per panggilan; untuk teks panjang pakai model flash atau jalankan askAI dari menu/trigger.
  • Setiap sel memanggil API sendiri; ratusan baris berarti ratusan request. Cek pemakaian di menu Log api.ezkielyna.store.
  • Simpan key di Script Properties, bukan di kode. Siapa pun yang punya akses edit ke spreadsheet bisa membuka Apps Script, jadi pakai key khusus dengan batas kuota (atur di api.ezkielyna.store → API Keys).

Masih error? Cek API key & base URL menjelaskan error 401, 403, 404 dan 429 dan menguji key langsung dari browser.

Panduan lain: Claude Code · Cursor · Cline · OpenCode · n8n · SillyTavern · Roo Code · Continue · Open WebUI / LibreChat · Python & JavaScript SDK · Hermes Agent · Cherry Studio · Chatbox · LobeChat · Aider · Zed · tentang AI gateway Ezkielyna

Harga per keluarga model: DeepSeek · GLM · Kimi · Claude · GPT · semua

Panduan lengkap dengan harga live dan contoh biaya: Claude Code + API bayar QRIS · Cline dan Kilo Code · OpenCode dan Ezkielyna Agent · MCP gambar (OpenCode, Claude, Cursor) · Setup 1 perintah (Claude Code, OpenCode) · Bot AI WhatsApp dan Telegram · Bayar API AI pakai DANA, GoPay, OVO

In English

In Google Apps Script store your Ezkielyna API key as the script property EZK_API_KEY, call https://api.ezkielyna.store/v1/chat/completions with UrlFetchApp and expose a custom =AI() function in Google Sheets.