Vapi Sessions API

Stateful sessions that persist conversation history across calls and chats so an assistant can pick up where the customer left off.

Vapi Sessions API is one of 15 APIs that Vapi publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 1 machine-runnable capability that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko.

Tagged areas include Sessions, Voice AI, and State. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, and 1 Naftiko capability spec.

OpenAPI Specification

vapi-sessions-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Vapi Sessions API
  description: Vapi API — Sessions resource. Voice AI for developers.
  version: '1.0'
  contact:
    name: Vapi
    url: https://vapi.ai
servers:
- url: https://api.vapi.ai
security:
- bearer: []
tags:
- name: Sessions
  description: Sessions endpoints.
paths:
  /session:
    post:
      operationId: SessionController_create
      summary: Create Session
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSessionDTO'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
      tags:
      - Sessions
      security:
      - bearer: []
    get:
      operationId: SessionController_findAllPaginated
      summary: List Sessions
      parameters:
      - name: id
        required: false
        in: query
        description: This is the unique identifier for the session to filter by.
        schema:
          type: string
      - name: name
        required: false
        in: query
        description: This is the name of the session to filter by.
        schema:
          type: string
      - name: assistantId
        required: false
        in: query
        description: This is the ID of the assistant to filter sessions by.
        schema:
          type: string
      - name: assistantIdAny
        required: false
        in: query
        description: Filter by multiple assistant IDs. Provide as comma-separated values.
        schema:
          example: assistant-1,assistant-2,assistant-3
          type: string
      - name: squadId
        required: false
        in: query
        description: This is the ID of the squad to filter sessions by.
        schema:
          type: string
      - name: workflowId
        required: false
        in: query
        description: This is the ID of the workflow to filter sessions by.
        schema:
          type: string
      - required: false
        description: 'This is the flag to toggle the E164 check for the `number` field. This is an advanced property which
          should be used if you know your use case requires it.


          Use cases:

          - `false`: To allow non-E164 numbers like `+001234567890`, `1234`, or `abc`. This is useful for dialing out to non-E164
          numbers on your SIP trunks.

          - `true` (default): To allow only E164 numbers like `+14155551234`. This is standard for PSTN calls.


          If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`).


          @default true (E164 check is enabled)'
        name: numberE164CheckEnabled
        in: query
        schema:
          default: true
          type: boolean
      - required: false
        description: This is the extension that will be dialed after the call is answered.
        name: extension
        in: query
        schema:
          maxLength: 10
          example: null
          type: string
      - name: assistantOverrides
        required: false
        description: 'These are the overrides for the assistant''s settings and template variables specific to this customer.

          This allows customization of the assistant''s behavior for individual customers in batch calls.'
        allOf:
        - $ref: '#/components/schemas/AssistantOverrides'
        in: query
        schema: {}
      - required: false
        description: This is the number of the customer.
        name: number
        in: query
        schema:
          minLength: 3
          maxLength: 40
          type: string
      - required: false
        description: This is the SIP URI of the customer.
        name: sipUri
        in: query
        schema:
          type: string
      - required: false
        description: 'This is the name of the customer. This is just for your own reference.


          For SIP inbound calls, this is extracted from the `From` SIP header with format `"Display Name" <sip:username@domain>`.'
        name: name
        in: query
        schema:
          maxLength: 40
          type: string
      - required: false
        description: This is the email of the customer.
        name: email
        in: query
        schema:
          maxLength: 40
          type: string
      - required: false
        description: This is the external ID of the customer.
        name: externalId
        in: query
        schema:
          maxLength: 40
          type: string
      - name: customerNumberAny
        required: false
        in: query
        description: Filter by any of the specified customer phone numbers (comma-separated).
        schema:
          example: +1234567890,+0987654321
          type: string
      - name: phoneNumberId
        required: false
        in: query
        description: This will return sessions with the specified phoneNumberId.
        schema:
          type: string
      - name: phoneNumberIdAny
        required: false
        in: query
        description: This will return sessions with any of the specified phoneNumberIds.
        schema:
          type: array
          items:
            type: string
      - name: page
        required: false
        in: query
        description: This is the page number to return. Defaults to 1.
        schema:
          minimum: 1
          type: number
      - name: sortOrder
        required: false
        in: query
        description: This is the sort order for pagination. Defaults to 'DESC'.
        schema:
          enum:
          - ASC
          - DESC
          type: string
      - name: sortBy
        required: false
        in: query
        description: This is the column to sort by. Defaults to 'createdAt'.
        schema:
          enum:
          - createdAt
          - duration
          - cost
          type: string
      - name: limit
        required: false
        in: query
        description: This is the maximum number of items to return. Defaults to 100.
        schema:
          minimum: 0
          maximum: 1000
          type: number
      - name: createdAtGt
        required: false
        in: query
        description: This will return items where the createdAt is greater than the specified value.
        schema:
          format: date-time
          type: string
      - name: createdAtLt
        required: false
        in: query
        description: This will return items where the createdAt is less than the specified value.
        schema:
          format: date-time
          type: string
      - name: createdAtGe
        required: false
        in: query
        description: This will return items where the createdAt is greater than or equal to the specified value.
        schema:
          format: date-time
          type: string
      - name: createdAtLe
        required: false
        in: query
        description: This will return items where the createdAt is less than or equal to the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtGt
        required: false
        in: query
        description: This will return items where the updatedAt is greater than the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtLt
        required: false
        in: query
        description: This will return items where the updatedAt is less than the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtGe
        required: false
        in: query
        description: This will return items where the updatedAt is greater than or equal to the specified value.
        schema:
          format: date-time
          type: string
      - name: updatedAtLe
        required: false
        in: query
        description: This will return items where the updatedAt is less than or equal to the specified value.
        schema:
          format: date-time
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionPaginatedResponse'
      tags:
      - Sessions
      security:
      - bearer: []
  /session/{id}:
    get:
      operationId: SessionController_findOne
      summary: Get Session
      parameters:
      - name: id
        required: true
        in: path
        description: The unique identifier for the resource.
        schema:
          format: uuid
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
      tags:
      - Sessions
      security:
      - bearer: []
    patch:
      operationId: SessionController_update
      summary: Update Session
      parameters:
      - name: id
        required: true
        in: path
        description: The unique identifier for the resource.
        schema:
          format: uuid
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSessionDTO'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
      tags:
      - Sessions
      security:
      - bearer: []
    delete:
      operationId: SessionController_remove
      summary: Delete Session
      parameters:
      - name: id
        required: true
        in: path
        description: The unique identifier for the resource.
        schema:
          format: uuid
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
      tags:
      - Sessions
      security:
      - bearer: []
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: Retrieve your API Key from [Dashboard](dashboard.vapi.ai).
  schemas:
    AWSIAMCredentialsAuthenticationPlan:
      type: object
      properties:
        type:
          type: string
          enum:
          - aws-iam
        awsAccessKeyId:
          type: string
          description: AWS Access Key ID. This is not returned in the API.
          maxLength: 128
        awsSecretAccessKey:
          type: string
          description: AWS Secret Access Key. This is not returned in the API.
          maxLength: 256
      required:
      - type
      - awsAccessKeyId
      - awsSecretAccessKey
    AWSStsAuthenticationPlan:
      type: object
      properties:
        type:
          type: string
          description: This is the type of authentication plan
          enum:
          - aws-sts
        roleArn:
          type: string
          description: This is the role ARN for the AWS credential
        externalId:
          type: string
          description: Optional external ID for additional security in the role trust policy.
          maxLength: 256
      required:
      - type
      - roleArn
    AnalysisCost:
      type: object
      properties:
        type:
          type: string
          description: This is the type of cost, always 'analysis' for this class.
          enum:
          - analysis
        analysisType:
          type: string
          description: This is the type of analysis performed.
          enum:
          - summary
          - structuredData
          - successEvaluation
          - structuredOutput
        model:
          type: object
          description: This is the model that was used to perform the analysis.
        promptTokens:
          type: number
          description: This is the number of prompt tokens used in the analysis.
        completionTokens:
          type: number
          description: This is the number of completion tokens generated in the analysis.
        cachedPromptTokens:
          type: number
          description: This is the number of cached prompt tokens used in the analysis. This is only applicable to certain
            providers (e.g., OpenAI, Azure OpenAI) that support prompt caching. Cached tokens are billed at a discounted rate.
        cost:
          type: number
          description: This is the cost of the component in USD.
      required:
      - type
      - analysisType
      - model
      - promptTokens
      - completionTokens
      - cost
    AnalysisPlan:
      type: object
      properties:
        minMessagesThreshold:
          type: number
          description: 'The minimum number of messages required to run the analysis plan.

            If the number of messages is less than this, analysis will be skipped.


            @default 2'
          deprecated: true
          minimum: 0
        summaryPlan:
          description: This is the plan for generating the summary of the call. This outputs to `call.analysis.summary`.
          deprecated: true
          allOf:
          - $ref: '#/components/schemas/SummaryPlan'
        structuredDataPlan:
          description: This is the plan for generating the structured data from the call. This outputs to `call.analysis.structuredData`.
          deprecated: true
          allOf:
          - $ref: '#/components/schemas/StructuredDataPlan'
        structuredDataMultiPlan:
          description: This is an array of structured data plan catalogs. Each entry includes a `key` and a `plan` for generating
            the structured data from the call. This outputs to `call.analysis.structuredDataMulti`.
          deprecated: true
          type: array
          items:
            $ref: '#/components/schemas/StructuredDataMultiPlan'
        successEvaluationPlan:
          description: This is the plan for generating the success evaluation of the call. This outputs to `call.analysis.successEvaluation`.
          deprecated: true
          allOf:
          - $ref: '#/components/schemas/SuccessEvaluationPlan'
        outcomeIds:
          description: 'This is an array of outcome UUIDs to be calculated during analysis.

            The outcomes will be calculated and stored in `call.analysis.outcomes`.'
          deprecated: true
          type: array
          items:
            type: string
    AnthropicBedrockModel:
      type: object
      properties:
        messages:
          description: This is the starting state for the conversation.
          type: array
          items:
            $ref: '#/components/schemas/OpenAIMessage'
        tools:
          type: array
          description: 'These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.


            Both `tools` and `toolIds` can be used together.'
          items:
            oneOf:
            - $ref: '#/components/schemas/CreateApiRequestToolDTO'
              title: ApiRequestTool
            - $ref: '#/components/schemas/CreateBashToolDTO'
              title: BashTool
            - $ref: '#/components/schemas/CreateCodeToolDTO'
              title: CodeTool
            - $ref: '#/components/schemas/CreateComputerToolDTO'
              title: ComputerTool
            - $ref: '#/components/schemas/CreateDtmfToolDTO'
              title: DtmfTool
            - $ref: '#/components/schemas/CreateEndCallToolDTO'
              title: EndCallTool
            - $ref: '#/components/schemas/CreateFunctionToolDTO'
              title: FunctionTool
            - $ref: '#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO'
              title: GoHighLevelCalendarAvailabilityTool
            - $ref: '#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO'
              title: GoHighLevelCalendarEventCreateTool
            - $ref: '#/components/schemas/CreateGoHighLevelContactCreateToolDTO'
              title: GoHighLevelContactCreateTool
            - $ref: '#/components/schemas/CreateGoHighLevelContactGetToolDTO'
              title: GoHighLevelContactGetTool
            - $ref: '#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO'
              title: GoogleCalendarCheckAvailabilityTool
            - $ref: '#/components/schemas/CreateGoogleCalendarCreateEventToolDTO'
              title: GoogleCalendarCreateEventTool
            - $ref: '#/components/schemas/CreateGoogleSheetsRowAppendToolDTO'
              title: GoogleSheetsRowAppendTool
            - $ref: '#/components/schemas/CreateHandoffToolDTO'
              title: HandoffTool
            - $ref: '#/components/schemas/CreateMcpToolDTO'
              title: McpTool
            - $ref: '#/components/schemas/CreateQueryToolDTO'
              title: QueryTool
            - $ref: '#/components/schemas/CreateSlackSendMessageToolDTO'
              title: SlackSendMessageTool
            - $ref: '#/components/schemas/CreateSmsToolDTO'
              title: SmsTool
            - $ref: '#/components/schemas/CreateTextEditorToolDTO'
              title: TextEditorTool
            - $ref: '#/components/schemas/CreateTransferCallToolDTO'
              title: TransferCallTool
            - $ref: '#/components/schemas/CreateSipRequestToolDTO'
              title: SipRequestTool
            - $ref: '#/components/schemas/CreateVoicemailToolDTO'
              title: VoicemailTool
        toolIds:
          description: 'These are the tools that the assistant can use during the call. To use transient tools, use `tools`.


            Both `tools` and `toolIds` can be used together.'
          type: array
          items:
            type: string
        knowledgeBase:
          description: These are the options for the knowledge base.
          oneOf:
          - $ref: '#/components/schemas/CreateCustomKnowledgeBaseDTO'
            title: Custom
        provider:
          type: string
          description: The provider identifier for Anthropic via AWS Bedrock.
          enum:
          - anthropic-bedrock
        model:
          type: string
          description: The specific Anthropic/Claude model that will be used via Bedrock.
          enum:
          - claude-3-opus-20240229
          - claude-3-sonnet-20240229
          - claude-3-haiku-20240307
          - claude-3-5-sonnet-20240620
          - claude-3-5-sonnet-20241022
          - claude-3-5-haiku-20241022
          - claude-3-7-sonnet-20250219
          - claude-opus-4-20250514
          - claude-opus-4-5-20251101
          - claude-opus-4-6
          - claude-sonnet-4-20250514
          - claude-sonnet-4-5-20250929
          - claude-sonnet-4-6
          - claude-haiku-4-5-20251001
        thinking:
          description: 'Optional configuration for Anthropic''s thinking feature.

            Only applicable for claude-3-7-sonnet-20250219 model.

            If provided, maxTokens must be greater than thinking.budgetTokens.'
          allOf:
          - $ref: '#/components/schemas/AnthropicThinkingConfig'
        temperature:
          type: number
          description: This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
          minimum: 0
          maximum: 2
        maxTokens:
          type: number
          description: This is the max number of tokens that the assistant will be allowed to generate in each turn of the
            conversation. Default is 250.
          minimum: 50
          maximum: 10000
        emotionRecognitionEnabled:
          type: boolean
          description: 'This determines whether we detect user''s emotion while they speak and send it as an additional info
            to model.


            Default `false` because the model is usually are good at understanding the user''s emotion from text.


            @default false'
        numFastTurns:
          type: number
          description: 'This sets how many turns at the start of the conversation to use a smaller, faster model from the
            same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.


            Default is 0.


            @default 0'
          minimum: 0
      required:
      - provider
      - model
    AnthropicModel:
      type: object
      properties:
        messages:
          description: This is the starting state for the conversation.
          type: array
          items:
            $ref: '#/components/schemas/OpenAIMessage'
        tools:
          type: array
          description: 'These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.


            Both `tools` and `toolIds` can be used together.'
          items:
            oneOf:
            - $ref: '#/components/schemas/CreateApiRequestToolDTO'
              title: ApiRequestTool
            - $ref: '#/components/schemas/CreateBashToolDTO'
              title: BashTool
            - $ref: '#/components/schemas/CreateCodeToolDTO'
              title: CodeTool
            - $ref: '#/components/schemas/CreateComputerToolDTO'
              title: ComputerTool
            - $ref: '#/components/schemas/CreateDtmfToolDTO'
              title: DtmfTool
            - $ref: '#/components/schemas/CreateEndCallToolDTO'
              title: EndCallTool
            - $ref: '#/components/schemas/CreateFunctionToolDTO'
              title: FunctionTool
            - $ref: '#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO'
              title: GoHighLevelCalendarAvailabilityTool
            - $ref: '#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO'
              title: GoHighLevelCalendarEventCreateTool
            - $ref: '#/components/schemas/CreateGoHighLevelContactCreateToolDTO'
              title: GoHighLevelContactCreateTool
            - $ref: '#/components/schemas/CreateGoHighLevelContactGetToolDTO'
              title: GoHighLevelContactGetTool
            - $ref: '#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO'
              title: GoogleCalendarCheckAvailabilityTool
            - $ref: '#/components/schemas/CreateGoogleCalendarCreateEventToolDTO'
              title: GoogleCalendarCreateEventTool
            - $ref: '#/components/schemas/CreateGoogleSheetsRowAppendToolDTO'
              title: GoogleSheetsRowAppendTool
            - $ref: '#/components/schemas/CreateHandoffToolDTO'
              title: HandoffTool
            - $ref: '#/components/schemas/CreateMcpToolDTO'
              title: McpTool
            - $ref: '#/components/schemas/CreateQueryToolDTO'
              title: QueryTool
            - $ref: '#/components/schemas/CreateSlackSendMessageToolDTO'
              title: SlackSendMessageTool
            - $ref: '#/components/schemas/CreateSmsToolDTO'
              title: SmsTool
            - $ref: '#/components/schemas/CreateTextEditorToolDTO'
              title: TextEditorTool
            - $ref: '#/components/schemas/CreateTransferCallToolDTO'
              title: TransferCallTool
            - $ref: '#/components/schemas/CreateSipRequestToolDTO'
              title: SipRequestTool
            - $ref: '#/components/schemas/CreateVoicemailToolDTO'
              title: VoicemailTool
        toolIds:
          description: 'These are the tools that the assistant can use during the call. To use transient tools, use `tools`.


            Both `tools` and `toolIds` can be used together.'
          type: array
          items:
            type: string
        knowledgeBase:
          description: These are the options for the knowledge base.
          oneOf:
          - $ref: '#/components/schemas/CreateCustomKnowledgeBaseDTO'
            title: Custom
        model:
          type: string
          description: The specific Anthropic/Claude model that will be used.
          enum:
          - claude-3-opus-20240229
          - claude-3-sonnet-20240229
          - claude-3-haiku-20240307
          - claude-3-5-sonnet-20240620
          - claude-3-5-sonnet-20241022
          - claude-3-5-haiku-20241022
          - claude-3-7-sonnet-20250219
          - claude-opus-4-20250514
          - claude-opus-4-5-20251101
          - claude-opus-4-6
          - claude-sonnet-4-20250514
          - claude-sonnet-4-5-20250929
          - claude-sonnet-4-6
          - claude-haiku-4-5-20251001
        provider:
          type: string
          description: The provider identifier for Anthropic.
          enum:
          - anthropic
        thinking:
          description: 'Optional configuration for Anthropic''s thinking feature.

            Only applicable for claude-3-7-sonnet-20250219 model.

            If provided, maxTokens must be greater than thinking.budgetTokens.'
          allOf:
          - $ref: '#/components/schemas/AnthropicThinkingConfig'
        temperature:
          type: number
          description: This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
          minimum: 0
          maximum: 2
        maxTokens:
          type: number
          description: This is the max number of tokens that the assistant will be allowed to generate in each turn of the
            conversation. Default is 250.
          minimum: 50
          maximum: 10000
        emotionRecognitionEnabled:
          type: boolean
          description: 'This determines whether we detect user''s emotion while they speak and send it as an additional info
            to model.


            Default `false` because the model is usually are good at understanding the user''s emotion from text.


            @default false'
        numFastTurns:
          type: number
          description: 'This sets how many turns at the start of the conversation to use a smaller, faster model from the
            same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.


            Default is 0.


            @default 0'
          minimum: 0
      required:
      - model
      - provider
    AnthropicThinkingConfig:
      type: object
      properties:
        type:
          type: string
          enum:
          - enabled
        budgetTokens:
          type: number
          description: 'The maximum number of tokens to allocate for thinking.

            Must be between 1024 and 100000 tokens.'
          minimum: 1024
          maximum: 100000
      required:
      - type
      - budgetTokens
    AnyscaleModel:
      type: object
      properties:
        messages:
          description: This is the starting state for the conversation.
          type: array
          items:
            $ref: '#/components/schemas/OpenAIMessage'
        tools:
          type: array
          description: 'These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.


            Both `tools` and `toolIds` can be used together.'
          items:
            oneOf:
            - $ref: '#/components/schemas/CreateApiRequestToolDTO'
              title: ApiRequestTool
            - $ref: '#/components/schemas/CreateBashToolDTO'
              title: BashTool
            - $ref: '#/components/schemas/CreateCodeToolDTO'
              title: CodeTool
            - $ref: '#/components/schemas/CreateComputerToolDTO'
              title: ComputerTool
            - $ref: '#/components/schemas/CreateDtmfToolDTO'
              title: DtmfTool
            - $ref: '#/components/schemas/CreateEndCallToolDTO'
              title: EndCallTool
            - $ref: '#/components/schemas/CreateFunctionToolDTO'
              title: FunctionTool
            - $ref: '#/components/schemas/CreateGoHighLevelCalendarAvailabilityToolDTO'
              title: GoHighLevelCalendarAvailabilityTool
            - $ref: '#/components/schemas/CreateGoHighLevelCalendarEventCreateToolDTO'
              title: GoHighLevelCalendarEventCreateTool
            - $ref: '#/components/schemas/CreateGoHighLevelContactCreateToolDTO'
              title: GoHighLevelContactCreateTool
            - $ref: '#/components/schemas/CreateGoHighLevelContactGetToolDTO'
              title: GoHighLevelContactGetTool
            - $ref: '#/components/schemas/CreateGoogleCalendarCheckAvailabilityToolDTO'
              title: GoogleCalendarCheckAvailabilityTool
            - $ref: '#/components/schemas/CreateGoogleCalendarCreateEventToolDTO'
              title: GoogleCalendarCreateEventTool
            - $ref: '#/components/schemas/CreateGoogleSheetsRowAppendToolDTO'
              title: GoogleSheetsRowAppendTool
            - $ref: '#/components/schemas/CreateHandoffToolDTO'
              title: HandoffTool
            - $ref: '#/components/schemas/CreateMcpToolDTO'
              title: McpTool
            - $ref: '#/components/schemas/CreateQueryToolDTO'
              title: QueryTool
            - $ref: '#/components/schemas/CreateSlackSendMessageToolDTO'
              title: SlackSendMessageTool
            - $ref: '#/components/schemas/CreateSmsToolDTO'
              title: SmsTool
            - $ref: '#/components/schemas/CreateTextEditorToolDTO'
              title: TextEditorTool
            - $ref: '#/components/schemas/CreateTransferCallToolDTO'
              title: TransferCallTool
            - $ref: '#/components/schemas/CreateSipRequestToolDTO'
              title: SipRequestTool
            - $ref: '#/components/schemas/CreateVoicemailToolDTO'
              title: VoicemailTool
        toolIds:
          description: 'These are the tools that the assistant can use during the call. To use transient tools, use `tools`.


            Both `tools` and `toolIds` can be used together.'
          type: array
          items:
            type: string
        knowledgeBase:
          description: These are the options for the knowledge base.
          oneOf:
          - $ref: '#/components/schemas/CreateCustomKnowledgeBaseDTO'
            title: Custom
        provider:
          type: string
          enum:
          - anyscale
        model:
          type: string
          description: This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
        temperature:
          type: number
          description: This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
          minimum: 0
          maximum: 2
        maxTokens:
          type: number
          description: This is the max number of tokens that the assistant will be allowed to generate in each turn of the
            conversation. Default is 250.
          minimum: 50
          maximum: 10000
        emotionRecognitionEnabled:
          type: boolean
          description: 'This determines whether we detect user''s emotion while they speak and send it as an additional info
            to model.


            Default `false` because the model is usually are good at understanding the user''s emotion from text.


            @default false'
        numFastTurns:
          type: number
          description: 'This sets how many turns at the start of the conversation to use a smaller, faster model from the
            same provider before switching to the primary model. Example, gpt-3.5-turbo if provider is openai.


            Default is 0.


            @default 0'
          minimum: 0
      required:
      - provider
      - model
    Artifact:
      type: object
      properties:
        messages:
          type: array
          description: These are the messages that were spoken during the call.
          items:
            oneOf:
            - $ref: '#/components/schemas/UserMessage'
              title: UserMessage
            - $ref: '#/components/schemas/SystemMessage'
              title: SystemMessage
            - $ref: '#/components/schemas/BotMessage'
              title: BotMessage
            - $ref: '#/components/schemas/ToolCallMessage'
              title: ToolCallMessage
            - $ref: '#/components/schemas/ToolCallResultMessage'
              title: ToolCallResultMessage
        messagesOpenAIFormatted:
          description: These are the messages that were spoken during the call, formatted for OpenAI.
          type: array
          items:
            $ref: '#/components/schemas/OpenAIMessage'
        recordingUrl:
          type: string
          description: This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
          deprecated: true
        stereoRecor

# --- truncated at 32 KB (762 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vapi-ai/refs/heads/main/openapi/vapi-sessions-api-openapi.yml