> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create agent



## OpenAPI

````yaml /openapi.yml post /v1/agents/create
openapi: 3.0.0
info:
  title: Fluents Hosted API
  description: |2-

            Fluents' Hosted API helps you automate phone calls in minutes. 🚀

            ## Numbers

            You can buy phone lines and place agents on them.

            ## Calls

            You can start, end, and get information about calls.
            
  version: 1.0.0
  contact:
    name: Support
    url: https://fluents.com
    email: support@fluents.ai
servers:
  - url: https://api.fluents.ai
    description: Production
security:
  - bearer: []
tags: []
paths:
  /v1/agents/create:
    post:
      tags:
        - Agents
      operationId: AgentController_createAgent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDto'
components:
  schemas:
    CreateAgentDto:
      type: object
      properties:
        name:
          type: string
          example: My Agent
        prompt:
          $ref: '#/components/schemas/PromptDto'
        language:
          enum:
            - en
            - es
            - de
            - hi
            - pt
            - fr
            - nl
            - id
            - it
            - ja
            - ko
          type: string
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ActionDto'
        voice:
          type: object
        initial_message:
          type: string
          example: Hello, how can I help you today?
        webhook:
          $ref: '#/components/schemas/WebhookDto'
        interrupt_sensitivity:
          enum:
            - low
            - high
          type: string
        context_endpoint:
          type: string
          example: https://api.example.com/context
        noise_suppression:
          type: boolean
          example: true
        endpointing_sensitivity:
          enum:
            - auto
            - relaxed
            - sensitive
          type: string
        ivr_navigation_mode:
          enum:
            - default
            - 'off'
          type: string
        conversation_speed:
          type: number
          example: 0.5
        initial_message_delay:
          type: number
          example: 1000
        openai_model_name_override:
          type: string
          example: gpt-4
        ask_if_human_present_on_idle:
          type: boolean
          example: true
        run_do_not_call_detection:
          type: boolean
          example: true
        llm_fallback:
          type: object
        deepgram_keywords:
          type: object
          example:
            kansas: '10'
        idle_time_seconds:
          type: number
          example: 10
        llm_temperature:
          type: number
          example: 0.5
        enable_recording:
          type: boolean
          example: true
        combine_last_call_context:
          type: boolean
          example: true
        provider:
          type: string
          example: openai
        model:
          type: string
          example: gpt-4
        label:
          type: string
          example: My Agent
        description:
          type: string
          example: This is a description
        transcriber:
          type: object
        call_duration_sec:
          type: number
          example: 10
        max_idle_check_count:
          type: number
          example: 10
        max_aggregate_idle_check_count:
          type: number
        idle_after_interaction_seconds:
          type: number
        voicemail_message:
          type: string
        skills:
          type: array
          items:
            type: object
        min_volume:
          type: number
        post_call_prompt:
          type: string
        post_call_email:
          deprecated: true
          allOf:
            - $ref: '#/components/schemas/PostCallFinalizedEmailDto'
        post_call_sms:
          deprecated: true
          allOf:
            - $ref: '#/components/schemas/PostCallFinalizedSMSDto'
        post_call_actions:
          type: array
          items:
            $ref: '#/components/schemas/PostCallFinalizedActionDto'
        memory_scope:
          enum:
            - single_agent
            - all
          type: string
        activity_actions:
          type: array
          items:
            type: object
        reasoning_effort:
          enum:
            - minimal
            - low
            - medium
            - high
          type: string
        verbosity:
          enum:
            - low
            - medium
            - high
          type: string
        enable_dynamic_turns:
          type: boolean
          example: true
        enable_preload_prompt:
          type: boolean
          example: true
        background_sound:
          enum:
            - ''
            - keyboard
            - office
            - office-2
          type: string
        transfer_on_end:
          type: boolean
          example: true
        dynamic_max_silence_secs:
          type: number
          example: 3
        dynamic_min_wait_secs:
          type: number
          example: 0.2
        enable_dynamic_vm_detection:
          type: boolean
          example: true
        llm_vm_detection_only:
          type: boolean
          example: true
        noise_suppression_level:
          type: number
          minimum: 0
          maximum: 100
          example: 50
        openai_account_connection:
          type: object
          nullable: true
      required:
        - prompt
        - actions
        - voice
    AgentDto:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        user_id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        name:
          type: string
          example: My Agent
        prompt:
          $ref: '#/components/schemas/PromptDto'
        language:
          enum:
            - en
            - es
            - de
            - hi
            - pt
            - fr
            - nl
            - id
            - it
            - ja
            - ko
          type: string
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ActionDto'
        voice:
          type: object
        initial_message:
          type: string
          example: Hello, how can I help you today?
        webhook:
          $ref: '#/components/schemas/WebhookDto'
        interrupt_sensitivity:
          enum:
            - low
            - high
          type: string
        context_endpoint:
          type: string
          example: https://api.example.com/context
        noise_suppression:
          type: boolean
          example: true
        endpointing_sensitivity:
          enum:
            - auto
            - relaxed
            - sensitive
          type: string
        ivr_navigation_mode:
          enum:
            - default
            - 'off'
          type: string
        conversation_speed:
          type: number
          example: 0.5
        initial_message_delay:
          type: number
          example: 1000
        openai_model_name_override:
          type: string
          example: gpt-4
        ask_if_human_present_on_idle:
          type: boolean
          example: true
        openai_account_connection:
          $ref: '#/components/schemas/AccountConnectionDto'
        run_do_not_call_detection:
          type: boolean
          example: true
        llm_fallback:
          type: object
        deepgram_keywords:
          type: object
          example:
            kansas: '10'
        idle_time_seconds:
          type: number
          example: 10
        llm_temperature:
          type: number
          example: 0.5
        enable_recording:
          type: boolean
          example: true
        combine_last_call_context:
          type: boolean
          example: true
        provider:
          type: string
          example: openai
        model:
          type: string
          example: gpt-4
        label:
          type: string
          example: My Agent
        description:
          type: string
          example: This is a description
        transcriber:
          type: object
        call_duration_sec:
          type: number
          example: 10
        max_idle_check_count:
          type: number
          example: 10
        max_aggregate_idle_check_count:
          type: number
        idle_after_interaction_seconds:
          type: number
        voicemail_message:
          type: string
        skills:
          type: array
          items:
            type: object
        min_volume:
          type: number
        post_call_prompt:
          type: string
        post_call_email:
          deprecated: true
          allOf:
            - $ref: '#/components/schemas/PostCallFinalizedEmailDto'
        post_call_sms:
          deprecated: true
          allOf:
            - $ref: '#/components/schemas/PostCallFinalizedSMSDto'
        post_call_actions:
          type: array
          items:
            $ref: '#/components/schemas/PostCallFinalizedActionDto'
        memory_scope:
          enum:
            - single_agent
            - all
          type: string
        activity_actions:
          type: array
          items:
            type: object
        reasoning_effort:
          enum:
            - minimal
            - low
            - medium
            - high
          type: string
        verbosity:
          enum:
            - low
            - medium
            - high
          type: string
        enable_dynamic_turns:
          type: boolean
          example: true
        enable_preload_prompt:
          type: boolean
          example: true
        background_sound:
          enum:
            - ''
            - keyboard
            - office
            - office-2
          type: string
        transfer_on_end:
          type: boolean
          example: true
        dynamic_max_silence_secs:
          type: number
          example: 3
        dynamic_min_wait_secs:
          type: number
          example: 0.2
        enable_dynamic_vm_detection:
          type: boolean
          example: true
        llm_vm_detection_only:
          type: boolean
          example: true
        noise_suppression_level:
          type: number
          minimum: 0
          maximum: 100
          example: 50
      required:
        - id
        - user_id
        - prompt
        - actions
        - voice
    PromptDto:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        user_id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        label:
          type: string
          example: My Prompt
        description:
          type: string
          example: This is a description
        content:
          type: string
          example: You are a helpful assistant...
        context_endpoint:
          type: string
          example: https://api.example.com/context
        collect_fields:
          deprecated: true
          type: array
          items:
            type: string
        type:
          enum:
            - prompt
            - block
          type: string
          example: prompt
        tags:
          example:
            - tag1
            - tag2
          type: array
          items:
            type: string
        prompt_template:
          deprecated: true
          allOf:
            - $ref: '#/components/schemas/PromptTemplateDto'
      required:
        - id
        - user_id
    ActionDto:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        user_id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        type:
          type: string
          enum:
            - action_transfer_call
            - action_end_conversation
            - action_dtmf
            - action_add_to_conference
            - action_trigger_function_call
            - action_trigger_phrase_based
            - action_set_hold
            - action_warm_transfer
            - phrase_condition_type_contains
          example: action_transfer_call
        label:
          type: string
          example: Transfer Call
        description:
          type: string
          example: This is a description
        config:
          type: object
        action_trigger:
          type: object
      required:
        - id
        - user_id
        - type
        - config
    WebhookDto:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        user_id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        subscriptions:
          example:
            - event_message
            - event_action
          type: array
          items:
            type: object
        url:
          type: string
          example: https://example.com/webhook
        method:
          enum:
            - GET
            - POST
          type: string
          example: POST
        label:
          type: string
          example: My Webhook
        description:
          type: string
          example: This is a description
      required:
        - id
        - user_id
        - subscriptions
        - url
    PostCallFinalizedEmailDto:
      type: object
      properties:
        provider_config:
          $ref: '#/components/schemas/ProviderConfigDto'
        from_email:
          type: string
          example: no-reply@example.com
        to_email:
          type: string
          example: user@example.com
        subject:
          type: string
          example: Your call summary
        body:
          type: string
          example: Thanks for your call...
      required:
        - provider_config
        - from_email
        - to_email
        - subject
        - body
    PostCallFinalizedSMSDto:
      type: object
      properties:
        provider_config:
          $ref: '#/components/schemas/ProviderConfigDto'
        from_phone:
          type: string
          example: '+15551234567'
        to_phone:
          type: string
          example: '+15557654321'
        body:
          type: string
          example: Thanks for your call...
      required:
        - provider_config
        - from_phone
        - to_phone
        - body
    PostCallFinalizedActionDto:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        label:
          type: string
          example: Follow-up email
        type:
          enum:
            - email
            - sms
            - trigger_custom_api
          type: string
        provider_config:
          $ref: '#/components/schemas/ProviderConfigDto'
        config:
          oneOf:
            - $ref: '#/components/schemas/PostCallFinalizedEmailConfigDto'
            - $ref: '#/components/schemas/PostCallFinalizedSmsConfigDto'
            - $ref: '#/components/schemas/PostCallFinalizedCustomApiConfigDto'
      required:
        - id
        - type
        - provider_config
        - config
    AccountConnectionDto:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        user_id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        label:
          type: string
          example: My Account Connection
        description:
          type: string
          example: This is a description
        type:
          enum:
            - account_connection_fluents_twilio
            - account_connection_twilio
            - account_connection_openai
            - account_connection_google
            - account_connection_azure_llm
            - account_connection_elevenlabs
            - account_connection_deepgram
            - account_connection_cartesia
            - account_connection_playht
            - account_connection_rime
            - account_connection_azure_speech
            - account_connection_assemblyai
            - account_connection_deepseek
            - account_connection_togetherai
            - account_connection_gladia
            - account_connection_telnyx
            - account_connection_un_pw_oauth
            - account_connection_login_key_oauth
            - account_connection_external_api_key
            - account_connection_sip
          type: string
          example: account_connection_twilio
        credentials:
          type: object
          example:
            twilio_account_sid: AC1234567890
            twilio_auth_token: '1234567890'
        steering_pool:
          example:
            - '+1234567890'
          type: array
          items:
            type: string
        account_supports_any_caller_id:
          type: boolean
          example: false
        config:
          type: object
          example:
            voicemail_detection: {}
      required:
        - id
        - user_id
        - type
        - credentials
        - config
    PromptTemplateDto:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        user_id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        required_context_keys:
          example:
            - tag1
            - tag2
          type: array
          items:
            type: string
        label:
          type: string
          example: My Prompt
      required:
        - id
        - user_id
        - required_context_keys
    ProviderConfigDto:
      type: object
      properties:
        destination_id:
          type: string
      required:
        - destination_id
    PostCallFinalizedEmailConfigDto:
      type: object
      properties:
        from_email:
          type: string
          example: no-reply@example.com
        to_email:
          type: string
          example: user@example.com
        subject:
          type: string
          example: Your call summary
        body:
          type: string
          example: Thanks for your call...
      required:
        - from_email
        - to_email
        - subject
        - body
    PostCallFinalizedSmsConfigDto:
      type: object
      properties:
        from_phone:
          type: string
          example: '+15551234567'
        to_phone:
          type: string
          example: '+15557654321'
        body:
          type: string
          example: Thanks for your call...
      required:
        - from_phone
        - to_phone
        - body
    PostCallFinalizedCustomApiConfigDto:
      type: object
      properties:
        http_method:
          type: string
          example: GET
        relative_uri:
          type: string
          example: /example/endpoint
        headers:
          type: string
          example: '{"key": "value"}'
        body:
          type: string
          example: '{"key": "value"}'
      required:
        - http_method
        - relative_uri
        - headers
        - body
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````