# Models

## The AgentVoiceRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"AgentVoiceRequest":{"type":"object","required":["text","agent_id","slug"],"properties":{"text":{"type":"string","description":"Texto a sintetizar"},"agent_id":{"type":"string","description":"ID do agente (aceita \"agent_<uuid>\" ou apenas \"<uuid>\")"},"slug":{"type":"string","description":"Nome do arquivo de saída (será salvo como .mp3)"}}}}}}
```

## The AgentVoiceResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"AgentVoiceResponse":{"type":"object","properties":{"result":{"type":"string"},"message":{"type":"string"},"public_url":{"type":"string"}}}}}}
```

## The AgentRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"AgentRequest":{"type":"object","required":["query","history"],"properties":{"query":{"type":"string","description":"Pergunta do usuário"},"history":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"}},"tts":{"type":"boolean","default":false},"user_prompt":{"type":"string","description":"Instruções adicionais para o agente"},"voice_priority":{"type":"boolean","default":false},"ask_human":{"type":"boolean","default":false}}},"HistoryItem":{"type":"object","properties":{"input":{"type":"string"},"output":{"type":"string"},"role":{"type":"string","description":"Papel opcional no diálogo"}}}}}}
```

## The AgentMMJsonRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"AgentMMJsonRequest":{"type":"object","required":["history","text"],"properties":{"history":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"}},"text":{"type":"string","description":"Texto a ser processado (quando não usar arquivos)"},"tts":{"type":"boolean","default":false},"hashtag":{"type":"boolean","default":false,"description":"Se true, remove e retorna hashtags encontradas"},"ask_human":{"type":"boolean","default":false},"user_prompt":{"type":"string"},"voice_priority":{"type":"boolean","default":false},"session_id":{"type":"string","format":"uuid"}}},"HistoryItem":{"type":"object","properties":{"input":{"type":"string"},"output":{"type":"string"},"role":{"type":"string","description":"Papel opcional no diálogo"}}}}}}
```

## The AgentMMFormRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"AgentMMFormRequest":{"type":"object","required":["history"],"properties":{"history":{"type":"string","description":"JSON serializado do histórico (obrigatório)"},"text":{"type":"string"},"audio":{"type":"string","format":"binary"},"ocr":{"type":"string","format":"binary"},"files":{"type":"array","items":{"type":"string","format":"binary"}},"tts":{"type":"string","description":"Booleano em string (\"true\"/\"false\")"},"hashtag":{"type":"string","description":"Booleano em string (\"true\"/\"false\")"},"ask_human":{"type":"string","description":"Booleano em string (\"true\"/\"false\")"},"user_prompt":{"type":"string"},"voice_priority":{"type":"string","description":"Booleano em string (\"true\"/\"false\")"},"session_id":{"type":"string","description":"UUID opcional"}}}}}}
```

## The AgentResponseData object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"AgentResponseData":{"type":"object","properties":{"status":{"type":"integer"},"history":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"}},"response":{"type":"string"},"entity":{"type":"boolean"},"entity_content":{"type":"object"},"tts_audio_mp3_encoded_base64":{"type":"string"},"file_encoded_base64":{"type":"string"},"session_id":{"type":"string"}}},"HistoryItem":{"type":"object","properties":{"input":{"type":"string"},"output":{"type":"string"},"role":{"type":"string","description":"Papel opcional no diálogo"}}}}}}
```

## The AgentListItem object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"AgentListItem":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"}}}}}}
```

## The HistoryItem object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"HistoryItem":{"type":"object","properties":{"input":{"type":"string"},"output":{"type":"string"},"role":{"type":"string","description":"Papel opcional no diálogo"}}}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"}}}}}}
```

## The STTTranscribeRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"STTTranscribeRequest":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Arquivo de áudio para transcrição"},"data":{"type":"string","description":"JSON serializado com metadados opcionais (ex.: lang)"}}}}}}
```

## The STTTranscribeResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"STTTranscribeResponse":{"type":"object","properties":{"source":{"type":"string"},"result":{"type":"string"}}}}}}
```

## The VoiceverseRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"VoiceverseRequest":{"type":"object","required":["pipeline","file"],"properties":{"pipeline":{"type":"string","description":"ID do pipeline (ex.: call_center)"},"file":{"type":"string","format":"binary","description":"Arquivo de áudio a processar"}}}}}}
```

## The VoiceverseResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"VoiceverseResponse":{"type":"object","properties":{"transcribed":{"type":"object","properties":{"response":{"type":"string"}}},"conversation":{"type":"string"},"resume":{"type":"string"},"sentimental":{"type":"string"}}}}}}
```

## The VoiceverseListItem object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"VoiceverseListItem":{"type":"object","properties":{"pipeline_name":{"type":"string"},"pipeline_id":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}}}}}}}
```

## The VoiceverseContent object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"VoiceverseContent":{"type":"object","description":"JSON do pipeline salvo em data/pipelines"}}}}
```

## The GenerateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"GenerateRequest":{"type":"object","required":["model","query"],"properties":{"model":{"type":"string","description":"Modelo a ser usado (ex.: gpt-4.1)"},"query":{"type":"string","description":"Texto de entrada"},"session":{"type":"string","description":"Session ID opcional (UUID)"}}}}}}
```

## The GenerateResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"GenerateResponse":{"type":"object","properties":{"response":{"type":"string"},"session":{"type":"string"}}}}}}
```

## The OCRRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"OCRRequest":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Arquivo PDF ou imagem para OCR"},"lang":{"type":"string","description":"Código de idioma do OCR (padrão 'por' para português)","default":"por"}}}}}}
```

## The OCRResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"OCRResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Número de páginas processadas (1 para imagens)"},"text":{"type":"string","description":"Texto extraído do arquivo"}}}}}}
```

## The InsightsChatTemplate object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"InsightsChatTemplate":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","description":"Tipo de pipeline (sempre \"chat\")"},"cat":{"type":"string","description":"Categoria do template"},"insights":{"type":"boolean","description":"Habilita geração de insights detalhados"},"insights_prompt":{"type":"string"},"conversation":{"type":"boolean","description":"Define se o template inclui análise de conversa completa"},"resume":{"type":"boolean","description":"Habilita resumo do atendimento"},"resume_prompt":{"type":"string"},"sentimental":{"type":"boolean","description":"Habilita análise de sentimento"},"sentimental_prompt":{"type":"string"},"tags":{"type":"boolean","description":"Habilita extração de tags"},"tags_prompt":{"type":"string"},"m_like":{"type":"boolean","description":"Habilita avaliação de satisfação (like/dislike)"},"m_like_prompt":{"type":"string"}}}}}}
```

## The InsightsChatListResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"InsightsChatListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InsightsChatTemplate"}}}},"InsightsChatTemplate":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","description":"Tipo de pipeline (sempre \"chat\")"},"cat":{"type":"string","description":"Categoria do template"},"insights":{"type":"boolean","description":"Habilita geração de insights detalhados"},"insights_prompt":{"type":"string"},"conversation":{"type":"boolean","description":"Define se o template inclui análise de conversa completa"},"resume":{"type":"boolean","description":"Habilita resumo do atendimento"},"resume_prompt":{"type":"string"},"sentimental":{"type":"boolean","description":"Habilita análise de sentimento"},"sentimental_prompt":{"type":"string"},"tags":{"type":"boolean","description":"Habilita extração de tags"},"tags_prompt":{"type":"string"},"m_like":{"type":"boolean","description":"Habilita avaliação de satisfação (like/dislike)"},"m_like_prompt":{"type":"string"}}}}}}
```

## The InsightsChatTemplateResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"InsightsChatTemplateResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InsightsChatTemplate"}}},"InsightsChatTemplate":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","description":"Tipo de pipeline (sempre \"chat\")"},"cat":{"type":"string","description":"Categoria do template"},"insights":{"type":"boolean","description":"Habilita geração de insights detalhados"},"insights_prompt":{"type":"string"},"conversation":{"type":"boolean","description":"Define se o template inclui análise de conversa completa"},"resume":{"type":"boolean","description":"Habilita resumo do atendimento"},"resume_prompt":{"type":"string"},"sentimental":{"type":"boolean","description":"Habilita análise de sentimento"},"sentimental_prompt":{"type":"string"},"tags":{"type":"boolean","description":"Habilita extração de tags"},"tags_prompt":{"type":"string"},"m_like":{"type":"boolean","description":"Habilita avaliação de satisfação (like/dislike)"},"m_like_prompt":{"type":"string"}}}}}}
```

## The InsightsChatCreateRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"InsightsChatCreateRequest":{"type":"object","required":["id","insight_chat_id","url","data"],"properties":{"id":{"type":"string","description":"Identificador único da requisição (ex.: ID da sessão)"},"insight_chat_id":{"type":"string","description":"ID do template de insights de chat a ser usado"},"url":{"type":"string","format":"uri","description":"URL do webhook que receberá o resultado"},"challenge":{"type":"string","description":"Token opcional enviado como Bearer no callback"},"data":{"type":"object","description":"Payload com histórico ou metadados da conversa a ser analisada"},"m_like":{"type":"integer","format":"int32","description":"Avaliação opcional do usuário (1 = positivo, 0 = negativo)"}}}}}}
```

## The InsightsChatQueuedResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"InsightsChatQueuedResponse":{"type":"object","properties":{"status":{"type":"string"},"id":{"type":"string"},"workflow_id":{"type":"string"}}}}}}
```

## The MissingFieldsResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"MissingFieldsResponse":{"type":"object","properties":{"message":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}}}}}
```

## The WorkflowAlreadyStartedResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"WorkflowAlreadyStartedResponse":{"type":"object","properties":{"message":{"type":"string"},"workflow_id":{"type":"string"},"id":{"type":"string"}}}}}}
```

## The ChatMessage object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"ChatMessage":{"type":"object","properties":{"input":{"type":"string","description":"Texto enviado pelo usuário"},"output":{"type":"string","description":"Resposta do bot/atendente"}}}}}}
```

## The ChatInsightsRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"ChatInsightsRequest":{"type":"object","required":["user_instructions","history"],"properties":{"user_instructions":{"type":"string","description":"Instruções para orientar a análise do LLM"},"history":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}}}},"ChatMessage":{"type":"object","properties":{"input":{"type":"string","description":"Texto enviado pelo usuário"},"output":{"type":"string","description":"Resposta do bot/atendente"}}}}}}
```

## The ChatInsightsResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"ChatInsightsResponse":{"type":"object","properties":{"response":{"type":"object","properties":{"resumo":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"sentimental":{"type":"object","properties":{"sentimento":{"type":"string","description":"Positivo, Negativo ou Neutro"}}}}}}}}}}
```

## The InsightsReportItem object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"InsightsReportItem":{"type":"object","properties":{"id":{"type":"integer"},"agent_id":{"type":"string"},"curator_id":{"type":"string"},"agent_name":{"type":"string"},"m_like":{"type":"integer","description":"Avaliação do usuário (1, 0 ou null)","nullable":true},"completed":{"type":"integer"},"insights":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"score":{"type":"number","format":"float"},"response_time":{"type":"number"},"interaction_count":{"type":"integer"},"message_count":{"type":"integer"},"workflow_name":{"type":"string"},"platform":{"type":"string"},"initial_time":{"type":"string","format":"date-time"},"final_time":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"type":"string"}},"filters":{"type":"array","items":{"type":"string"}},"history":{"type":"array","items":{"type":"object"},"description":"Incluído somente quando download=true"}}}}}}
```

## The InsightsReportResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"InsightsReportResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InsightsReportItem"}},"pagination":{"type":"object","properties":{"current_page":{"type":"integer"},"items_per_page":{"type":"integer"},"total_items":{"type":"integer"},"total_pages":{"type":"integer"}}},"filters":{"type":"object","properties":{"order_by":{"type":"string"},"order_direction":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"tags_match":{"type":"string"},"search_filter":{"type":"string"},"agent_id":{"type":"string","nullable":true},"date_filter":{"type":"object","properties":{"date_type":{"type":"string","nullable":true},"relative_days":{"type":"integer","nullable":true},"start_datetime":{"type":"string","format":"date-time","nullable":true},"end_datetime":{"type":"string","format":"date-time","nullable":true},"applied":{"type":"boolean"}}}}}}},"InsightsReportItem":{"type":"object","properties":{"id":{"type":"integer"},"agent_id":{"type":"string"},"curator_id":{"type":"string"},"agent_name":{"type":"string"},"m_like":{"type":"integer","description":"Avaliação do usuário (1, 0 ou null)","nullable":true},"completed":{"type":"integer"},"insights":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"score":{"type":"number","format":"float"},"response_time":{"type":"number"},"interaction_count":{"type":"integer"},"message_count":{"type":"integer"},"workflow_name":{"type":"string"},"platform":{"type":"string"},"initial_time":{"type":"string","format":"date-time"},"final_time":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"type":"string"}},"filters":{"type":"array","items":{"type":"string"}},"history":{"type":"array","items":{"type":"object"},"description":"Incluído somente quando download=true"}}}}}}
```

## The InsightsReportErrorResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"InsightsReportErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/InsightsReportItem"}},"pagination":{"type":"object","properties":{"current_page":{"type":"integer"},"items_per_page":{"type":"integer"},"total_items":{"type":"integer"},"total_pages":{"type":"integer"}}}}},"InsightsReportItem":{"type":"object","properties":{"id":{"type":"integer"},"agent_id":{"type":"string"},"curator_id":{"type":"string"},"agent_name":{"type":"string"},"m_like":{"type":"integer","description":"Avaliação do usuário (1, 0 ou null)","nullable":true},"completed":{"type":"integer"},"insights":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"score":{"type":"number","format":"float"},"response_time":{"type":"number"},"interaction_count":{"type":"integer"},"message_count":{"type":"integer"},"workflow_name":{"type":"string"},"platform":{"type":"string"},"initial_time":{"type":"string","format":"date-time"},"final_time":{"type":"string","format":"date-time"},"tags":{"type":"array","items":{"type":"string"}},"filters":{"type":"array","items":{"type":"string"}},"history":{"type":"array","items":{"type":"object"},"description":"Incluído somente quando download=true"}}}}}}
```

## The CustomerJourneyRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"CustomerJourneyRequest":{"type":"object","required":["date","platform","workflow","history"],"properties":{"date":{"type":"string","format":"date","description":"Data da jornada no formato YYYY-MM-DD"},"platform":{"type":"string","description":"Nome da plataforma de origem"},"workflow":{"type":"string","description":"Nome do workflow executado"},"history":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"},"description":"Histórico de interações da conversa"}}},"HistoryItem":{"type":"object","properties":{"input":{"type":"string"},"output":{"type":"string"},"role":{"type":"string","description":"Papel opcional no diálogo"}}}}}}
```

## The CustomerJourneyResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"CustomerJourneyResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success","error"]},"journey":{"type":"object","properties":{"score":{"type":"integer","description":"Pontuação da jornada (0-5)"},"sentiment":{"type":"string","description":"Sentimento geral (Positivo, Neutro, Negativo)"},"summary":{"type":"string","description":"Resumo da jornada do cliente"},"like":{"type":"boolean","description":"Indica se o cliente ficou satisfeito"},"user_name":{"type":"string","description":"Nome do usuário"},"tags":{"type":"array","items":{"type":"string"},"description":"Lista de tags relevantes"}}},"message":{"type":"string","description":"Mensagem de erro em caso de falha"}}}}}}
```

## The GoCuratorRequest object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"GoCuratorRequest":{"type":"object","required":["agent_id","history","workflow_name","platform","initial_time","final_time"],"properties":{"agent_id":{"type":"string"},"history":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"}},"workflow_name":{"type":"string"},"platform":{"type":"string"},"initial_time":{"type":"string"},"final_time":{"type":"string"}}},"HistoryItem":{"type":"object","properties":{"input":{"type":"string"},"output":{"type":"string"},"role":{"type":"string","description":"Papel opcional no diálogo"}}}}}}
```

## The GoCuratorResponse object

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"components":{"schemas":{"GoCuratorResponse":{"type":"object","properties":{"message":{"type":"string"}}}}}}
```


---

# 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.fortics.com.br/ai-api-reference/reference/models.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.
