# LLM and Processing

Gera textos, conteudos e realiza buscas.

## POST /api/v3/generate

> Gerar texto com modelo informado

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"tags":[{"name":"LLM and Processing","description":"Gera textos, conteudos e realiza buscas."}],"servers":[{"url":"https://{host}/{tenant}","description":"Define o host e o tenant usados nas chamadas.","variables":{"host":{"default":"app.genier.ai"},"tenant":{"default":"my-tenant"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"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)"}}},"GenerateResponse":{"type":"object","properties":{"response":{"type":"string"},"session":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v3/generate":{"post":{"summary":"Gerar texto com modelo informado","tags":["LLM and Processing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}}},"responses":{"200":{"description":"Retorna o texto gerado pelo modelo informado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Rejeita quando model ou query não são enviados.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Falha de autenticação da chave de API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v3/generate\_mem

> Gerar texto com memória de sessão

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"tags":[{"name":"LLM and Processing","description":"Gera textos, conteudos e realiza buscas."}],"servers":[{"url":"https://{host}/{tenant}","description":"Define o host e o tenant usados nas chamadas.","variables":{"host":{"default":"app.genier.ai"},"tenant":{"default":"my-tenant"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"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)"}}},"GenerateResponse":{"type":"object","properties":{"response":{"type":"string"},"session":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v3/generate_mem":{"post":{"summary":"Gerar texto com memória de sessão","tags":["LLM and Processing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}}},"responses":{"200":{"description":"Retorna texto gerado considerando a memória da sessão.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Rejeita quando model ou query não são enviados.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Falha de autenticação da chave de API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v3/search

> Buscar conteúdo usando modelo informado

```json
{"openapi":"3.0.3","info":{"title":"Genier API v3","version":"3.12.0"},"tags":[{"name":"LLM and Processing","description":"Gera textos, conteudos e realiza buscas."}],"servers":[{"url":"https://{host}/{tenant}","description":"Define o host e o tenant usados nas chamadas.","variables":{"host":{"default":"app.genier.ai"},"tenant":{"default":"my-tenant"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"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)"}}},"GenerateResponse":{"type":"object","properties":{"response":{"type":"string"},"session":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v3/search":{"post":{"summary":"Buscar conteúdo usando modelo informado","tags":["LLM and Processing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}}},"responses":{"200":{"description":"Retorna o resultado da busca ou geração executada pelo modelo informado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"400":{"description":"Rejeita quando model ou query não são enviados.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Falha de autenticação da chave de API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# 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/llm-and-processing.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.
