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

# Create Agent

> Create a new AI voice agent. Requires API key authentication via Authorization: Bearer or X-API-Key header.



## OpenAPI

````yaml POST /agent
openapi: 3.1.0
info:
  title: Stride Agents API
  description: >

    Build and deploy AI voice agents that can make and receive phone calls with
    natural conversation.


    ## Authentication


    All endpoints require an API key passed via the `Authorization` header:


    ```

    Authorization: Bearer sk_your_api_key

    ```


    ## Resources


    - **Agents** — Create and configure AI voice agents

    - **Calls** — Initiate, monitor, and manage voice calls

    - **Phone Numbers** — Manage phone numbers and routing

    - **Tools** — Define function calling tools for agents

    - **Knowledge Bases** — Upload documents for RAG-powered conversations

    - **Voices** — Browse available TTS voices
  version: 1.0.0
servers:
  - url: /v1
security: []
paths:
  /agent:
    post:
      tags:
        - Agents
      summary: Create an agent
      description: >-
        Create a new AI voice agent. Requires API key authentication via
        Authorization: Bearer or X-API-Key header.
      operationId: create_agent_agent_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    CreateAgentRequest:
      properties:
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          description: Agent display name
        system_prompt:
          type: string
          title: System Prompt
          description: System prompt for the LLM
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description of the agent
        model_provider:
          type: string
          title: Model Provider
          description: LLM provider (e.g. 'openai', 'anthropic')
          default: openai
        model_name:
          type: string
          title: Model Name
          description: Model identifier
          default: gpt-4o-mini-cluster
        temperature:
          type: number
          maximum: 2
          minimum: 0
          title: Temperature
          description: LLM sampling temperature
          default: 0.5
        max_tokens:
          type: integer
          maximum: 8192
          minimum: 1
          title: Max Tokens
          description: Max tokens per LLM response
          default: 250
        first_message:
          anyOf:
            - type: string
            - type: 'null'
          title: First Message
          description: Opening message spoken by the agent
        first_message_mode:
          type: string
          title: First Message Mode
          description: 'Who speaks first: ''agent_speaks_first'' or ''user_speaks_first'''
          default: agent_speaks_first
        voice_provider:
          type: string
          title: Voice Provider
          description: TTS provider
          default: 11labs
        voice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice Id
          description: Provider-specific voice identifier
        voice_model:
          type: string
          title: Voice Model
          description: Voice model identifier
          default: eleven_turbo_v2_5
        voice_stability:
          type: number
          maximum: 1
          minimum: 0
          title: Voice Stability
          default: 0.5
        voice_similarity:
          type: number
          maximum: 1
          minimum: 0
          title: Voice Similarity
          default: 0.75
        voice_speed:
          type: number
          maximum: 2
          minimum: 0.5
          title: Voice Speed
          default: 1
        transcriber_provider:
          type: string
          title: Transcriber Provider
          description: STT provider
          default: deepgram
        transcriber_model:
          type: string
          title: Transcriber Model
          description: STT model identifier
          default: nova-3
        transcriber_language:
          type: string
          title: Transcriber Language
          description: BCP-47 language code
          default: en
        background_sound:
          type: string
          title: Background Sound
          description: Preset background sound name
          default: office
        background_sound_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Background Sound Url
          description: Custom background audio URL
        max_duration:
          type: integer
          maximum: 43200
          minimum: 10
          title: Max Duration
          description: Maximum call duration in seconds
          default: 600
        silence_timeout:
          type: integer
          maximum: 300
          minimum: 5
          title: Silence Timeout
          description: Silence timeout in seconds
          default: 30
        enable_end_call:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enable End Call
          description: Allow agent to end the call
        voicemail_detection:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Voicemail Detection
          description: Enable voicemail detection
        voicemail_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Voicemail Message
          description: Message to leave on voicemail
        server_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Server Url
          description: Webhook URL for server-side events
        tool_ids:
          items: {}
          type: array
          title: Tool Ids
          description: Tool IDs to attach to the agent
        rag_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Rag Enabled
          description: Enable retrieval-augmented generation
        rag_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Rag Config
          description: RAG configuration object
        hipaa_compliance:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hipaa Compliance
          description: Enable HIPAA compliance mode
        audio_recording:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Audio Recording
          description: Record audio for this agent
        logging:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Logging
          description: Enable call logging
        transcript_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Transcript Enabled
          description: Save call transcripts
      type: object
      required:
        - name
        - system_prompt
      title: CreateAgentRequest
      description: >-
        Create a new AI agent.


        Only name and system_prompt are required. All other fields default to
        the

        same values as the database defaults so callers can omit them.
    AgentResponse:
      properties:
        id:
          type: string
          title: Id
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        model_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Provider
        model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Name
        system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: System Prompt
        temperature:
          anyOf:
            - type: number
            - type: 'null'
          title: Temperature
        max_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Tokens
        first_message:
          anyOf:
            - type: string
            - type: 'null'
          title: First Message
        first_message_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: First Message Mode
        voice_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice Provider
        voice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice Id
        voice_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Voice Model
        voice_stability:
          anyOf:
            - type: number
            - type: 'null'
          title: Voice Stability
        voice_similarity:
          anyOf:
            - type: number
            - type: 'null'
          title: Voice Similarity
        voice_speed:
          anyOf:
            - type: number
            - type: 'null'
          title: Voice Speed
        transcriber_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Transcriber Provider
        transcriber_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Transcriber Model
        transcriber_language:
          anyOf:
            - type: string
            - type: 'null'
          title: Transcriber Language
        background_sound:
          anyOf:
            - type: string
            - type: 'null'
          title: Background Sound
        background_sound_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Background Sound Url
        max_duration:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Duration
        silence_timeout:
          anyOf:
            - type: integer
            - type: 'null'
          title: Silence Timeout
        enable_end_call:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enable End Call
        voicemail_detection:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Voicemail Detection
        voicemail_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Voicemail Message
        server_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Server Url
        tool_ids:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Tool Ids
        rag_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Rag Enabled
        rag_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Rag Config
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        deleted_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Deleted At
        hipaa_compliance:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hipaa Compliance
        audio_recording:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Audio Recording
        logging:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Logging
        transcript_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Transcript Enabled
      type: object
      required:
        - id
        - name
      title: AgentResponse
      description: Full agent object returned by the API.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer

````