Bluejay Create Simulation API

The Create Simulation API from Bluejay — 1 operation(s) for create simulation.

OpenAPI Specification

bluejay-create-simulation-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Bluejay Agents Create Simulation API
  description: Bluejay API
  version: 0.1.0
servers:
- url: https://api.getbluejay.ai
  description: Production server
security:
- apiKeyAuth: []
tags:
- name: Create Simulation
paths:
  /v1/create-simulation:
    post:
      summary: Create Simulation
      description: 'Create a new simulation with the provided details.


        Returns the simulation id and a status code.'
      operationId: create_simulation_v1_create_simulation_post
      security:
      - HTTPBearer: []
      parameters:
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
        description: API key required to authenticate requests.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulationRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Create Simulation
components:
  schemas:
    SimulationResponse:
      properties:
        simulation_id:
          type: integer
          title: Simulation Id
          description: ID of the created simulation
        status:
          type: string
          title: Status
          description: Status of the response
          default: '200'
      type: object
      required:
      - simulation_id
      title: SimulationResponse
    SimulationRequest:
      properties:
        agent_id:
          type: string
          title: Agent Id
          description: ID of the agent to be used in the simulation
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
          description: Name of the simulation
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Description of the simulation
        prompt_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Prompt Id
          description: Optional default prompt UUID for this simulation
        knowledge_base_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Knowledge Base Id
          description: Optional default knowledge base UUID for this simulation
        sequential_calling:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Sequential Calling
          description: Whether to run the simulation with sequential calling
          default: false
        max_concurrent:
          anyOf:
          - type: integer
            maximum: 500.0
            exclusiveMinimum: 0.0
          - type: 'null'
          title: Max Concurrent
          description: Maximum number of concurrent calls in the simulation (max 500)
        hangup_on_transfer:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Hangup On Transfer
          description: Whether to hang up the call on transfer
          default: false
        max_call_duration:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Call Duration
          description: Maximum duration of each call (default is 10). Units specified by max_call_duration_units
          default: 10
        max_call_duration_units:
          anyOf:
          - type: string
            enum:
            - minutes
            - seconds
          - type: 'null'
          title: Max Call Duration Units
          description: 'Units for max_call_duration: ''minutes'' (default) or ''seconds'''
          default: minutes
        ringing_timeout:
          anyOf:
          - type: integer
          - type: 'null'
          title: Ringing Timeout
          description: Ringing timeout in seconds for SIP trunks (default 300s)
          default: 300
        digital_humans_settings:
          anyOf:
          - $ref: '#/components/schemas/DigitalHumansSettings'
          - type: 'null'
          description: Settings for digital humans in the simulation
        selected_custom_metrics:
          anyOf:
          - items:
              type: string
              format: uuid
            type: array
          - type: 'null'
          title: Selected Custom Metrics
          description: Custom metric IDs to enable for this simulation
        custom_metrics_failing_threshold:
          anyOf:
          - type: integer
            maximum: 100.0
            minimum: 0.0
          - type: 'null'
          title: Custom Metrics Failing Threshold
          description: Score threshold below which a custom metric is considered failing (0-100)
        custom_metrics_passing_threshold:
          anyOf:
          - type: integer
            maximum: 100.0
            minimum: 0.0
          - type: 'null'
          title: Custom Metrics Passing Threshold
          description: Score threshold at or above which a custom metric is considered passing (0-100)
        always_on:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Always On
          description: When true, simulation has always-on digital humans configured
          default: false
      type: object
      required:
      - agent_id
      title: SimulationRequest
      description: Pydantic model for simulation request
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    DigitalHumansSettings:
      properties:
        default_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Name
          description: Default name for the digital human
          default: random
        default_caller_number:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Caller Number
          description: Default caller phone number for the digital human
          default: random
        default_language:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Language
          description: Default language for the digital human
          default: random
        default_background_noise:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Background Noise
          description: Background noise to be used in the simulation
          default: none
        first_message:
          anyOf:
          - type: string
          - type: 'null'
          title: First Message
          description: First message to be spoken by the digital human
          default: ai_generated
        num_runs:
          anyOf:
          - type: integer
            minimum: 1.0
          - type: 'null'
          title: Num Runs
          description: Number of runs per digital human per simulation run (run count).
          default: 1
      type: object
      title: DigitalHumansSettings
      description: Pydantic model for digital humans settings in simulation
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key required to authenticate requests.