# OpenAI

{% hint style="warning" %}
Hướng dẫn thêm tích hợp OpenAI vào SmaxAi
{% endhint %}

Đầu tiên, bạn cần truy cập vào trang cài đặt của OpenAI [<mark style="color:purple;">**tại đây**</mark>](https://platform.openai.com/settings/organization/general), sau đó chọn vào phần Billing

<figure><img src="/files/SvBMn0BaTPiU3e8tTyj1" alt=""><figcaption></figcaption></figure>

Bạn cần đảm bảo tài khoản OpenAI của bạn còn đủ số dư trong Billing, nếu không có bạn cần nạp tiền vào đây để sử dụng API của OpenAI

<figure><img src="/files/62Tke1wEB2A69KKBPj4d" alt=""><figcaption></figcaption></figure>

Sau đó bạn vào phần API keys, chọn Create new secret key

<figure><img src="/files/c9590q8pqNilHBATYEMW" alt=""><figcaption></figcaption></figure>

Nhập tên của secret key, sau đó chọn Create secret key để tạo

<figure><img src="/files/xhz8YyNjNdbMV8K2oSBy" alt=""><figcaption></figcaption></figure>

Sau khi tạo xong, copy và lưu lại secret key

<figure><img src="/files/YN69PqG2GGCQi0OuGeBW" alt=""><figcaption></figcaption></figure>

Tiếp theo truy cập Cài đặt trên SmaxAi, trong phần Tích hợp chọn Thêm mới

Chọn nền tảng là OpenAi, đặt tên và dán secret key vừa tạo vào ô API Key, chọn Lưu để thêm tích hợp

<figure><img src="/files/jFX0Em87CCqBlVWyV5sb" alt=""><figcaption></figcaption></figure>


---

# 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://tailieu.smax.ai/module-cai-dat/tich-hop/openai.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.
