> For the complete documentation index, see [llms.txt](https://support.portsip.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.portsip.com/development-portsip/rest-apis/version-22.3/admin.md).

# Admin

## Get AI Engine configuration

> Get the ai engine configuration.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/ai_engine":{"get":{"tags":["Admin"],"operationId":"getAIEngine","summary":"Get AI Engine configuration","description":"Get the ai engine configuration.\n","parameters":[{"in":"query","name":"id","required":true,"schema":{"type":"string"},"description":"Unique identifier of the AI Engine configuration."}],"responses":{"200":{"description":"Successfully retrieved AI Engine configuration","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"engine_type":{"type":"string","enum":["aws","azure"]},"config":{"oneOf":[{"summary":"Schema for AWS AI Engine configuration","type":"object","properties":{"access_key":{"type":"string"},"secret_key":{"type":"string"},"region":{"type":"string"},"bucket_name":{"type":"string"},"locale":{"type":"string"},"lang_code":{"type":"string"},"max_level":{"type":"integer"},"max_speech_to_text_queue":{"type":"integer"},"max_sentiment_requests_per_10s":{"type":"integer"}},"required":["access_key","secret_key","region","bucket_name"]},{"summary":"Schema for Azure AI Engine configuration","type":"object","properties":{"account_name":{"type":"string"},"account_key":{"type":"string"},"api_key":{"type":"string"},"region":{"type":"string"},"container_name":{"type":"string"},"locale":{"type":"string"},"max_level":{"type":"integer"},"max_stt_requests_per_10s":{"type":"integer"},"max_sentiment_requests_per_minute":{"type":"integer"}},"required":["account_name","account_key","api_key","region","container_name"]}]}}}}}},"4XX":{"description":"Invalid input or retrieval failed."}}}}}}
```

## Create or Update AI Engine configuration

> Create a new AI Engine configuration if it does not exist,  \
> or update the existing configuration by its ID.  \
> The \`config\` field varies depending on the selected engine type.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/ai_engine":{"post":{"tags":["Admin"],"operationId":"updateAIEngine","summary":"Create or Update AI Engine configuration","description":"Create a new AI Engine configuration if it does not exist,  \nor update the existing configuration by its ID.  \nThe `config` field varies depending on the selected engine type.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["engine_type","config"],"properties":{"engine_type":{"type":"string","enum":["aws","azure"],"description":"Type of AI engine."},"config":{"oneOf":[{"title":"AWS Config","type":"object","required":["access_key","secret_key","region","bucket_name","locale","lang_code","max_speech_to_text_queue","max_sentiment_requests_per_10s"],"properties":{"access_key":{"type":"string"},"secret_key":{"type":"string"},"region":{"type":"string"},"bucket_name":{"type":"string"},"locale":{"type":"string"},"lang_code":{"type":"string"},"max_speech_to_text_queue":{"type":"integer"},"max_sentiment_requests_per_10s":{"type":"integer"}}},{"title":"Azure Config","type":"object","required":["account_name","account_key","api_key","region","container_name","locale","max_stt_requests_per_10s","max_sentiment_requests_per_minute"],"properties":{"account_name":{"type":"string"},"account_key":{"type":"string"},"api_key":{"type":"string"},"region":{"type":"string"},"container_name":{"type":"string"},"locale":{"type":"string"},"max_stt_requests_per_10s":{"type":"integer"},"max_sentiment_requests_per_minute":{"type":"integer"}}}]}}}}}},"responses":{"200":{"description":"AI Engine configuration updated successfully."},"4XX":{"description":"Invalid input or update failed."}}}}}}
```
