> For the complete documentation index, see [llms.txt](https://docs.epic-ai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.epic-ai.com/api-dokumentation/inbox-ai-chat-functions.md).

# Inbox Ai Chat Functions

## Generates an AI-based summary of the conversation

> \
> \
> \*\*Required Permission:\*\* \`chatbots.inbox.openai.summary\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox ai-chat-functions","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/conversations/{conversationId}/summary":{"get":{"operationId":"InboxAiChatController_createChatSummary[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot.","schema":{"type":"string"}},{"name":"conversationId","required":true,"in":"path","description":"The ID of the conversation.","schema":{"type":"string"}}],"responses":{"200":{"description":"The generated summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatSummaryResponseDto"}}}},"403":{"description":"Insufficient permissions."}},"summary":"Generates an AI-based summary of the conversation","tags":["Inbox ai-chat-functions"],"description":"\n\n**Required Permission:** `chatbots.inbox.openai.summary`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"CreateChatSummaryResponseDto":{"type":"object","properties":{"summary":{"type":"string","description":"The generated summary of the conversation."},"error":{"type":"string","description":"Optional error message."}},"required":["summary"]}}}}
```

## Generates a text completion for an agent's response

> \
> \
> \*\*Required Permission:\*\* \`chatbots.inbox.openai.completion\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox ai-chat-functions","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/conversations/{conversationId}/completion":{"get":{"operationId":"InboxAiChatController_createChatCompletion[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot.","schema":{"type":"string"}},{"name":"conversationId","required":true,"in":"path","description":"The ID of the conversation.","schema":{"type":"string"}}],"responses":{"200":{"description":"The generated text completion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatCompletionResponseDto"}}}},"403":{"description":"Insufficient permissions."}},"summary":"Generates a text completion for an agent's response","tags":["Inbox ai-chat-functions"],"description":"\n\n**Required Permission:** `chatbots.inbox.openai.completion`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"CreateChatCompletionResponseDto":{"type":"object","properties":{"completion":{"type":"string","description":"The completed text suggestion."},"error":{"type":"string","description":"Optional error message."}},"required":["completion"]}}}}
```

## Reformulates a given message using AI

> \
> \
> \*\*Required Permission:\*\* \`chatbots.inbox.openai.formulation\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox ai-chat-functions","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/conversations/{conversationId}/formulation":{"post":{"operationId":"InboxAiChatController_createChatFormulation[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot.","schema":{"type":"string"}},{"name":"conversationId","required":true,"in":"path","description":"The ID of the conversation.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatFormulationRequestDto"}}}},"responses":{"201":{"description":"The reformulated message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatFormulationResponseDto"}}}},"400":{"description":"Invalid input data."},"403":{"description":"Insufficient permissions."}},"summary":"Reformulates a given message using AI","tags":["Inbox ai-chat-functions"],"description":"\n\n**Required Permission:** `chatbots.inbox.openai.formulation`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"CreateChatFormulationRequestDto":{"type":"object","properties":{"message":{"type":"string","description":"The message to be reformulated."}},"required":["message"]},"CreateChatFormulationResponseDto":{"type":"object","properties":{"formulation":{"type":"string","description":"The reformulated text suggestion."}}}}}}
```
