# Create an assistant

`POST https://api.morevoice.ai/v1/assistants`

Creates an assistant. Only `name` is required; fields you leave out take their defaults (`GET /v1/assistants/{id}` shows them all).

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `assistants_create`.

## Parameters

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |
| `Idempotency-Key` | `string` | no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |

## Request body

Required, `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | yes | The assistant's name (yours; callers never hear it). |
| `advanced` | `object` | no | — |
| `advanced.expression_tags` | `string[]` | no | The vocal events the model may use. |
| `advanced.idle` | `object` | no | — |
| `advanced.intelligent_turn_taking` | `boolean` | no | — |
| `advanced.latency` | `object` | no | — |
| `advanced.llm_routing` | `object` | no | — |
| `advanced.max_endpoint_delay_ms` | `integer` | no | 500–3000. |
| `advanced.silence_timeout_seconds` | `number` | no | 5–3600. |
| `advanced.start_speaking_plan` | `object` | no | — |
| `advanced.stop_speaking_plan` | `object` | no | — |
| `answering_machine_detection` | `object` | no | — |
| `answering_machine_detection.max_decision_ms` | `integer` | no | 1500–8000. |
| `answering_machine_detection.message` | `string` | no | The message left with `leave_message`. |
| `answering_machine_detection.mode` | `"off" \| "hang_up" \| "leave_message"` | no | — |
| `artifacts` | `object` | no | — |
| `artifacts.logging` | `boolean` | no | — |
| `artifacts.recording` | `boolean` | no | — |
| `artifacts.summary` | `boolean` | no | — |
| `artifacts.transcript` | `boolean` | no | — |
| `end_call_message` | `string` | no | Said before the assistant ends the call. |
| `end_call_phrases` | `string[]` | no | Phrases that end the call. |
| `first_message` | `string` | no | What the assistant says first. |
| `first_message_mode` | `"assistant_speaks_first" \| "assistant_waits_for_user" \| "assistant_generates_first_message"` | no | — |
| `flow_id` | `string \| null` | no | `flow_…` ID. |
| `language` | `string` | no | The call language. |
| `llm` | `object` | no | — |
| `llm.max_output_tokens` | `integer` | no | 16–8192. |
| `llm.model` | `string` | no | The model id the assistant runs on. Kept for compatibility; prefer quality_tier. |
| `llm.provider` | `"openai"` | no | — |
| `llm.quality_tier` | `"fast" \| "standard" \| "advanced" \| "custom"` | no | The neutral quality tier: `fast`, `standard`, `advanced` or `custom` (a model this list does not name). Send it instead of `model`; when both are sent, `model` wins. |
| `llm.temperature` | `number` | no | 0–2. |
| `max_duration_seconds` | `number` | no | 10–43200 (12 hours). |
| `metadata` | `MetadataInput` | no | Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
| `pre_speech_guard` | `object \| null` | no | Checks every sentence the model writes before it is spoken (with the pre-speech guard enabled for your organization). A sentence with a banned phrase, or one your hook blocks, is not said: `replacement` is said instead (once per reply) or nothing. Each stopped sentence sends `guardrail.triggered`. null removes the guard. |
| `pre_speech_guard.banned_phrases` | `string[]` | no | Up to 200 phrases (each ≤ 200 characters): words or `/regex/flags` (no back-references or nested quantifiers). |
| `pre_speech_guard.hook` | `object \| null` | no | The `assistant.before_speak` webhook: each sentence is POSTed as `{type: "assistant.before_speak", id, call: {id, assistant_id, language}, turn, text, livemode}`, signed like a tool call (Standard Webhooks headers, your tools signing secret). Answer within `timeout_ms` with `{"action": "allow"}`, `{"action": "replace", "text": "…"}` or `{"action": "block"}`. A slower, failed or unreadable answer fails open: the sentence is said. null removes the hook. |
| `pre_speech_guard.replacement` | `string` | no | Said instead of a stopped sentence, once per reply (≤ 500 characters); empty: nothing. |
| `public` | `boolean` | no | Allow publishable keys (the browser widget) to call this assistant. Default false. |
| `system_prompt` | `string` | no | The instructions the model follows. |
| `tools` | `object` | no | Fields you leave out are kept. |
| `tools.add_participant` | `object \| null` | no | null turns adding participants off. |
| `tools.booking` | `BookingToolsParamsInput \| null` | no | null turns the booking tools off. |
| `tools.custom` | `CustomToolParamsInput[]` | no | Replaces the whole list. A tool sent without `headers` keeps the stored headers of the tool with the same name. |
| `tools.end_call` | `boolean` | no | — |
| `tools.get_current_time` | `boolean` | no | — |
| `tools.transfer_call` | `object \| null` | no | null turns transfers off. |
| `tools.web_search` | `boolean` | no | — |
| `transcriber` | `object` | no | — |
| `transcriber.context` | `string` | no | Free text that helps recognition. |
| `transcriber.language_hints` | `string[]` | no | Languages to expect (ISO 639-1). |
| `transcriber.model` | `string` | no | The STT model. Kept for compatibility; prefer quality_tier. |
| `transcriber.provider` | `"soniox"` | no | — |
| `transcriber.quality_tier` | `"fast" \| "standard" \| "advanced" \| "custom"` | no | The neutral quality tier: `fast`, `standard`, `advanced` or `custom` (a model this list does not name). Send it instead of `model`; when both are sent, `model` wins. |
| `transcriber.strict_language_hints` | `boolean` | no | — |
| `transcriber.terms` | `string[]` | no | Words and names to recognise better. |
| `voice` | `object` | no | — |
| `voice.expressions` | `boolean` | no | — |
| `voice.model` | `string` | no | The TTS model. Kept for compatibility; prefer quality_tier. |
| `voice.provider` | `"gemini"` | no | The text-to-speech provider. |
| `voice.quality_tier` | `"fast" \| "standard" \| "advanced" \| "custom"` | no | The neutral quality tier: `fast`, `standard`, `advanced` or `custom` (a model this list does not name). Send it instead of `model`; when both are sent, `model` wins. |
| `voice.style` | `string` | no | Delivery direction. |
| `voice.style_mode` | `"dynamic" \| "fixed"` | no | — |
| `voice.tier` | `"auto" \| "premium" \| "lite"` | no | — |
| `voice.voice_id` | `string` | no | A voice from `GET /v1/voices`. |

Example:

```json
{
  "first_message": "שלום, הגעתם למרפאת השרון. איך אפשר לעזור?",
  "language": "he",
  "metadata": {
    "crm_id": "0031x00000AbCdE"
  },
  "name": "Clinic receptionist",
  "system_prompt": "You book, move and cancel appointments. Keep answers short.",
  "tools": {
    "custom": [
      {
        "description": "Find free appointment slots for a doctor and date",
        "headers": {
          "Authorization": "Bearer crm-secret"
        },
        "name": "find_slots",
        "parameters": {
          "properties": {
            "date": {
              "type": "string"
            },
            "doctor": {
              "type": "string"
            }
          },
          "required": [
            "date"
          ],
          "type": "object"
        },
        "url": "https://crm.example.com/voice/tools"
      }
    ],
    "end_call": true,
    "transfer_call": {
      "destination": "queue:reception"
    }
  },
  "voice": {
    "provider": "gemini",
    "style": "warm",
    "voice_id": "Kore"
  }
}
```

## Responses

### 201 Created

The new assistant. Returns `Assistant`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | The assistant's ID. |
| `object` | `"assistant"` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `name` | `string` | The assistant's name (yours; callers never hear it). |
| `language` | `string` | The call language (BCP-47, e.g. `he`, `en`). |
| `system_prompt` | `string` | The instructions the model follows. |
| `first_message` | `string` | What the assistant says first. |
| `first_message_mode` | `"assistant_speaks_first" \| "assistant_waits_for_user" \| "assistant_generates_first_message"` | Whether the assistant speaks first (`first_message`), waits for the caller, or generates its opening. |
| `voice` | `AssistantVoice` | How the assistant sounds. |
| `voice.provider` | `"gemini"` | The text-to-speech provider. |
| `voice.voice_id` | `string` | A voice from `GET /v1/voices` (its `voice_id`). |
| `voice.model` | `string` | The TTS model. Kept for compatibility; prefer quality_tier. |
| `voice.style` | `string` | Delivery direction, e.g. `warm, friendly and natural`. With `style_mode: dynamic` it is the fallback. |
| `voice.style_mode` | `"dynamic" \| "fixed"` | `dynamic`: the model adapts the delivery to the caller per reply. `fixed`: `style` is always used. |
| `voice.expressions` | `boolean` | Let the model add vocal events (breaths, laughs, pauses). |
| `voice.tier` | `"auto" \| "premium" \| "lite"` | TTS tier: `auto` (the plan's default), `premium` or `lite`. |
| `voice.quality_tier` | `"fast" \| "standard" \| "advanced" \| "custom"` | The neutral quality tier: `fast`, `standard`, `advanced` or `custom` (a model this list does not name). Send it instead of `model`; when both are sent, `model` wins. |
| `transcriber` | `AssistantTranscriber` | How the assistant hears. |
| `transcriber.provider` | `"soniox"` | The speech-to-text provider. |
| `transcriber.model` | `string` | The STT model. Kept for compatibility; prefer quality_tier. |
| `transcriber.language_hints` | `string[]` | Languages to expect (ISO 639-1). |
| `transcriber.strict_language_hints` | `boolean` | Only transcribe the hinted languages. |
| `transcriber.terms` | `string[]` | Words and names to recognise better (products, people, places). |
| `transcriber.context` | `string` | Free text that helps recognition (the business, the topic). |
| `transcriber.quality_tier` | `"fast" \| "standard" \| "advanced" \| "custom"` | The neutral quality tier: `fast`, `standard`, `advanced` or `custom` (a model this list does not name). Send it instead of `model`; when both are sent, `model` wins. |
| `llm` | `AssistantLlm` | The language model behind the assistant. |
| `llm.provider` | `"openai"` | The language-model provider. |
| `llm.model` | `string` | The model id the assistant runs on. Kept for compatibility; prefer quality_tier. |
| `llm.temperature` | `number` | Sampling temperature, 0–2. |
| `llm.max_output_tokens` | `integer` | The longest reply, in tokens. |
| `llm.quality_tier` | `"fast" \| "standard" \| "advanced" \| "custom"` | The neutral quality tier: `fast`, `standard`, `advanced` or `custom` (a model this list does not name). Send it instead of `model`; when both are sent, `model` wins. |
| `tools` | `AssistantTools` | The tools the assistant can use. |
| `tools.end_call` | `boolean` | The assistant may end the call (`end_call`). |
| `tools.get_current_time` | `boolean` | The assistant may look up the current date and time. |
| `tools.web_search` | `boolean` | The assistant may search the web. |
| `tools.transfer_call` | `object \| null` | Transfers to a human, or null when the assistant cannot transfer. |
| `tools.add_participant` | `object \| null` | The assistant may add a person to the call (three-way), or null. |
| `tools.custom` | `CustomTool[]` | Your own tools (webhooks). |
| `tools.booking` | `AssistantBookingTools \| null` | The booking tools, or null when the assistant has none. |
| `flow_id` | `string \| null` | `flow_…` ID. |
| `end_call_message` | `string` | Said before the assistant ends the call. |
| `end_call_phrases` | `string[]` | Phrases that end the call when the assistant says them. |
| `max_duration_seconds` | `number` | Calls end after this long. |
| `answering_machine_detection` | `AssistantAnsweringMachineDetection` | Answering-machine detection on outbound calls. |
| `answering_machine_detection.mode` | `"off" \| "hang_up" \| "leave_message"` | On outbound calls: `off`, `hang_up` on a machine, or `leave_message` after the beep. |
| `answering_machine_detection.message` | `string` | The message left with `leave_message`. |
| `answering_machine_detection.max_decision_ms` | `integer` | The longest the verdict may take after answer; unsure counts as a person. |
| `artifacts` | `AssistantArtifacts` | What is kept after a call. |
| `artifacts.recording` | `boolean` | Record the call. |
| `artifacts.transcript` | `boolean` | Keep the transcript. |
| `artifacts.summary` | `boolean` | Write an AI summary (intent, outcome, action items) when the call ends. |
| `artifacts.logging` | `boolean` | Keep the call's event log. |
| `public` | `boolean` | Publishable keys (the browser widget) may start web calls to this assistant. |
| `metadata` | `Metadata` | Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
| `advanced` | `AssistantAdvanced` | Pipeline tuning. The defaults suit most assistants. |
| `advanced.start_speaking_plan` | `object` | — |
| `advanced.stop_speaking_plan` | `object` | — |
| `advanced.intelligent_turn_taking` | `boolean` | Semantic end-of-turn detection instead of fixed silence delays. |
| `advanced.max_endpoint_delay_ms` | `integer` | With intelligent turn taking: the longest wait after speech before the turn ends. |
| `advanced.silence_timeout_seconds` | `number` | End the call after this much silence. |
| `advanced.idle` | `object` | — |
| `advanced.latency` | `object` | — |
| `advanced.expression_tags` | `string[]` | The vocal events the model may use when `voice.expressions` is on. |
| `advanced.llm_routing` | `object` | — |
| `created` | `string` | An ISO-8601 timestamp in UTC. |
| `updated` | `string` | An ISO-8601 timestamp in UTC. |
| `pre_speech_guard` | `AssistantPreSpeechGuard` | Checks every sentence the model writes before it is spoken (with the pre-speech guard enabled for your organization). A sentence with a banned phrase, or one your hook blocks, is not said: `replacement` is said instead (once per reply) or nothing. Each stopped sentence sends `guardrail.triggered`. |
| `pre_speech_guard.banned_phrases` | `string[]` | Phrases the assistant must never say: words (Hebrew or English, matched as whole words, whatever the case, niqqud or prefixes) or `/regex/flags`. |
| `pre_speech_guard.replacement` | `string` | Said instead of a stopped sentence, once per reply; empty: nothing is said. |
| `pre_speech_guard.hook` | `object \| null` | The `assistant.before_speak` webhook: each sentence is POSTed as `{type: "assistant.before_speak", id, call: {id, assistant_id, language}, turn, text, livemode}`, signed like a tool call (Standard Webhooks headers, your tools signing secret). Answer within `timeout_ms` with `{"action": "allow"}`, `{"action": "replace", "text": "…"}` or `{"action": "block"}`. A slower, failed or unreadable answer fails open: the sentence is said. |

Example:

```json
{
  "advanced": {
    "expression_tags": [
      "breath",
      "laugh"
    ],
    "idle": {
      "max_messages": 3,
      "messages": [
        "את/ה עדיין איתי?"
      ],
      "timeout_seconds": 7.5
    },
    "intelligent_turn_taking": false,
    "latency": {
      "acknowledgement_after_ms": 700,
      "acknowledgement_phrases": [
        "אממ…"
      ],
      "acknowledgements": true,
      "early_start": true,
      "early_start_ms": 300,
      "first_chunk_max_words": 25
    },
    "llm_routing": {
      "complex_model": null,
      "complex_quality_tier": null,
      "mode": "off",
      "simple_model": "gpt-4.1-mini",
      "simple_quality_tier": "standard",
      "sticky_turns": 3
    },
    "max_endpoint_delay_ms": 1000,
    "silence_timeout_seconds": 30,
    "start_speaking_plan": {
      "on_no_punctuation_seconds": 1.5,
      "on_number_seconds": 0.5,
      "on_punctuation_seconds": 0.1,
      "smart_endpointing": "off",
      "wait_seconds": 0.4
    },
    "stop_speaking_plan": {
      "backoff_seconds": 1,
      "interruption_confirm_ms": 900,
      "num_words": 0,
      "voice_seconds": 0.2
    }
  },
  "answering_machine_detection": {
    "max_decision_ms": 3500,
    "message": "",
    "mode": "off"
  },
  "artifacts": {
    "logging": true,
    "recording": true,
    "summary": true,
    "transcript": true
  },
  "created": "2026-11-03T09:14:22.000Z",
  "end_call_message": "תודה ששוחחת איתי, יום נעים!",
  "end_call_phrases": [
    "להתראות"
  ],
  "first_message": "שלום, הגעתם למרפאת השרון. איך אפשר לעזור?",
  "first_message_mode": "assistant_speaks_first",
  "flow_id": null,
  "id": "asst_3cYbE6uYvGkH8w4ZK1rTqd",
  "language": "he",
  "livemode": true,
  "llm": {
    "max_output_tokens": 400,
    "model": "gpt-4.1",
    "provider": "openai",
    "quality_tier": "advanced",
    "temperature": 1
  },
  "max_duration_seconds": 600,
  "metadata": {
    "crm_id": "0031x00000AbCdE"
  },
  "name": "Clinic receptionist",
  "object": "assistant",
  "public": false,
  "system_prompt": "You book, move and cancel appointments. Keep answers short.",
  "tools": {
    "add_participant": null,
    "custom": [
      {
        "contract": "legacy",
        "description": "Find free appointment slots for a doctor and date",
        "enabled": true,
        "header_names": [
          "Authorization"
        ],
        "mock_response": "{\"ok\": true}",
        "name": "find_slots",
        "parameters": {
          "properties": {
            "date": {
              "type": "string"
            },
            "doctor": {
              "type": "string"
            }
          },
          "required": [
            "date"
          ],
          "type": "object"
        },
        "request_start_message": "רגע, אני בודקת",
        "timeout_seconds": 15,
        "type": "webhook",
        "url": "https://crm.example.com/voice/tools"
      }
    ],
    "end_call": true,
    "get_current_time": false,
    "transfer_call": {
      "destination": "queue:reception"
    },
    "web_search": false
  },
  "transcriber": {
    "context": "",
    "language_hints": [
      "he",
      "en"
    ],
    "model": "stt-rt-v5",
    "provider": "soniox",
    "quality_tier": "standard",
    "strict_language_hints": false,
    "terms": [
      "השרון"
    ]
  },
  "updated": "2026-11-03T09:14:22.000Z",
  "voice": {
    "expressions": true,
    "model": "gemini-3.8-flash-tts",
    "provider": "gemini",
    "quality_tier": "standard",
    "style": "warm",
    "style_mode": "dynamic",
    "tier": "auto",
    "voice_id": "Kore"
  }
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID (in the path or the body) exists in this organisation and mode. Returns `ErrorEnvelope`.

### 409 Conflict

The request conflicts with the object's state, or the Idempotency-Key was reused with other parameters. Returns `ErrorEnvelope`.

### 413 Payload Too Large

The request body is larger than the endpoint accepts, or has more parts or files than it takes. Returns `ErrorEnvelope`.

### 415 Unsupported Media Type

The request body's Content-Type is not one the endpoint takes. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const assistant = await mv.assistants.create({
	first_message: "שלום, הגעתם למרפאת השרון. איך אפשר לעזור?",
	language: "he",
	metadata: {
		crm_id: "0031x00000AbCdE",
	},
	name: "Clinic receptionist",
	system_prompt: "You book, move and cancel appointments. Keep answers short.",
	tools: {
		custom: [
			{
				description: "Find free appointment slots for a doctor and date",
				headers: {
					Authorization: "Bearer crm-secret",
				},
				name: "find_slots",
				parameters: {
					properties: {
						date: {
							type: "string",
						},
						doctor: {
							type: "string",
						},
					},
					required: [
						"date",
					],
					type: "object",
				},
				url: "https://crm.example.com/voice/tools",
			},
		],
		end_call: true,
		transfer_call: {
			destination: "queue:reception",
		},
	},
	voice: {
		provider: "gemini",
		style: "warm",
		voice_id: "Kore",
	},
});
console.log(assistant);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

assistant = client.assistants.create({
    "first_message": "שלום, הגעתם למרפאת השרון. איך אפשר לעזור?",
    "language": "he",
    "metadata": {
        "crm_id": "0031x00000AbCdE",
    },
    "name": "Clinic receptionist",
    "system_prompt": "You book, move and cancel appointments. Keep answers short.",
    "tools": {
        "custom": [
            {
                "description": "Find free appointment slots for a doctor and date",
                "headers": {
                    "Authorization": "Bearer crm-secret",
                },
                "name": "find_slots",
                "parameters": {
                    "properties": {
                        "date": {
                            "type": "string",
                        },
                        "doctor": {
                            "type": "string",
                        },
                    },
                    "required": [
                        "date",
                    ],
                    "type": "object",
                },
                "url": "https://crm.example.com/voice/tools",
            },
        ],
        "end_call": True,
        "transfer_call": {
            "destination": "queue:reception",
        },
    },
    "voice": {
        "provider": "gemini",
        "style": "warm",
        "voice_id": "Kore",
    },
})
print(assistant)
```

**cURL**

```sh
curl -X POST https://api.morevoice.ai/v1/assistants \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "first_message": "שלום, הגעתם למרפאת השרון. איך אפשר לעזור?",
  "language": "he",
  "metadata": {
    "crm_id": "0031x00000AbCdE"
  },
  "name": "Clinic receptionist",
  "system_prompt": "You book, move and cancel appointments. Keep answers short.",
  "tools": {
    "custom": [
      {
        "description": "Find free appointment slots for a doctor and date",
        "headers": {
          "Authorization": "Bearer crm-secret"
        },
        "name": "find_slots",
        "parameters": {
          "properties": {
            "date": {
              "type": "string"
            },
            "doctor": {
              "type": "string"
            }
          },
          "required": [
            "date"
          ],
          "type": "object"
        },
        "url": "https://crm.example.com/voice/tools"
      }
    ],
    "end_call": true,
    "transfer_call": {
      "destination": "queue:reception"
    }
  },
  "voice": {
    "provider": "gemini",
    "style": "warm",
    "voice_id": "Kore"
  }
}'
```
