# API Tools

API Setting memungkinkan pengguna untuk mengintegrasikan tool custom dengan database user, seperti alamat, tracking, atau informasi user lainnya.

### **Langkah-Langkah Menggunakan API Setting**

1. **Akses Halaman API Setting:**
   * Masuk ke **Setting AI Agent**.
   * Klik tab **Integration**.
   * Scroll ke bawah ke bagian **AI Tools** untuk fitur yang bisa terhubung ke database user.
2. **Membuat Custom AI Tool (Contoh: Cek Ongkir):**
   * Klik **Create AI Tools** atau langsung akses **API Setting**.
   * Pilih **Add New API Tools**.
3. **Isi Informasi Tool Baru:**
   * **Name:** Get\_shipping\_cost
   * **Description:** Tools untuk mendapatkan ongkir.
   * **Webhook Address:** Alamat server API (contoh: `https://logistic-dev-api.zcode.id/order/shipping/cost`).
   * **Max Tool Calls:** Jumlah maksimum panggilan (default: 30).
   * **API Key Bearer:** (Opsional) untuk keamanan tambahan.
4. **Tambahkan AI Input Fields:**
   * **Destination:**
     * Type: Text, Description: Kode pos (contoh: 11470), Required: Yes.
   * **Weight:**
     * Type: Number, Description: Berat paket dalam gram (contoh: 1000), Required: Yes.
   * **COD:**
     * Type: Boolean, Description: Cash on Delivery (true/false), Required: No.
   * **Courier:**
     * Type: Text, Description: Kurir yang digunakan, Enum: jne, ninja, Required: Yes.
5. **Tambahkan Additional Payload:**
   * **Origin:**
     * Key: origin, Value: 14310.
   * **Contact Info:**
     * Key: no\_hp, Type: Phone Number.
6. **Simpan dan Uji Tool:**
   * Klik **Create Tool**.
   * Lakukan testing pada sisi kanan API Setting.
   * Klik **Save**.
7. **Aktifkan Tool:**
   * Kembali ke **Setting AI Agent > Integration**.
   * Aktifkan tool yang sudah dibuat.
8. **Testing di General Chat:**
   * Coba chat terkait permintaan ongkir untuk melihat respons AI.

Jika masih ada yang kurang jelas, tonton video tutorial berikut untuk melihat langkah-langkahnya secara langsung.

{% embed url="<https://youtu.be/5SpzL-0TVzI>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cekat.ai/docs/features-and-content-management/api-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
