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

# create llm

> Create a new LLM configuration



## OpenAPI

````yaml https://api.anam.ai/swagger.json post /v1/llms
openapi: 3.1.0
info:
  title: Anam AI API
  version: '1.0'
servers:
  - url: https://api.anam.ai
    description: Anam API
security:
  - BearerAuth: []
tags:
  - name: Sessions
  - name: Personas
  - name: Avatars
  - name: Voices
  - name: LLMs
  - name: Knowledge
  - name: Tools
  - name: Share Links
paths:
  /v1/llms:
    post:
      tags:
        - LLMs
      summary: create llm
      description: Create a new LLM configuration
      operationId: createLlm
      requestBody:
        description: >-
          Endpoint URLs, model name, and credentials for the LLM. `secret` is
          encrypted at rest and is never returned in subsequent responses. Set
          `llmFormat` to match the upstream API's wire protocol.
        required: true
        content:
          application/json:
            examples:
              default:
                $ref: '#/components/examples/LlmCreate'
            schema:
              type: object
              required:
                - displayName
                - urls
                - llmFormat
                - modelName
                - secret
              properties:
                displayName:
                  type: string
                description:
                  type: string
                urls:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        format: uri
                llmFormat:
                  type: string
                  enum:
                    - openai
                    - azure_openai
                    - groq_openai
                    - gemini
                    - advanced_voice
                    - none
                modelName:
                  type: string
                secret:
                  type: string
                metadata:
                  type: object
                reasoningEffort:
                  type: string
                  enum:
                    - default
                    - low
                    - medium
                    - high
                reasoningFormat:
                  type: string
                  enum:
                    - parsed
                    - raw
                    - hidden
      responses:
        '201':
          description: Successfully created LLM
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LLM'
              examples:
                default:
                  $ref: '#/components/examples/LlmResponse'
        '400':
          description: Bad request - Invalid LLM data
        '401':
          description: Unauthorized - Invalid or missing API key
        '500':
          description: Server error
components:
  examples:
    LlmCreate:
      summary: Register an OpenAI-format LLM
      value:
        displayName: My GPT-4o
        urls:
          - url: https://api.openai.com/v1/chat/completions
        llmFormat: openai
        modelName: gpt-4o
        secret: sk-…
        temperature: 0.7
    LlmResponse:
      summary: A single LLM configuration
      value:
        id: a7cf662c-2ace-4de1-a21e-ef0fbf144bb7
        displayName: GPT-4o
        description: OpenAI GPT-4o default configuration.
        llmFormat: openai
        urls:
          - url: https://api.openai.com/v1/chat/completions
        modelName: gpt-4o
        temperature: 0.7
        maxTokens: 1024
        deploymentName: null
        apiVersion: null
        metadata: {}
        displayTags:
          - openai
        isDefault: true
        isGlobal: true
        isZdr: false
        createdByOrganizationId: null
        createdAt: '2026-04-20T10:00:00.000Z'
        updatedAt: null
  schemas:
    LLM:
      type: object
      description: An LLM configuration a persona can use. Secrets are never returned.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the LLM configuration.
        displayName:
          type: string
          description: Human-readable name shown in the Lab.
        description:
          type:
            - string
            - 'null'
          description: Free-form description of the LLM configuration.
        llmFormat:
          type: string
          enum:
            - openai
            - azure_openai
            - groq_openai
            - gemini
            - advanced_voice
            - none
          description: Wire format used to call the upstream LLM.
        urls:
          type: array
          items:
            $ref: '#/components/schemas/LlmUrl'
          description: Endpoints configured for this LLM.
        modelName:
          type:
            - string
            - 'null'
          description: Upstream model identifier (e.g. `gpt-4o`).
        temperature:
          type:
            - number
            - 'null'
          description: Sampling temperature applied when calling the LLM.
        maxTokens:
          type:
            - integer
            - 'null'
          description: Maximum tokens generated per response.
        deploymentName:
          type:
            - string
            - 'null'
          description: >-
            Azure OpenAI deployment name. Only used when `llmFormat` is
            `azure_openai`.
        apiVersion:
          type:
            - string
            - 'null'
          description: >-
            Azure OpenAI API version. Only used when `llmFormat` is
            `azure_openai`.
        metadata:
          type: object
          description: Free-form provider-specific metadata.
        displayTags:
          type: array
          items:
            type: string
          description: Tags used to categorise the LLM in the Lab UI.
        isDefault:
          type: boolean
          description: >-
            Whether this LLM is a built-in default available to every
            organization.
        isGlobal:
          type: boolean
          description: Whether this LLM is visible to every organization.
        isZdr:
          type: boolean
          description: Whether this LLM meets the Zero Data Retention requirements.
        reasoningEffort:
          type: string
          enum:
            - default
            - low
            - medium
            - high
          description: Reasoning effort hint for models that accept it.
        reasoningFormat:
          type: string
          enum:
            - parsed
            - raw
            - hidden
          description: Reasoning format hint for models that accept it.
        createdByOrganizationId:
          type:
            - string
            - 'null'
          description: >-
            ID of the organization that created the LLM, or `null` for global
            defaults. IDs may be either UUIDs or nanoid-style strings depending
            on when the organization was created.
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the LLM was created.
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the LLM was last updated.
    LlmUrl:
      type: object
      description: >-
        One endpoint configured on an LLM. Multiple URLs can be specified to
        route different regions to different upstreams.
      properties:
        url:
          type: string
          format: uri
          description: Upstream URL for the LLM endpoint.
        region:
          type: string
          description: >-
            Region hint used to pick this URL when the persona is streamed from
            a specific region.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````