---
title: "Update a ai."
method: PUT
path: "/ais/{id}"
tags: ["AI"]
---

# Update a ai.

`PUT /ais/{id}`

Updates an existing ai's details and returns the updated information.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string, required
  - `detail` string, required
  - `type` 'normal' | 'insight' — AI type. `normal` (default) is a general-purpose AI. `insight` restricts the AI to the Insight tool set and uses a dedicated system prompt.
  - `engine_model` 'gemini.gemini-2.5-flash' | 'gemini.gemini-2.5-pro' | 'gemini.gemini-2.0-flash' | 'gemini.gemini-pro-latest' | 'openai.gpt-5.2' | 'openai.gpt-5.1' | 'openai.gpt-5' | 'openai.gpt-5-mini' | 'openai.gpt-5-nano' | 'grok.grok-3' | 'grok.grok-3-mini', required — Model of the AI engine. Uses target.model format (e.g., openai.gpt-5). The target prefix identifies the provider, and the model name follows after the dot.
  - `parameter` object, required — Data associated with the ai's engine, can be dynamic and vary based on the engine type.
  - `engine_key` string, required — API key or credential for the AI engine.
  - `rag_id` string — The knowledge base ID (UUID) for the search_knowledge tool. Returned from the `id` field of the `GET /rags` response. Send empty string or omit to clear.
  - `init_prompt` string, required
  - `tts_type` string, required — Text-to-speech engine type.
  - `tts_voice_id` string, required — Voice ID for the text-to-speech engine.
  - `stt_type` string, required — Speech-to-text engine type.
  - `stt_language` string — STT language in BCP-47 format (e.g., ko-KR, en-US).
  - `vad_config` AIManagerVADConfig — Voice Activity Detection configuration. Omitted fields use Pipecat defaults (confidence=0.7, start_secs=0.2, stop_secs=0.2, min_volume=0.6).
    - `confidence` number, double — Minimum confidence threshold to detect voice. Range 0.0–1.0. Omitted fields use Pipecat default.
    - `start_secs` number, double — Duration in seconds of continuous speech needed to confirm speaking started. Range 0.0–30.0. Omitted fields use Pipecat default.
    - `stop_secs` number, double — Duration in seconds of silence needed to confirm speaking stopped. Range 0.0–30.0. Omitted fields use Pipecat default.
    - `min_volume` number, double — Minimum audio volume for voice detection. Range 0.0–1.0. Omitted fields use Pipecat default.
  - `tool_names` AIManagerToolName[] — List of tool names to enable for this AI. Use ["all"] to enable all available tools. For type=insight AIs, only Insight tool names are permitted (currently: get_contact_interactions, get_conversation_content); type=normal AIs may use any Normal tool name or ["all"]. Mismatched combinations are rejected with a 400.
  - `auto_aicall_audit_enabled` boolean — When true, any finished AICall involving this AI is audited automatically.

## Response `200`

Details of the updated ai.

- AIManagerAI
  - `id` string, uuid — The unique identifier of the AI.
  - `customer_id` string, uuid — The unique identifier of the associated customer. Returned from the `GET /customers` response.
  - `name` string — Name of the AI.
  - `detail` string — Detailed information about the AI.
  - `type` 'normal' | 'insight' — AI type. `normal` (default) is a general-purpose AI. `insight` restricts the AI to the Insight tool set and uses a dedicated system prompt for analyzing existing contact/conversation data.
  - `is_insight_active` boolean, required — Whether this is the customer's active Insight AI, i.e. the one the Case Insight Assistant panel auto-attaches to a case. Only meaningful when `type` is `insight`. A customer may hold any number of Insight AIs but at most one may be active. Newly created AIs are always inactive; use `POST /ais/{id}/activate_insight` to activate one. When no Insight AI is active, the most recently created one is used.
  - `engine_model` 'gemini.gemini-2.5-flash' | 'gemini.gemini-2.5-pro' | 'gemini.gemini-2.0-flash' | 'gemini.gemini-pro-latest' | 'openai.gpt-5.2' | 'openai.gpt-5.1' | 'openai.gpt-5' | 'openai.gpt-5-mini' | 'openai.gpt-5-nano' | 'grok.grok-3' | 'grok.grok-3-mini' — Model of the AI engine. Uses target.model format (e.g., openai.gpt-5). The target prefix identifies the provider, and the model name follows after the dot.
  - `parameter` object — Custom key-value configuration data specific to the AI engine type.
  - `engine_key` string — API key or authentication key for the AI engine. Write-only; not returned in responses.
  - `rag_id` string, uuid — The knowledge base ID for the search_knowledge tool. Returned from the `id` field of the `GET /rags` response. When set, the AI assistant can search this knowledge base during voice calls.
  - `init_prompt` string — Initial prompt to configure the AI's behavior.
  - `current_prompt_history_id` string, uuid — UUID of the most-recent prompt history entry. Zero UUID means no versioned history has been recorded yet.
  - `tts_type` '' | 'async' | 'aws' | 'azure' | 'cartesia' | 'deepgram' | 'elevenlabs' | 'fish' | 'google' | 'groq' | 'hume' | 'inworld' | 'lmnt' | 'minimax' | 'neuphonic' | 'nvidia-riva' | 'openai' | 'piper' | 'playht' | 'rime' | 'sarvam' | 'xtts' — Text-to-speech provider type.
  - `tts_voice_id` string — Text-to-speech voice identifier.
  - `stt_type` '' | 'cartesia' | 'deepgram' | 'elevenlabs' — Speech-to-text provider type.
  - `stt_language` string — STT language in BCP-47 format (e.g., ko-KR, en-US). Empty for auto-detect.
  - `vad_config` AIManagerVADConfig — Voice Activity Detection configuration. Omitted fields use Pipecat defaults (confidence=0.7, start_secs=0.2, stop_secs=0.2, min_volume=0.6).
    - `confidence` number, double — Minimum confidence threshold to detect voice. Range 0.0–1.0. Omitted fields use Pipecat default.
    - `start_secs` number, double — Duration in seconds of continuous speech needed to confirm speaking started. Range 0.0–30.0. Omitted fields use Pipecat default.
    - `stop_secs` number, double — Duration in seconds of silence needed to confirm speaking stopped. Range 0.0–30.0. Omitted fields use Pipecat default.
    - `min_volume` number, double — Minimum audio volume for voice detection. Range 0.0–1.0. Omitted fields use Pipecat default.
  - `smart_turn_enabled` boolean — Enable smart turn detection using Pipecat's LocalSmartTurnAnalyzerV3. When enabled, forces VAD stop_secs to 0.2 for optimal turn-taking.
  - `auto_aicall_audit_enabled` boolean — When true, any finished AICall involving this AI is audited automatically.
  - `tool_names` AIManagerToolName[] — List of tool names enabled for this AI. Use `["all"]` to enable all available tools. See the Tool Functions documentation for detailed descriptions of each tool.
  - `direct_hash` string — The direct hash for direct access via SIP URI sip:<direct_hash>@sip.voipbin.net (the "direct." prefix is already included in the value, e.g. "direct.a1b2c3d4e5f6"). Returned from the resource's `direct_hash` field.
  - `tm_create` string, date-time — Timestamp when the AI was created.
  - `tm_update` string, date-time — Timestamp when the AI was last updated.
  - `tm_delete` string, date-time — Timestamp when the AI was deleted.

## Other responses

- `400` — Invalid request (INVALID_ARGUMENT).
- `401` — Authentication required (UNAUTHENTICATED).
- `403` — Insufficient permission (PERMISSION_DENIED).
- `404` — Resource not found (NOT_FOUND).
- `500` — Internal error (INTERNAL).

---

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