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

# Create Agent



## OpenAPI

````yaml https://originshq.b-cdn.net/openapi_sayna.json post /api/agents
openapi: 3.1.0
info:
  title: core
  version: 0.1.0
servers: []
security: []
paths:
  /api/agents:
    post:
      summary: Create Agent
      operationId: create_agent_api_agents_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallAgentRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                items: {}
                type: array
                title: Response Create Agent Api Agents Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CallAgentRequest:
      properties:
        prompt:
          type: string
          title: Prompt
        agent_name:
          type: string
          title: Agent Name
        agent_phone_number:
          type: string
          title: Agent Phone Number
        voice_id:
          type: string
          title: Voice Id
        welcome_text:
          type: string
          title: Welcome Text
        enabled:
          type: boolean
          title: Enabled
          default: true
        tools:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Tools
        save_stats:
          type: boolean
          title: Save Stats
          default: true
        server_type:
          $ref: '#/components/schemas/ServerType'
          default: DEV
        call_type:
          $ref: '#/components/schemas/CallType'
        provider_type:
          $ref: '#/components/schemas/ProviderType'
          default: EXOTEL
        llm_config_json:
          additionalProperties: true
          type: object
          title: Llm Config Json
          default: {}
        audio_config_json:
          additionalProperties: true
          type: object
          title: Audio Config Json
          default: {}
        call_settings_json:
          additionalProperties: true
          type: object
          title: Call Settings Json
          default: {}
        analytics_config_json:
          additionalProperties: true
          type: object
          title: Analytics Config Json
          default: {}
        tools_config_json:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tools Config Json
        created_from_template_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created From Template Id
        created_from_template_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created From Template Version
      type: object
      required:
        - prompt
        - agent_name
        - agent_phone_number
        - voice_id
        - welcome_text
        - call_type
      title: CallAgentRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ServerType:
      type: string
      enum:
        - LOCAL
        - DEV
        - QA
        - PROD
      title: ServerType
    CallType:
      type: string
      enum:
        - INCOMING
        - OUTGOING
      title: CallType
    ProviderType:
      type: string
      enum:
        - EXOTEL
        - PLIVO_CX
        - PLIVO_L
      title: ProviderType
      description: Telephony provider types for call agents.
    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

````