> For the complete documentation index, see [llms.txt](https://docs.cekat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cekat.ai/en/automation-and-developer/api-tools.md).

# API Tools

API Setting lets you connect custom tools to your user data, such as addresses, shipment tracking or other customer information.

### **How to use API Setting**

1. **Open the API Setting page:**
   * Go to **Setting AI Agent**.
   * Click the **Integration** tab.
   * Scroll down to the **AI Tools** section for features that can connect to your user data.
2. **Create a custom AI tool (example: shipping cost check):**
   * Click **Create AI Tools**, or go straight to **API Setting**.
   * Choose **Add New API Tools**.
3. **Fill in the new tool's details:**
   * **Name:** Get\_shipping\_cost
   * **Description:** A tool for getting shipping costs.
   * **Webhook Address:** your API server's address (for example `https://logistic-dev-api.zcode.id/order/shipping/cost`).
   * **Max Tool Calls:** the maximum number of calls (default: 30).
   * **API Key Bearer:** (optional) for extra security.
4. **Add AI input fields:**
   * **Destination:**
     * Type: Text, Description: Postal code (for example 11470), Required: Yes.
   * **Weight:**
     * Type: Number, Description: Package weight in grams (for example 1000), Required: Yes.
   * **COD:**
     * Type: Boolean, Description: Cash on Delivery (true/false), Required: No.
   * **Courier:**
     * Type: Text, Description: The courier to use, Enum: jne, ninja, Required: Yes.
5. **Add an additional payload:**
   * **Origin:**
     * Key: origin, Value: 14310.
   * **Contact info:**
     * Key: no\_hp, Type: Phone Number.
6. **Save and test the tool:**
   * Click **Create Tool**.
   * Run a test on the right side of API Setting.
   * Click **Save**.
7. **Turn the tool on:**
   * Go back to **Setting AI Agent > Integration**.
   * Turn on the tool you just created.
8. **Test it in General Chat:**
   * Ask about shipping costs in a chat to see how the AI responds.

If anything's still unclear, watch the video tutorial below to see each step in action.

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