Skip to content

Create an assistant

Create the resource, configure its prompt, then apply the runtime providers. Use the public assistantId returned by the API for subsequent requests.

Terminal window
curl -X POST 'https://client-api.ai4call.com/api/v1/assistants' \
-H "Authorization: Bearer $PORTAL_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name":"Reception","description":"Inbound reception assistant","mode":"text"}'

Save assistantId from the response. Keep assistantApiKey secret: it is needed only where an assistant credential is explicitly required, such as an outbound request.

  1. Update the prompt with PATCH /assistants/{assistantId}/prompt.
  2. Read the supported provider catalog: /catalog/providers/tts, /catalog/providers/asr, /catalog/providers/llm and /catalog/providers/audio-to-audio.
  3. Apply the selected providers with PATCH /assistants/{assistantId}/runtime/tts, /asr, /llm or /audio-to-audio.
  4. Configure number routing, DTMF, tools, RAG and advanced settings as needed.

[!CAUTION] DELETE /assistants/{assistantId} is irreversible. It deletes the assistant configuration and releases associated demo and purchased numbers.

See the Assistants operations for the request schemas.