---
title: "update AI configuration"
method: PUT
path: "/answer/admin/api/ai-config"
tags: ["admin"]
---

# update AI configuration

`PUT /answer/admin/api/ai-config`

update AI configuration

## Request body

- SchemaSiteAIReq
  - `ai_providers` SchemaSiteAIProvider[]
    - `api_host` string
    - `api_key` string
    - `model` string
    - `provider` string
  - `chosen_provider` string
  - `enabled` boolean
  - `prompt_config` SchemaAIPromptConfig
    - `en_us` string
    - `zh_cn` string

## Response `200`

OK

- HandlerRespBody
  - `code` integer — http code
  - `data` unknown
  - `msg` string — response message
  - `reason` string — reason key

---

[API](https://skmtc.net/apache/apis/apache-answer.md) · [All operations](https://skmtc.net/apache/apis/apache-answer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apache/apache-answer/versions/e9c2980e6571/schema)
