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

# Create a draft version



## OpenAPI

````yaml /api-reference/openapi.json post /v1/assistants/{id}/versions
openapi: 3.1.0
info:
  description: >-
    Larynth control-plane API v1. Errors are RFC 9457 problem+json with a stable
    type URI per code (x-larynth-error-codes). Operations carry
    x-larynth-min-role, x-larynth-auth, x-larynth-scope, x-larynth-idempotency
    and x-larynth-sdk.
  title: Larynth API
  version: 1.0.0
servers:
  - url: https://api-us.larynth.com
    description: US region
security: []
tags:
  - description: Dashboard login and session. Excluded from SDKs.
    name: auth
    x-larynth-sdk: false
  - description: Tenant settings and members. Dashboard session only.
    name: tenants
    x-larynth-sdk: true
  - description: API keys. Dashboard session only.
    name: api-keys
    x-larynth-sdk: true
  - description: Audit log. Dashboard session only.
    name: audit
    x-larynth-sdk: true
  - description: Models and voices available to assistants.
    name: catalog
    x-larynth-sdk: true
  - description: Assistants and their immutable published versions.
    name: assistants
    x-larynth-sdk: true
  - description: Phone numbers and inbound routing.
    name: numbers
    x-larynth-sdk: true
  - description: Contacts and CSV imports.
    name: contacts
    x-larynth-sdk: true
  - description: Consent, revocations, do-not-call and pre-dial decisions.
    name: compliance
    x-larynth-sdk: true
  - description: Outbound campaigns.
    name: campaigns
    x-larynth-sdk: true
  - description: Calls, turns and events.
    name: calls
    x-larynth-sdk: true
  - description: Encrypted call recordings.
    name: recordings
    x-larynth-sdk: true
  - description: Prepaid balance, ledger, top-ups and rates (micro-USD).
    name: billing
    x-larynth-sdk: true
  - description: Webhook endpoints and deliveries (Standard Webhooks signatures).
    name: webhooks
    x-larynth-sdk: true
  - description: >-
      Knowledge bases built from files and websites, attached to assistant
      versions.
    name: knowledge
    x-larynth-sdk: true
  - description: Live updates over WebSocket. Dashboard session only.
    name: realtime
    x-larynth-sdk: true
  - description: Platform operator endpoints. Excluded from SDKs.
    name: admin
    x-larynth-sdk: false
paths:
  /v1/assistants/{id}/versions:
    post:
      tags:
        - assistants
      summary: Create a draft version
      operationId: createAssistantVersion
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssistantVersionSpec'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssistantVersion'
          description: Created
        '400':
          $ref: '#/components/responses/Problem400'
        '401':
          $ref: '#/components/responses/Problem401'
        '403':
          $ref: '#/components/responses/Problem403'
        '404':
          $ref: '#/components/responses/Problem404'
        '409':
          $ref: '#/components/responses/Problem409'
        '422':
          $ref: '#/components/responses/Problem422'
        '429':
          $ref: '#/components/responses/Problem429'
        '500':
          $ref: '#/components/responses/Problem500'
      security:
        - session: []
        - apiKey:
            - assistants:write
components:
  schemas:
    AssistantVersionSpec:
      additionalProperties: false
      properties:
        denoise:
          type: boolean
        fillers:
          items:
            type: string
          maxItems: 20
          type: array
        greeting_text:
          maxLength: 1000
          minLength: 1
          type: string
        interruption_profile:
          $ref: '#/components/schemas/InterruptionProfile'
        knowledge_base_ids:
          description: >-
            Knowledge bases the assistant can search with the search_knowledge
            tool; each must be ready when the version is published
          items:
            type: string
          maxItems: 5
          type: array
          uniqueItems: true
        language:
          pattern: ^[a-z]{2,3}(-[A-Z]{2})?$
          type: string
        latency:
          $ref: '#/components/schemas/LatencySettings'
        llm_fallback_model_ids:
          items:
            type: string
          maxItems: 3
          type: array
        llm_model_id:
          description: Required for cascade
          format: uuid
          type: string
        llm_params:
          additionalProperties: {}
          type: object
        max_call_seconds:
          default: 1800
          format: int64
          maximum: 14400
          minimum: 60
          type: integer
        mode:
          enum:
            - cascade
            - s2s
          type: string
        post_call:
          $ref: '#/components/schemas/PostCallSettings'
          description: Post-call summary, data extraction and success evaluation
        s2s_model_id:
          description: Required for s2s
          format: uuid
          type: string
        s2s_params:
          additionalProperties: {}
          type: object
        stt_model_id:
          description: Required for cascade
          format: uuid
          type: string
        stt_params:
          additionalProperties: {}
          type: object
        system_prompt:
          maxLength: 32000
          type: string
        tools:
          items:
            $ref: '#/components/schemas/AssistantTool'
          maxItems: 32
          type: array
        tts_model_id:
          description: Required for cascade
          format: uuid
          type: string
        tts_params:
          additionalProperties: {}
          type: object
        tts_voice_id:
          description: Required for cascade
          format: uuid
          type: string
        turn_profile:
          $ref: '#/components/schemas/TurnProfile'
      required:
        - mode
        - language
        - system_prompt
        - greeting_text
      type: object
    AssistantVersion:
      additionalProperties: false
      properties:
        assistant_id:
          format: uuid
          type: string
        created_at:
          format: date-time
          type: string
        created_by:
          type: string
        denoise:
          type: boolean
        fillers:
          items:
            type: string
          maxItems: 20
          type: array
        greeting_text:
          maxLength: 1000
          minLength: 1
          type: string
        id:
          format: uuid
          type: string
        interruption_profile:
          $ref: '#/components/schemas/InterruptionProfile'
        knowledge_base_ids:
          description: >-
            Knowledge bases the assistant can search with the search_knowledge
            tool; each must be ready when the version is published
          items:
            type: string
          maxItems: 5
          type: array
          uniqueItems: true
        language:
          pattern: ^[a-z]{2,3}(-[A-Z]{2})?$
          type: string
        latency:
          $ref: '#/components/schemas/LatencySettings'
        llm_fallback_model_ids:
          items:
            type: string
          maxItems: 3
          type: array
        llm_model_id:
          description: Required for cascade
          format: uuid
          type: string
        llm_params:
          additionalProperties: {}
          type: object
        max_call_seconds:
          default: 1800
          format: int64
          maximum: 14400
          minimum: 60
          type: integer
        mode:
          enum:
            - cascade
            - s2s
          type: string
        post_call:
          $ref: '#/components/schemas/PostCallSettings'
          description: Post-call summary, data extraction and success evaluation
        published_at:
          format: date-time
          type: string
        s2s_model_id:
          description: Required for s2s
          format: uuid
          type: string
        s2s_params:
          additionalProperties: {}
          type: object
        stt_model_id:
          description: Required for cascade
          format: uuid
          type: string
        stt_params:
          additionalProperties: {}
          type: object
        system_prompt:
          maxLength: 32000
          type: string
        tools:
          items:
            $ref: '#/components/schemas/AssistantTool'
          maxItems: 32
          type: array
        tts_model_id:
          description: Required for cascade
          format: uuid
          type: string
        tts_params:
          additionalProperties: {}
          type: object
        tts_voice_id:
          description: Required for cascade
          format: uuid
          type: string
        turn_profile:
          $ref: '#/components/schemas/TurnProfile'
        version:
          format: int64
          type: integer
      required:
        - id
        - assistant_id
        - version
        - created_by
        - created_at
        - mode
        - language
        - system_prompt
        - greeting_text
      type: object
    InterruptionProfile:
      additionalProperties: false
      properties:
        enabled:
          type: boolean
        false_interruption_ms:
          format: int64
          maximum: 10000
          minimum: 0
          type: integer
        ignore_words:
          items:
            type: string
          maxItems: 100
          type: array
        keep_echo_words:
          description: >-
            Count caller words that repeat the agent's own reply (line echo) as
            barge-in words
          type: boolean
        min_speech_ms:
          format: int64
          maximum: 10000
          minimum: 0
          type: integer
        min_words:
          format: int64
          maximum: 20
          minimum: 0
          type: integer
        vad_only_min_speech_ms:
          description: >-
            Barge-in on voice activity alone, before the STT has heard a word,
            needs this much speech. Unset is 1000
          format: int64
          maximum: 10000
          minimum: 0
          type: integer
      type: object
    LatencySettings:
      additionalProperties: false
      properties:
        force_finalize:
          description: >-
            Ask the STT provider to end its turn when the turn is committed on a
            non-STT signal. Unset uses the engine node default
          type: boolean
        short_first_chunk:
          description: >-
            Cut the first TTS chunk early and send it as its own utterance for a
            faster first audio. Unset uses the engine node default
          type: boolean
        speculative_tts:
          description: >-
            Synthesise the first chunk of a speculative reply privately and play
            it only if the turn is committed. Unset uses the engine node default
          type: boolean
        speculative_tts_min_prob:
          description: >-
            Minimum eager end-of-turn probability for speculative TTS. Unset
            uses the engine node default
          format: double
          maximum: 1
          minimum: 0
          type: number
      type: object
    PostCallSettings:
      additionalProperties: false
      properties:
        extraction_fields:
          items:
            $ref: '#/components/schemas/ExtractionField'
          maxItems: 30
          type: array
        success_criteria:
          description: When set, the analysis also returns successful and reason
          maxLength: 2000
          type: string
        summary_enabled:
          description: Unset is true
          type: boolean
        summary_prompt:
          description: Overrides the default summary instruction
          maxLength: 2000
          type: string
      type: object
    AssistantTool:
      additionalProperties: false
      properties:
        class:
          enum:
            - fast
            - slow
            - terminal
          type: string
        config:
          additionalProperties: {}
          type: object
        description:
          maxLength: 2000
          minLength: 1
          type: string
        destinations:
          description: >-
            Transfer tools only (kind transfer, name transfer_call): where the
            agent may transfer the caller
          items:
            $ref: '#/components/schemas/TransferDestination'
          maxItems: 20
          type: array
        endpoint_ref:
          maxLength: 200
          type: string
        json_schema:
          additionalProperties: {}
          type: object
        kind:
          enum:
            - end_call
            - opt_out
            - http_request
            - transfer
          type: string
        name:
          pattern: ^[a-z][a-z0-9_]{0,63}$
          type: string
        timeout_ms:
          default: 8000
          format: int64
          maximum: 30000
          minimum: 100
          type: integer
      required:
        - name
        - kind
        - description
        - json_schema
        - class
      type: object
    TurnProfile:
      additionalProperties: false
      properties:
        commit_prob:
          format: double
          maximum: 1
          minimum: 0
          type: number
        commit_without_words:
          description: >-
            With STT end-of-turn primary, commit turns the STT heard no words in
            instead of discarding them as noise or echo
          type: boolean
        eager_prob:
          format: double
          maximum: 1
          minimum: 0
          type: number
        hold_max_ms:
          description: >-
            Silence a model end-of-turn commit needs at commit_prob; confident
            predictions commit sooner. Unset is 500
          format: int64
          maximum: 5000
          minimum: 0
          type: integer
        hold_min_ms:
          description: >-
            Silence a model end-of-turn commit needs at probability 1. Unset is
            200
          format: int64
          maximum: 5000
          minimum: 0
          type: integer
        max_silence_ms:
          format: int64
          maximum: 30000
          minimum: 0
          type: integer
        min_speech_ms:
          format: int64
          maximum: 10000
          minimum: 0
          type: integer
        stop_silence_ms:
          format: int64
          maximum: 10000
          minimum: 0
          type: integer
        use_stt_eot:
          type: boolean
      type: object
    Problem:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable machine-readable error code; compliance denials carry the
            dial.* rule id
          type: string
        detail:
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
        instance:
          type: string
        retry_at:
          description: Next moment the request may succeed (calling windows)
          format: date-time
          type: string
        status:
          format: int64
          type: integer
        title:
          type: string
        type:
          description: Stable URI identifying the error code
          type: string
      required:
        - type
        - title
        - status
        - code
      type: object
    ExtractionField:
      additionalProperties: false
      properties:
        description:
          maxLength: 500
          type: string
        enum:
          description: Allowed values; required for type enum, rejected otherwise
          items:
            type: string
          maxItems: 20
          type: array
        name:
          pattern: ^[a-z][a-z0-9_]{0,39}$
          type: string
        required:
          description: The model must return a non-null value
          type: boolean
        type:
          enum:
            - string
            - number
            - boolean
            - enum
            - date
          type: string
      required:
        - name
        - type
      type: object
    TransferDestination:
      additionalProperties: false
      properties:
        description:
          description: When to use this destination; shown to the agent
          maxLength: 500
          type: string
        e164:
          description: Phone number; set exactly one of e164 and sip_uri
          pattern: ^\+[1-9][0-9]{1,14}$
          type: string
        mode:
          description: >-
            cold hands the caller over directly; warm puts the caller on hold,
            briefs the human, then bridges
          enum:
            - cold
            - warm
          type: string
        name:
          description: The agent picks a destination by this name
          maxLength: 64
          minLength: 1
          type: string
        ring_timeout_seconds:
          description: >-
            How long to ring the human before returning to the caller. Unset is
            25
          format: int64
          maximum: 60
          minimum: 0
          type: integer
        sip_uri:
          description: 'sip: or sips: URI; cold transfers only, by SIP REFER'
          maxLength: 256
          type: string
        whisper:
          description: >-
            Warm only: what the agent says to the human before bridging.
            Variables {{summary}} and {{destination}}
          maxLength: 1000
          type: string
      required:
        - name
        - mode
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  responses:
    Problem400:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Bad Request
    Problem401:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Unauthorized
    Problem403:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Forbidden
    Problem404:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Not Found
    Problem409:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Conflict
    Problem422:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Unprocessable Entity
    Problem429:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Too Many Requests
    Problem500:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: Internal Server Error
  securitySchemes:
    session:
      description: Dashboard session cookie
      in: cookie
      name: lx_session
      type: apiKey
    apiKey:
      bearerFormat: lx_<key_id>_<secret>
      description: API key; the listed scope is required
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.