Skip to content
Discord

Create Assistant

The Create Assistant endpoint allows you to programmatically create a new voice assistant. You can configure its personality, voice, tools, and other settings.

POST /admin/assistant

sequenceDiagram
    participant App as Your App
    participant API as Voice API
    participant DB as Database

    App->>API: POST /admin/assistant
    Note right of App: Includes config, name,
and preferences API->>API: Validate Request API->>DB: Create Assistant Record DB-->>API: Assistant Created API-->>App: 200 OK { assistant_id: "..." }
HeaderTypeRequiredDescription
workspacestringYesYour unique workspace ID.
organizationstringYesYour organization ID.
AuthorizationstringYesBearer token for authentication.
Content-TypestringYesMust be application/json.
ParameterTypeRequiredDescription
namestringYesName of the assistant.
configobjectYesConfiguration object for the assistant.
ParameterTypeRequiredDescription
system_promptstringYesThe persona and instructions for the assistant.
end_messagestringNoMessage to speak when ending the call.
tool_configarrayNoList of tools enabled for the assistant.
modelobjectYesLLM configuration (provider, model).
transcriberobjectYesTranscriber configuration (provider, model).
voiceobjectYesVoice configuration (provider, voiceId, model).
structured_dataarrayNoSchema for structured data extraction.
curl --location 'https://api.voice-agents.miraiminds.co/v1/admin/assistant' \
--header 'workspace: 68a4410242a5c31c24ed063b' \
--header 'organization: 68a44064be1aab154e4806ee' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_TOKEN>' \
--data '{
    "name": "test assistant",
    "config": {
        "system_prompt": "You are a helpful assistant.",
        "end_message": "Goodbye!",
        "tool_config": [],
        "model": {
            "provider": "openai",
            "model": "gpt-4o-mini"
        },
        "transcriber": {
            "provider": "deepgram",
            "model": "nova-3"
        },
        "voice": {
            "provider": "cartesia",
            "voiceId": "791d5162-d5eb-40f0-8189-f19db44611d8",
            "model": "sonic-2"
        },
        "structured_data": []
    }
}'

Returns a JSON object containing the created assistant details.

{
  "success": true,
  "message": "Assistant created successfully",
  "data": {
    "_id": "6927ec5c9322ed9f9fb55c68",
    "name": "test assistant",
    "config": { ... },
    "createdAt": "2025-11-27T10:00:00.000Z"
  }
}