> For the complete documentation index, see [llms.txt](https://ajuda.botconversa.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.botconversa.com.br/integracoes/ferramentas-online/chatgpt-openai.md).

# ChatGPT (OpenAI)

{% hint style="warning" %}
Observação: Para realizar essa integração, usaremos a ferramenta de Webhook do BotConversa, disponível somente no plano PRO, veja mais em: botconversa.com.br
{% endhint %}

## &#x20;[🎥](https://emojipedia.org/pt/c%C3%A2mera-de-cinema/) Veja o tutorial gravado no vídeo a seguir:

{% embed url="<https://youtu.be/FGpdk6QFsqo>" %}

## [❓](https://emojiterra.com/pt/ponto-de-interrogacao-vermelho/) Como integrar o BotConversa com OpenAI?

Fluxo integração OpenAI (Inteligência Artificial)

Fluxo 1: <https://app.botconversa.com.br/share-flow?share\\_code=d2d87a43-6ae2-4dee-b1bd-0c9f3b3bd132>

Fluxo 2: <https://app.botconversa.com.br/share-flow?share\\_code=68f3074c-ec55-4f85-8233-fad08c4eec87>

Altere o valor da chave de autenticação da API dentro do bloco de integração para a chave gerada na sua conta do OpenAI.

Para gerar a chave API na conta da OpenAI é simples:

Crie uma conta no site: <https://beta.openai.com/signup>

Clique no menu "Personal" que fica no canto superior direito da tela, e depois clique na opção "View API keys".

Clique em "Create new secret key" e copie a chave gerada.

Abra o bloco de integração do fluxo no BotConversa e no menu "Headers" identifique a chave de nome "Authorization" e altere o value dessa chave mantendo a palavra "Bearer" no início e cole a chave API gerada pela OpenAI.&#x20;

O resultado final do value deve ser algo parecido com isso: "Bearer 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"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://ajuda.botconversa.com.br/integracoes/ferramentas-online/chatgpt-openai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
